summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-05-01 13:24:20 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-01 13:24:20 +0000
commit24138b49dff297b9543ed25a772dc44660a37fc8 (patch)
tree6927cfdb23693abeb909b1a974f0c2c713a3b5ed /toke.c
parent7e80da18e775cb5cc203f20486bcf5f748ca193a (diff)
downloadperl-24138b49dff297b9543ed25a772dc44660a37fc8.tar.gz
Tune the scan_num() comments to reality.
p4raw-id: //depot/perl@9928
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/toke.c b/toke.c
index 79399fd9bd..773db3186a 100644
--- 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.