Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve duplicate DSL methods suffix error message #1020

Closed
bd82 opened this issue Aug 30, 2019 · 1 comment
Closed

Improve duplicate DSL methods suffix error message #1020

bd82 opened this issue Aug 30, 2019 · 1 comment

Comments

@bd82
Copy link
Member

bd82 commented Aug 30, 2019

Error: Parser Definition Errors detected:
->OPTION<- with numerical suffix: ->0<-
appears more than once (2 times) in the top level rule: ->mediaList<-.
Also note that numerical suffix 0 means OPTION without any suffix.
To fix this make sure each usage of OPTION
in the rule ->mediaList<- has a different occurrence index (0-5), as that combination acts as a unique
position key in the grammar, which is needed by the parsing engine.
For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES

The Also note that numerical suffix 0 means OPTION without any suffix. is redundant as we can distinguish between explicit and implicit suffixes in the GAST

@bd82
Copy link
Member Author

bd82 commented Sep 10, 2019

It now look like this:

Error: Parser Definition Errors detected:
->SUBRULE1<- with argument: ->anotherRule<-
appears more than once (2 times) in the top level rule: ->duplicateRef<-.
For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES

@bd82 bd82 closed this as completed in 10de5d2 Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant