-
Notifications
You must be signed in to change notification settings - Fork 26
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
Precedence operators to resolve S/R conflicts #12
Comments
There's already some support for this, though undocumented, haha. Look for On Oct 18, 2016 19:24, "Yuki Izumi" notifications@github.com wrote:
|
See https://github.com/rudi-c/cs444-java-compiler-in-rust/blob/master/ast/src/parser.rs for an old example of how I used them. If you want to improve the interface or make them more general, or whatever, that would be great! |
Great, will look at this tonight! Thanks :) |
Sorry if this is the wrong place for this, but I am getting a shift reduce conflict, and am unable to figure out how to use these macros to fix it. Here is the code:
That second line, the one commented out, was my attempt at trying to solve the error, but that did nothing to fix it. Do you have any idea how I'd use these macros to fix this problem? Here is the error:
Thank you for your time! |
So I believe you can fix this by using |
The |
This isn't a feature request, more feeling out: would you be interested in a PR that added precedence operators to automatically solve shift–reduce conflicts? (per bison's
%left
/%right
/%nonassoc
) If so, I might give it a shot. (No guarantees I'm actually capable of it!)The text was updated successfully, but these errors were encountered: