org.antlr.v4.test.runtime.templates.SemPredEvalLexer.DisableRule.stg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime-testsuite Show documentation
Show all versions of runtime-testsuite Show documentation
A collection of tests for ANTLR 4 Runtime libraries.
TestType() ::= "Lexer"
Options ::= [
"ShowDFA": true
]
Grammar ::= [
"L": {}
]
Input() ::= "enum abc"
Output() ::= <<
[@0,0:3='enum',\<2>,1:0]
[@1,5:7='abc',\<3>,1:5]
[@2,8:7='\',\<-1>,1:8]
s0-' '->:s5=>4
s0-'a'->:s6=>3
s0-'e'->:s1=>3
:s1=>3-'n'->:s2=>3
:s2=>3-'u'->:s3=>3
:s6=>3-'b'->:s6=>3
:s6=>3-'c'->:s6=>3<\n>
>>
Errors() ::= ""
grammar(grammarName) ::= <<
lexer grammar ;
E1 : 'enum' { }? ;
E2 : 'enum' { }? ; // winner not E1 or ID
ID : 'a'..'z'+ ;
WS : (' '|'\n') -> skip;
>>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy