From: Jarkko Hietaniemi Date: Tue, 1 May 2001 13:24:20 +0000 (+0000) Subject: Tune the scan_num() comments to reality. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=24138b49dff297b9543ed25a772dc44660a37fc8;p=p5sagit%2Fp5-mst-13.2.git Tune the scan_num() comments to reality. p4raw-id: //depot/perl@9928 --- diff --git a/toke.c b/toke.c index 79399fd..773db31 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.