Replies: 2 comments 1 reply
-
I solved this problem by using IGNORE_AMBIGUITIES: true
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I think I understand. The reason why this does not conflict with ll(k) is because it is determined by the execution order. Renderdom is before callnewexpression. Renderdom is matched first. If it matches and returns, callnewexpression will be matched if it does not match. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I saw on the official website that chevrotain is implemented using ll(k) grammar,
https://chevrotain.io/docs/features/llk.html#ll-k-grammars
which should mean that this problem cannot be solved, so the only way I can do is to change the grammar. Is my understanding correct?
Or can GATE solve this problem?
Sorry, I am not a computer professional, and I don't have a deep understanding of compiler principles, so my question may be a bit inappropriate, but I really don't know what to do. I look forward to your answer. Thank you.
https://chevrotain.io/docs/features/llk.html#ll-k-grammars
I want to extend the es5 syntax and create a new syntax of
div(Arguments){ ElementList }
The new syntax I defined is the same as some of the syntax in MemberCallNewExpression. They both contain
div(Arguments){ ElementList }
But it is too similar to the es5 method call syntax
It has the same token prefix as the es5 method call syntax
div(Arguments)
, and the number of prefixes is not limited.So at this time, no matter how much maxLookahead is set to, it will be invalid.
Is there any other way I can solve this problem?
div(Arguments)
Beta Was this translation helpful? Give feedback.
All reactions