-
Notifications
You must be signed in to change notification settings - Fork 795
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
double parser returns unexpected result for the input ". " when the lexical feature is enabled #1080
Comments
The specific issue is here, where the complete My new fork should correct this issue with a more modern version of lexical: Newer versions, which I will shortly submit a PR for, will correctly fail with this input. nom double parse: Ok((" ", 0.0))
lexical_043 double parse: Result { value: 0.0, error: Error { code: InvalidDigit, index: 1 } }
lexical_070 double parse: Err(Error { code: EmptyFraction, index: 0 }) |
Patches: - rust-bakery#1100 - rust-bakery#1080 - rust-bakery#1066 - And a few upstream issues.
#1101 is merged, new version coming up |
Prerequisites
Test case
The
number::complete::double
parser returns an unexpected result when passed the input". "
. I would expect it to fail, but it returnsOk((" ", 0.0))
. If the lexical feature is disabled, then the expected error of:Err(Error((" ", Digit))
is returned.Sample repo: https://github.com/evant/nom-double-parse-issue
The text was updated successfully, but these errors were encountered: