Mercurial > projects > dil
changeset 68:7eb83dd38901
- Simplified suffix rule and added a few more numbers to unittest.
author | aziz |
---|---|
date | Sun, 01 Jul 2007 12:18:02 +0000 |
parents | 996065105910 |
children | 24db7c5522d5 |
files | trunk/src/Lexer.d trunk/src/Parser.d |
diffstat | 2 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/Lexer.d Sun Jul 01 10:58:03 2007 +0000 +++ b/trunk/src/Lexer.d Sun Jul 01 12:18:02 2007 +0000 @@ -923,7 +923,7 @@ Hex:= 0[xX] HexDigits Bin:= 0[bB][01_]+ Oct:= 0[0-7_]+ - Suffix:= (L|[uU]|L[uU]|[uU]L)? + Suffix:= (L[uU]?|[uU]L?) HexDigits:= [0-9a-zA-Z_]+ Invalid: "0b_", "0x_", "._" @@ -1579,7 +1579,11 @@ unittest { // Numbers unittest - // 0L 0ULi 0_L 0_UL 0_Fi 0_e2 0_F 0_i 0x0U 0x0p2 + // 0L 0ULi 0_L 0_UL 0x0U 0x0p2 0_Fi 0_e2 0_F 0_i + // 0u 0U 0uL 0UL 0L 0LU 0Lu + // 0Li 0f 0F 0fi 0Fi 0i + // 0b_1_LU 0b1000u + // 0x232Lu } /// ASCII character properties table.
--- a/trunk/src/Parser.d Sun Jul 01 10:58:03 2007 +0000 +++ b/trunk/src/Parser.d Sun Jul 01 12:18:02 2007 +0000 @@ -4,6 +4,21 @@ +/ module Parser; +enum STC +{ + Abstract, + Auto, + Const, + Deprecated, + Extern, + Final, + Invariant, + Override, + Scope, + Static, + Synchronized +} + class Parser {