-
Notifications
You must be signed in to change notification settings - Fork 77
Parse error recovery and incrementality for GHC #182
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
Conversation
There are a couple of stretch goals: | ||
|
||
* `happy` could further be improved to pass a closure of its | ||
parse state to reduction actions, so as to enable incremental parsing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and use this in GHC?
* `happy` could further be improved to pass a closure of its | ||
parse state to reduction actions, so as to enable incremental parsing. | ||
* Improve `happy` so that it provides a convenient and encapsulated way to | ||
introspect the LALR item stack, for example to identify bracketing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... and use this in GHC?
productions such as `'(' expr . ')'` in order to report mismatched brackets. | ||
There is a [hacky GHC Merge Request](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4711) | ||
that tries to achieve as much without buy in from happy. | ||
* Improve `happy`s code base, which by now is over 25 years old. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be helpful to identify a couple of concrete things: just "modernisation", or comments, or tests, or what?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it is rather hard to spell out what could make a substantial improvment. Certainly it appears that the modularisation effort has left happy
in a rather rough stage. See #183.
LGTM, thanks! I'm going to go ahead and merge this so that it's listed on the site before I submit the GSoC application. Feel free to open another PR if you want to make any changes. |
Thanks! I addressed Michael's feedback in #183. |
No description provided.