Skip to content
Discussion options

You must be logged in to vote

Hey @ctron,

as for the playground issue: We already have an issue on the langium-website for this.

Regarding your grammar: ( (fields += Field) (',' fields += Field)* | (fields += Field ',')+ ) is ambiguous, since both alternatives start with the Field subrule and the static lookahead isn't long enough to figure out how to disambiguate it. There's an easier way to accomplish your goal:

Object:
    '{' ( (fields += Field) (',' (fields += Field)?)* )? '}'
;

Replies: 1 comment 2 replies

Comment options

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

@msujew
Comment options

Answer selected by ctron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #964 on February 27, 2023 09:06.