diff options
Diffstat (limited to 'lexer.l')
-rw-r--r-- | lexer.l | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -95,8 +95,13 @@ DEC [0-9]+ "\"" BEGIN(QUOTED); <QUOTED>[^\"]+ { - yylval.sval = strdup(yytext); - return QSTRING; + if (strlen(yytext) == 1) { + yylval.ival = *yytext; + return NUMBER; + } else { + yylval.sval = strdup(yytext); + return QSTRING; + } } <QUOTED>"\"" BEGIN(INITIAL); |