UNPKG

@mike-lischke/antlr-tgen

Version:

A generator for antlr-ng runtime test cases

25 lines (20 loc) 384 B
[type] Lexer [grammar] lexer grammar L; I : ({<PlusText("stuff fail: "):writeln()>} 'a' | {<PlusText("stuff0:"):writeln()>} 'a' {<PlusText("stuff1: "):writeln()>} 'b' {<PlusText("stuff2: "):writeln()>}) {<Text():writeln()>} ; WS : (' '|'\n') -> skip ; J : .; [input] ab [output] stuff0: stuff1: a stuff2: ab ab [@0,0:1='ab',<1>,1:0] [@1,2:1='<EOF>',<-1>,1:2]