-
Notifications
You must be signed in to change notification settings - Fork 237
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
Use menhir #2910
Use menhir #2910
Conversation
Everything mostly works, except incremental parsing for some reason. The test in So, this reeks of something related to lookahead, but it's not the problem we had before with the parser consuming an extra token that needs to be put back. Here the parser never successfully returns, it fails to parse (incrementally) any prefix of the module. It's weird that also it seems to accept this, see this run of
Then write:
So I'm rather confused. I will look at this later. I disabled interactive tests in this branch for now. We'll probably get a failure on expected output but hopefully no serious problem. |
I've updated the README and fixed incremental parsing. Thanks Guido! |
This PR removes ocamlyacc and fully uses menhir to generate our parser. The positions in the parser actions are changed to use menhir syntax, instead of the
rhs
/rhs2
module which depended on the Parsing module. This actually improves some ranges (e.g. it fixes #1955).There also some build system changes. Would be good if @tahina-pro can take a look to check I didn't mess it up.
Note: dune drives the generation of the parser, so no snapshot is checked in. I still need to measure, but it seems like even while generating the parser is fast, the build slows down a bit.
I still need to update some READMEs, posting to not lose track of this.