aboutsummaryrefslogtreecommitdiff
path: root/antlr-3.4/runtime/JavaScript/tests/functional/t058rewriteAST36.g
blob: 5e5ca171acb91212e8802f6f3354da00af3264c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

grammar t058rewriteAST36;
options {language=JavaScript;output=AST;}
tokens {TYPE;}
a : b b ;
b : 'int'
    ( ID -> ^(TYPE 'int' ID)
    | ID '=' INT -> ^(TYPE 'int' ID INT)
    )
    ';'
  ;
ID : 'a'..'z'+ ;
INT : '0'..'9'+;
WS : (' '|'\n') {$channel=HIDDEN;} ;