[nem-en] integer literals grammar
Dmitry Ivankov
divanorama at gmail.com
Fri Feb 23 18:51:52 CET 2007
I have some questions about grammar:
- Everything in integer and float literals is case insensitive?
What is the grammar for integer literals?
- what are valid type suffixes? (ub, u, l, lu) each in any order?
- can underscore be used in non-decimal literals? like
0xa_1, or 0x1_a (first compiles, second - not)
- can type suffixes be used in non-decimal literals? what about 0xbb, is it
0xbb or (0xb)b? ;)
And about floating point literals:
- underscore can be used between digits, but not in exponent, right? :)
My suggestions:
- add type suffix 's' (so we can write 0xbsb)
- allow underscore in any integer literal (i.e. fix parsing of 0x1_a)
- allow underscore only before dot in floats (the only use of underscore in
floats i can image is to change 1_000 to 1_000.0 quickly, or someone would
like to use it like that: 0.12345_67890 ? )
I think that after figuring out exact grammar i'll add it to wiki ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman/pipermail/devel-en/attachments/20070223/33850dce/attachment.html
More information about the devel-en
mailing list