Skip to content

Help me fix this "Redundant input, expecting EOF but found: {" #326

Answered by msujew
meditto asked this question in Q&A

You must be logged in to vote

Hi @meddjelaili, thank you for your question.

What version of Langium are you using? As far as I can tell, your grammar shouldn't even compile due to a bug in version 0.2.0 (#294).

Anyway there are a few issues in your grammar that result from the lexer as well as an ambiguity issue coming from your Column rule. The ID terminal can never be parsed, since its shadowed by the COLUMN_NAME and MODEL_NAME terminals, as they mostly match the same input. Additionally, when encountering something like Model NAME { id string }, the parser will never know whether the string is the type of the previous id column, or the name property of a new column, you will need a separator of some sorts for that.

A…

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@meditto

Answer selected by meditto
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