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

org.antlr.v4.test.runtime.templates.FullContextParsing.AmbiguityNoLoop.stg Maven / Gradle / Ivy

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

Options ::= [
	"Debug": true
]

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

Input() ::= "a@"

Rule() ::= "prog"

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

Errors() ::= <<
line 1:1 reportAttemptingFullContext d=0 (prog), input='a@'
line 1:2 reportAmbiguity d=0 (prog): ambigAlts={1, 2}, input='a@'
line 1:1 reportAttemptingFullContext d=1 (expr), input='a@'
line 1:2 reportContextSensitivity d=1 (expr), input='a@'<\n>
>>

grammar(grammarName) ::= <<
grammar ;



prog
@init {}
	: expr expr {}
	| expr
	;
expr: '@'
	| ID '@'
	| ID
	;
ID  : [a-z]+ ;
WS  : [ \r\n\t]+ -> skip ;
>>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy