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

Fix parser associativity bug #257

Closed
denismerigoux opened this issue May 5, 2022 · 0 comments · Fixed by #260
Closed

Fix parser associativity bug #257

denismerigoux opened this issue May 5, 2022 · 0 comments · Fixed by #260
Labels
❌ bug Something isn't working 🔧 compiler Issue concerns the compiler
Milestone

Comments

@denismerigoux
Copy link
Contributor

The problem

The following Catala program:

declaration scope A:
  output x content money

scope A:
  definition x equals $4 -$ $2 -$ $2

Outputs x = $4 instead of x = $0. The associativity of the $- operator is wrong, is associates to the right but should be left. The problem is likely to be the same for all minus operators.

The fix

The parser should be fixed to respect the usual associativity rules. This is a high-priority bug, since it is likely to impact users in very deceitful ways.

@denismerigoux denismerigoux added ❌ bug Something isn't working 🔧 compiler Issue concerns the compiler labels May 5, 2022
@denismerigoux denismerigoux added this to the Catala v1.0 milestone May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❌ bug Something isn't working 🔧 compiler Issue concerns the compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant