Consider the following abstract syntax tree:
Program
|
FnExp
/ \
p,q,r PrimAppExp
|
*
/ \
VarExp PrimAppExp
| |
p +
/ \
VarExp VarExp
| |
q r
Which one of the following SLang 1 expressions does it represent?
fn(p,q,r)=>*(p,+(q,r))
fn(p,q,r)=>+(p,*(q,r))
(fn(p,q,r)=>*(p,+(q,r)))
(fn(p,q,r)=>+(p,*(q,r)))
Review the differences between concrete syntax and abstract syntax.
Where are parentheses used in SLang 1?