Skip to content

Commit

Permalink
Update regex to EBNF
Browse files Browse the repository at this point in the history
  • Loading branch information
frewsxcv committed Dec 22, 2018
1 parent 15f79d8 commit 1027dc1
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/libcore/num/dec2flt/mod.rs
Expand Up @@ -129,19 +129,17 @@ macro_rules! from_str_float_impl {
///
/// # Grammar
///
/// All strings that adhere to the following regular expression
/// All strings that adhere to the following EBNF grammar
/// will result in an [`Ok`] being returned:
///
/// ```txt
/// (\+|-)?
/// (inf|
/// NaN|
/// ([0-9]+|
/// [0-9]+\.[0-9]*|
/// [0-9]*\.[0-9]+)
/// ((e|E)
/// (\+|-)?
/// [0-9]+)?)
/// Float ::= Sign? ( 'inf' | 'NaN' | Number )
/// Number ::= ( Digit+ |
/// Digit+ '.' Digit* |
/// Digit* '.' Digit+ ) Exp?
/// Exp ::= [eE] Sign? Digit+
/// Sign ::= [+-]
/// Digit ::= [0-9]
/// ```
///
/// # Known bugs
Expand Down

0 comments on commit 1027dc1

Please sign in to comment.