This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Tune the scan_num() comments to reality.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 1 May 2001 13:24:20 +0000 (13:24 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 1 May 2001 13:24:20 +0000 (13:24 +0000)
p4raw-id: //depot/perl@9928

toke.c

diff --git a/toke.c b/toke.c
index 79399fd..773db31 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -6876,12 +6876,11 @@ S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims)
 
   Read a number in any of the formats that Perl accepts:
 
-  0(x[0-7A-F]+)|([0-7]+)|(b[01])
-  \d([\d_]*\d)?(\.\d([\d_]*\d)?)?[Ee](\d+)
-
-  Underbars (_) are allowed in decimal numbers.  If -w is on,
-  underbars must not be consecutive, and they cannot start
-  or end integer or fractional parts.
+  \d(_?\d)*(\.(\d(_?\d)*)?)?[Ee](\d+)  12 12.34 12.
+  \.\d(_?\d)*[Ee](\d+)                 .34
+  0b[01](_?[01])*
+  0[0-7](_?[0-7])*
+  0x[0-9A-Fa-f](_?[0-9A-Fa-f])*
 
   Like most scan_ routines, it uses the PL_tokenbuf buffer to hold the
   thing it reads.