diff options
-rw-r--r-- | LuaSL/src/LuaSL_lexer.l | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/LuaSL/src/LuaSL_lexer.l b/LuaSL/src/LuaSL_lexer.l index 93df410..2b60634 100644 --- a/LuaSL/src/LuaSL_lexer.l +++ b/LuaSL/src/LuaSL_lexer.l | |||
@@ -16,9 +16,12 @@ int common(YYSTYPE *lval, char *text, LuaSL_yyparseExtra *extra, boolean checkIg | |||
16 | %option extra-type="LuaSL_yyparseExtra *" | 16 | %option extra-type="LuaSL_yyparseExtra *" |
17 | 17 | ||
18 | HEX [[:xdigit:]] | 18 | HEX [[:xdigit:]] |
19 | INTEGER [[:digit:]]+ | 19 | DECIMAL [[:digit:]] |
20 | EXPONANT [eE][+-]?{INTEGER} | 20 | /* LSL has no octal integer type. */ |
21 | FLOAT {INTEGER}("."{INTEGER})?{EXPONANT}? | 21 | INTEGER ({DECIMAL}+)|(0[xX]{HEX}+) |
22 | EXPONANT [eE][+-]?{DECIMAL} | ||
23 | /* Floats can be "0." but I don't think ".0" is valid. */ | ||
24 | FLOAT {DECIMAL}("."{DECIMAL})?{EXPONANT}?[fF]? | ||
22 | CHAR '(\\.|[^\\'\n])+' | 25 | CHAR '(\\.|[^\\'\n])+' |
23 | STRING \"(\\.|[^\\"\n])*\" | 26 | STRING \"(\\.|[^\\"\n])*\" |
24 | IDENTIFIER [[:alpha:]](_|[[:alpha:]]|[[:digit:]])* | 27 | IDENTIFIER [[:alpha:]](_|[[:alpha:]]|[[:digit:]])* |