Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. addexp returns [AddExp ast]
  2. locals [Exp exp1, Exp exp2]
  3. @init {} :
  4. '(' '+'
  5. e=exp { $exp1 = $e.ast; }
  6. ( e=exp { $exp2 = e.ast; } )
  7. ')' { $ast = new AddExp($exp1, $exp2); }
  8. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement