
org.antlr.v4.test.runtime.templates.SemPredEvalLexer.LexerInputPositionSensitivePredicates.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() ::= "a cde<\n>abcde<\n>"
Output() ::= <<
a
cde
ab
cde
[@0,0:0='a',\<1>,1:0]
[@1,2:4='cde',\<2>,1:2]
[@2,6:7='ab',\<1>,2:0]
[@3,8:10='cde',\<2>,2:2]
[@4,12:11='\',\<-1>,3:0]<\n>
>>
Errors() ::= ""
grammar(grammarName) ::= <<
lexer grammar ;
WORD1 : ID1+ { } ;
WORD2 : ID2+ { } ;
fragment ID1 : { \< 2 }? [a-zA-Z];
fragment ID2 : { >= 2 }? [a-zA-Z];
WS : (' '|'\n') -> skip;
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy