Replies: 2 comments 5 replies
-
Hi @bd82, first off, thank you for your work on Chevrotain. It has made building the parser generator and debugging the generated parsers a breeze. While Langium is quite a complex use case, Chevrotain is able to handle everything really well (while still being really fast). Regarding your observations:
Feedback: However, one would expect the parser error to be displayed at the end of the line, where the actual Another thing which I would like to see is some sort of parser mode which we could use to identify any parser rule that could be invoked at a certain place. For code completion, we just run the parser on the whole file and find out which CST node is at the specified completion offset. Then we invoke some sort of rule interpreter to heuristically determine which rule could also have been invoked at that place. It works quite well, but Chevrotain support for that use case would be superb. The main issue is that it needs to run on broken input. @spoenemann any other feedback from your side? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the in-depth overview. Lexer StatesDo you mean something like this? Error PositionsI am unable to reproduce the issue you are describing on the JSON example on the playground. Nor when I remove the semicolon from the Perhaps this is due to a combination with error recovery logic? Can you reproduce it in one of the examples sub-packages in chevrotain repo, e.g via a test with failing assertions? Normally an error would appear one token after when something is missing. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I am the author of Chevrotain and I was wondering
if you could provide details on how Chevrotain is used in this project?
and If you have any feedback on Chevrotain?
It seems this is quite a complex use case:
protected
Chevrotain.Parser methods.protected
is a design time only construct and a runtime based workaroundmay affect runtime performance.
Cheers.
Shahar.
Beta Was this translation helpful? Give feedback.
All reactions