CAP/TP03/tree/Tree.g4
2024-09-29 09:58:25 +02:00

17 lines
174 B
ANTLR

grammar Tree;
int_tree_top : int_tree EOF #top
;
int_tree: INT #leaf
| '(' INT int_tree+ ')' #node
;
INT: [0-9]+;
WS : (' '|'\t'|'\n')+ -> skip;