Cactus supports several ways to refer to parts of the syntax tree when specifying the abstract syntax.
| By position | List($2:$3.2) ::= '[' exp (',' exp)+ ']'
|
|---|---|
| By name+position | List(exp1:exp2) ::= '[' exp (',' exp)+ ']'
|
| By explicit names | List(e1:e2) ::= '[' exp:e1 (',' exp:e2)+ ']'
|
| Automatically | List.. ::= '[' exp:e1 (',' exp:e2)+ ']' |
(In this example, $3 would work instead of $3.2)