1grammar t024finally; 2 3options { 4 language=JavaScript; 5} 6 7prog returns [events] 8@init {events = [];} 9@after {events.push('after');} 10 : ID {throw new Error("quux");} 11 ; 12 catch [e] {events.push('catch');} 13 finally {events.push('finally');} 14 15ID : ('a'..'z')+ 16 ; 17 18WS : (' '|'\n'|'\r')+ {$channel=org.antlr.runtime.BaseRecognizer.HIDDEN} 19 ; 20