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

Extra Parenthesis leads to incorrect logic #111

Closed
nelio2k opened this issue Jun 13, 2019 · 0 comments
Closed

Extra Parenthesis leads to incorrect logic #111

nelio2k opened this issue Jun 13, 2019 · 0 comments
Assignees

Comments

@nelio2k
Copy link
Collaborator

nelio2k commented Jun 13, 2019

For this expression:
(county = "United States" OR country = "Canada" AND type="brewery") OR (type="beer" AND DATE(updated) >= DATE("2019-01-01"))

things work correctly.

However, when extra parenthesis are added:
((county = "United States" OR country = "Canada") AND type="brewery") OR (type="beer" AND DATE(updated) >= DATE("2019-01-01"))

the logic is broken.

Need investigating on why the AST is different.

@nelio2k nelio2k self-assigned this Jun 13, 2019
nelio2k added a commit to nelio2k/gojsonsm that referenced this issue Jun 13, 2019
… allow recursive parsing of parenthesis

Previous grammar led to incorrectly parsed logic
With the new logic, it should output the correct AST based on correctly parsing all of the parenthesis
nelio2k added a commit to nelio2k/gojsonsm that referenced this issue Jun 14, 2019
… allow recursive parsing of parenthesis

Previous grammar led to incorrectly parsed logic
With the new logic, it should output the correct AST based on correctly parsing all of the parenthesis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant