[type]
Parser

[grammar]
grammar T;
s @after {<ToStringTree("$ctx"):writeln()>} : e EOF ; // must indicate EOF can follow
e : e '.' ID
  | e '.' 'this'
  | '-' e
  | e '*' e
  | e ('+'|'-') e
  | INT
  | ID
  ;
ID : 'a'..'z'+ ;
INT : '0'..'9'+ ;
WS : (' '|'\n') -> skip ;

[start]
s

[input]
a.b

[output]
"""(s (e (e a) . b) <EOF>)
"""

