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