File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -129,19 +129,17 @@ macro_rules! from_str_float_impl {
129
129
///
130
130
/// # Grammar
131
131
///
132
- /// All strings that adhere to the following regular expression
132
+ /// All strings that adhere to the following EBNF grammar
133
133
/// will result in an [`Ok`] being returned:
134
134
///
135
135
/// ```txt
136
- /// (\+|-)?
137
- /// (inf|
138
- /// NaN|
139
- /// ([0-9]+|
140
- /// [0-9]+\.[0-9]*|
141
- /// [0-9]*\.[0-9]+)
142
- /// ((e|E)
143
- /// (\+|-)?
144
- /// [0-9]+)?)
136
+ /// Float ::= Sign? ( 'inf' | 'NaN' | Number )
137
+ /// Number ::= ( Digit+ |
138
+ /// Digit+ '.' Digit* |
139
+ /// Digit* '.' Digit+ ) Exp?
140
+ /// Exp ::= [eE] Sign? Digit+
141
+ /// Sign ::= [+-]
142
+ /// Digit ::= [0-9]
145
143
/// ```
146
144
///
147
145
/// # Known bugs
You can’t perform that action at this time.
0 commit comments