Home | History | Annotate | Download | only in functional
      1 grammar t024finally;
      2 
      3 options {
      4     language=JavaScript;
      5 }
      6 
      7 prog 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 
     15 ID  :   ('a'..'z')+
     16     ;
     17 
     18 WS  :   (' '|'\n'|'\r')+ {$channel=org.antlr.runtime.BaseRecognizer.HIDDEN}
     19     ;
     20