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

Disambiguating unary and binary minus #1

Open
wh5a opened this issue Jul 29, 2020 · 0 comments
Open

Disambiguating unary and binary minus #1

wh5a opened this issue Jul 29, 2020 · 0 comments

Comments

@wh5a
Copy link

wh5a commented Jul 29, 2020

A statement like "cu1(-pi) q[0], q[1];" cannot be parsed correctly, unless we insert a space like so: "cu1(- pi) q[0], q[1];".

The grammar needs to be changed. A quick search found some discussions:
https://stackoverflow.com/questions/32166738/disambiguating-unary-and-binary-minus-in-antlr4-grammar
https://stackoverflow.com/questions/27478834/how-compiler-distinguishes-minus-and-negative-number-during-parser-process

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant