Skip to content
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

Heapster: Avoid shift/reduce conflicts involving bitvector negation #1795

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

RyanGlScott
Copy link
Contributor

We now ensure that - has higher precedence than any other operator using happy's %left pragma. This ensures that - 42 + 27 parses as (- 42) + 27, not - (42 + 27) like before.

While I was in town, I added %expect 0 at the top of the parser to ensure that happy will error out in the future if additional shift/reduce conflicts are introduced.

Fixes #1794.

We now ensure that `-` has higher precedence than any other operator using
`happy`'s `%left` pragma. This ensures that `- 42 + 27` parses as `(- 42) +
27`, not `- (42 + 27)` like before.

While I was in town, I added `%expect 0` at the top of the parser to ensure
that `happy` will error out in the future if additional shift/reduce conflicts
are introduced.

Fixes #1794.
Copy link
Contributor

@eddywestbrook eddywestbrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@RyanGlScott RyanGlScott added the PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run label Jan 4, 2023
@mergify mergify bot merged commit 4fe1be3 into master Jan 4, 2023
@mergify mergify bot deleted the T1794 branch January 4, 2023 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: ready to merge Magic flag for pull requests to ask Mergify to merge given an approval and a successful CI run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Heapster: Resolve shift/reduce conflict warnings in parser
2 participants