Home | History | Annotate | Download | only in tests
      1 grammar t045dfabug;
      2 options {
      3     language = Python;
      4     output = AST;
      5 }
      6 
      7 
      8 // this rule used to generate an infinite loop in DFA.predict
      9 r
     10 options { backtrack=true; }
     11     : (modifier+ INT)=> modifier+ expression
     12     | modifier+ statement
     13     ;
     14 
     15 expression
     16     : INT '+' INT
     17     ;
     18 
     19 statement
     20     : 'fooze'
     21     | 'fooze2'
     22     ;
     23 
     24 modifier
     25     : 'public'
     26     | 'private'
     27     ;
     28 
     29 ID : 'a'..'z' + ;
     30 INT : '0'..'9' +;
     31 WS: (' ' | '\n' | '\t')+ {$channel = HIDDEN;};
     32 
     33