All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.antlr.v4.test.runtime.templates.SemPredEvalParser.2UnpredicatedAltsAndOneOrthogonalAlt.stg Maven / Gradle / Ivy

There is a newer version: 4.9.0
Show newest version
TestType() ::= "Parser"

Options ::= [
	"Debug": true
]

Grammar ::= [
	"T": {}
]

Input() ::= "34; x; y"

Rule() ::= "s"

Output() ::= <<
alt 1
alt 2
alt 2<\n>
>>

Errors() ::= <<
line 1:4 reportAttemptingFullContext d=0 (a), input='x'
line 1:4 reportAmbiguity d=0 (a): ambigAlts={2, 3}, input='x'
line 1:7 reportAttemptingFullContext d=0 (a), input='y'
line 1:7 reportAmbiguity d=0 (a): ambigAlts={2, 3}, input='y'<\n>
>>

grammar(grammarName) ::= <<
grammar ;



s : {} a ';' a ';' a;
a : INT {}
  | ID {} // must pick this one for ID since pred is false
  | ID {}
  | {}? ID {}
  ;
ID : 'a'..'z'+ ;
INT : '0'..'9'+;
WS : (' '|'\n') -> skip ;
>>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy