summaryrefslogtreecommitdiffstats
path: root/parser.l
diff options
context:
space:
mode:
Diffstat (limited to 'parser.l')
-rw-r--r--parser.l18
1 files changed, 9 insertions, 9 deletions
diff --git a/parser.l b/parser.l
index ddc2b5d4..ba907888 100644
--- a/parser.l
+++ b/parser.l
@@ -237,12 +237,8 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
return NUMBER;
}
-<SPECIAL>({FLO}|{FLODOT}){TOK} |
-<BRACED>({FLO}|{FLODOT}){BTOK} |
-<NESTED>({FLO}|{FLODOT}){NTOK} {
- val str = string_utf8(yytext);
-
- yyerrorf(lit("trailing junk in floating-point literal: ~a"), str, nao);
+<SPECIAL,NESTED,BRACED>{FLO} {
+ val str = string_own(utf8_dup_from(yytext));
if (yy_top_state() == INITIAL
|| yy_top_state() == QSILIT)
@@ -252,7 +248,7 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
return NUMBER;
}
-<SPECIAL,NESTED,BRACED>{FLO} {
+<SPECIAL,NESTED,BRACED>{FLODOT}/[^.] {
val str = string_own(utf8_dup_from(yytext));
if (yy_top_state() == INITIAL
@@ -263,8 +259,12 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U}
return NUMBER;
}
-<SPECIAL,NESTED,BRACED>{FLODOT}/[^.] {
- val str = string_own(utf8_dup_from(yytext));
+<SPECIAL>({FLO}|{FLODOT}){TOK} |
+<BRACED>({FLO}|{FLODOT}){BTOK} |
+<NESTED>({FLO}|{FLODOT}){NTOK} {
+ val str = string_utf8(yytext);
+
+ yyerrorf(lit("trailing junk in floating-point literal: ~a"), str, nao);
if (yy_top_state() == INITIAL
|| yy_top_state() == QSILIT)