You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
334 B
20 lines
334 B
grammar t024finally;
|
|
|
|
options {
|
|
language=Python;
|
|
}
|
|
|
|
prog returns [events]
|
|
@init {events = []}
|
|
@after {events.append('after')}
|
|
: ID {raise RuntimeError}
|
|
;
|
|
catch [RuntimeError] {events.append('catch')}
|
|
finally {events.append('finally')}
|
|
|
|
ID : ('a'..'z')+
|
|
;
|
|
|
|
WS : (' '|'\n'|'\r')+ {$channel=HIDDEN}
|
|
;
|