
org.antlr.v4.test.runtime.templates.FullContextParsing.CtxSensitiveDFATwoDiffInputWithoutDFA.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() ::= "Parser"
Options ::= [
"Debug": true
]
Grammar ::= [
"T": {}
]
Input() ::= "$ 34 abc @ 34 abc"
Rule() ::= "s"
Output() ::= <<
Decision 2:
s0-INT->s1
s1-ID->:s2=>1<\n>
>>
Errors() ::= <<
line 1:5 reportAttemptingFullContext d=2 (e), input='34abc'
line 1:2 reportContextSensitivity d=2 (e), input='34'
line 1:14 reportAttemptingFullContext d=2 (e), input='34abc'
line 1:14 reportContextSensitivity d=2 (e), input='34abc'<\n>
>>
grammar(grammarName) ::= <<
grammar ;
s @after {}
: ('$' a | '@' b)+ ;
a : e ID ;
b : e INT ID ;
e : INT | ;
ID : 'a'..'z'+ ;
INT : '0'..'9'+ ;
WS : (' '|'\t'|'\n')+ -> skip ;
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy