-
Notifications
You must be signed in to change notification settings - Fork 298
Link to LR(1) docs in conflict error messages #1019
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
Comments
Well, I can't find any advice about making grammar LR(1) in the manual. If you're solving the ambiguity, it will be great to post your grammar here. |
Ah, well I'm okay, I've solved a few ambiguities without much trouble. |
Thanks for the proposal! However, I think it's tough to do so because there's no general ways to resolve the ambiguity. Often I got the solution from the other project and I'm still lack of those experiences and knowledge. It will be much appreciated if you found some useful resource and share them! |
Well at the very least we can stop telling people to look through the manual for information that isn't there. |
I think you're right that this isn't really in the lalrpop book yet. I suspect the intent in the error message was around the line on this page: https://lalrpop.github.io/lalrpop/tutorial/index.html which lists including this advice as a todo. The "making your grammar LR(1)" message mentioned here is one of several references to the manual in these errors. There are also messages mentioning the sections on inlining and precendence, as well as a "See the LALRPOP manual for advice on making your grammar unambiguous". Of these, only precedence seems to be mentioned in the manual, and it's not obvious where it resides, since the page name is "parsing full expressions" rather than anything about precedence. So to full resolve this, I think we need the following steps:
I'll leave this open for now, and hopefully start checking off those items. (Other PRs for any of the above are of course always welcome) |
The errros says:
It would be great to print a link with that message, as it's not clear where exactly in the manual to find this advice.
The text was updated successfully, but these errors were encountered: