android13/external/antlr/runtime/ObjC/Framework/examples/treerewrite/TreeRewrite.g

20 lines
195 B
Plaintext

grammar TreeRewrite;
options {
output=AST;
language=ObjC;
}
rule: INT subrule -> ^(subrule INT)
;
subrule
: INT
;
INT : ('0'..'9')+
;
WS : ' ' {$channel=HIDDEN;}
;