Closed GoogleCodeExporter closed 8 years ago
Mind that my solution excludes 0 by itself being an integer;
better fix this by allowing octal numbers as 0[0-7]*
Original comment by ieeege...@gmail.com
on 20 Feb 2010 at 7:36
Geert, I think that, in order to catch most typos, the best fix to is to just
allow
0[0-9A-Za-z]* for all integers in the lexical syntax and have the lexer print an
error message if any of the digits are wrong for the indicated base. This is
also
similar to what gcc does. It will exclude previously legal syntax such as 0x12g
(which would have been parsed as 0x12 g), but in most cases such inputs will be
typos
anyway.
Fixed in r3087, thanks for reporting.
Original comment by aggraef@gmail.com
on 20 Feb 2010 at 10:48
Original issue reported on code.google.com by
ieeege...@gmail.com
on 20 Feb 2010 at 6:08