1grammar t024finally; 2 3options { 4 language=Cpp; 5} 6 7@lexer::includes 8{ 9#include "UserTestTraits.hpp" 10} 11@lexer::namespace 12{ Antlr3Test } 13 14@parser::includes { 15#include "UserTestTraits.hpp" 16} 17@parser::namespace 18{ Antlr3Test } 19 20prog returns [events] 21@init {events = []} 22@after {events.append('after')} 23 : ID {raise RuntimeError} 24 ; 25 catch [RuntimeError] {events.append('catch')} 26 finally {events.append('finally')} 27 28ID : ('a'..'z')+ 29 ; 30 31WS : (' '|'\n'|'\r')+ {$channel=HIDDEN} 32 ; 33