org.antlr.v4.test.runtime.templates.SemPredEvalLexer.Indent.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() ::= "abc<\n> def <\n>"
ID() ::= "\<1>"
INDENT() ::= "\<2>"
NL() ::= "\<3>"
WS() ::= "\<4>"
Output() ::= <<
INDENT
[@0,0:2='abc',,1:0]
[@1,3:3='\\n',,1:3]
[@2,4:5=' ',,2:0]
[@3,6:8='def',,2:2]
[@4,9:10=' ',,2:5]
[@5,11:11='\\n',,2:7]
[@6,12:11='\',\<-1>,3:0]
s0-'
'->:s2=>3
s0-'a'->:s1=>1
s0-'d'->:s1=>1
:s1=>1-'b'->:s1=>1
:s1=>1-'c'->:s1=>1
:s1=>1-'e'->:s1=>1
:s1=>1-'f'->:s1=>1<\n>
>>
Errors() ::= ""
grammar(grammarName) ::= <<
lexer grammar ;
ID : [a-z]+ ;
INDENT : [ \t]+ { }?
{ } ;
NL : '\n';
WS : [ \t]+ ;
>>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy