• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1grammar t024finally;
2
3options {
4    language=Python3;
5}
6
7prog returns [events]
8@init {events = []}
9@after {events.append('after')}
10    :   ID {raise RuntimeError}
11    ;
12    catch [RuntimeError] {events.append('catch')}
13    finally {events.append('finally')}
14
15ID  :   ('a'..'z')+
16    ;
17
18WS  :   (' '|'\n'|'\r')+ {$channel=HIDDEN}
19    ;
20