Skip to content
Discussion options

You must be logged in to vote

Hey @rempAut,

even though we use EBNF syntax for most of our grammar DSL, the assignment syntax is a bit more limited, and doesn't allow for arbitrary amount of tokens in there. In your case, it looks as though your Identifier rule is actually supposed to be a data type rule. This change would address your problem:

entry Model:
    (ident=Identifier);

Identifier returns string:
    (Underscore | Letter) (Underscore | Digit | Letter)*;

I've simplified the Identifier rule, but it still parses the same input. Please note that your ID terminal at the bottom of your grammar is already able to parse the input that would be parsed by the Identifier rule.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rempAut
Comment options

@msujew
Comment options

Answer selected by rempAut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants