1 grammar t030specialStates; 2 options { 3 language = JavaScript; 4 } 5 6 @members { 7 this.recover = function(input, re) { 8 throw re; 9 }; 10 } 11 12 r 13 : ( {this.cond}? NAME 14 | {!this.cond}? NAME WS+ NAME 15 ) 16 ( WS+ NAME )? 17 EOF 18 ; 19 20 NAME: ('a'..'z') ('a'..'z' | '0'..'9')+; 21 NUMBER: ('0'..'9')+; 22 WS: ' '+; 23