antlr/tool/playground/A.g4

11 lines
115 B
ANTLR

grammar A;
s : e ;
e : e '*' e -> Mult
| INT -> primary
;
INT : [0-9]+ ;
WS : [ \t\n]+ -> skip ;