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

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

There is a newer version: 4.9.0
Show newest version
/**
 * This is a regression test for antlr/antlr4#196
 * "element+ in expression grammar doesn't parse properly"
 * https://github.com/antlr/antlr4/issues/196
 */

TestType() ::= "Parser"

Options ::= [
	"Debug": false
]

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

Input() ::= "a+b+a"

Rule() ::= "start"

Output() ::= ""

Errors() ::= ""

grammar(grammarName) ::= <<
grammar ;
start : e[0] EOF;
e[ _p]
    :   ( 'a' | 'b'+ ) ( {3 >= $_p}? '+' e[4] )*
    ;

>>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy