-
Notifications
You must be signed in to change notification settings - Fork 33
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
Wrong parse result for hexadecimal floating points #159
Comments
So i think yours is close but missing:
|
Also neat to hear that you are using the parser over in things like flowr-analysis/flowr#1160! Let us know if you find more deviations, we are trying to make it as high fidelity as we can, as this is used in things like Ark which help power Positron's R support https://github.com/posit-dev/ark |
you are correct i neither considered the capital We found the deviations simply by checking the normalized tree-sitter results against our normalization for the R parser so we make sure to report anything else we notice. Thank you for the great project! |
We are currently in the process of migrating our parsing backend from the built-in R parser to this tree-sitter implementation and noted a deviation when running our tests:
Hexadecimal floating point notation like
0x0p0
(mentioned in 10.3.1 Constants in the language definition) is parsed as(program (float) (identifier))
and not simply as(program (float))
which is what I would have assumed.This is probably related to the following part in the grammar:
tree-sitter-r/grammar.js
Lines 487 to 494 in 4a89de3
I have yet to get comfortable with the tree-sitter grammar syntax but maybe the following fix suffices?
The text was updated successfully, but these errors were encountered: