Skip to content

Commit

Permalink
Corrected EBNF grammar for from_str
Browse files Browse the repository at this point in the history
Previously, the `Number` part of the EBNF grammar had an option for `'.' Digit*`, which would include the string "." (a single decimal point). This is not valid, and does not return an Ok as stated. The corrected version removes this, and still allows for the `'.' Digit+` case with the already existing `Digit* '.' Digit+` case.
  • Loading branch information
ijchen authored May 28, 2022
1 parent 1fede17 commit 0484cfb
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion library/core/src/num/dec2flt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ macro_rules! from_str_float_impl {
/// ```txt
/// Float ::= Sign? ( 'inf' | 'infinity' | 'nan' | Number )
/// Number ::= ( Digit+ |
/// '.' Digit* |
/// Digit+ '.' Digit* |
/// Digit* '.' Digit+ ) Exp?
/// Exp ::= 'e' Sign? Digit+
Expand Down

0 comments on commit 0484cfb

Please sign in to comment.