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

Precedences ininfix_expression #207

Open
schuetzm opened this issue Sep 29, 2020 · 0 comments
Open

Precedences ininfix_expression #207

schuetzm opened this issue Sep 29, 2020 · 0 comments

Comments

@schuetzm
Copy link

It seems currently the precedences in infix_expression need to be > 0; when you use 0 for an operator, it fails to parse it correctly. As far as I can tell this is caused by the default value of current_prec = 1 in https://github.com/kschiess/parslet/blob/master/lib/parslet/atoms/infix.rb#L51. This could be set to 0, or even -Float::INFINITY, to support even negative precedences (which can come in handy when you want to add a low precedence operator and don't want to adjust all the existing precedences).

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