diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | parser.l | 5 |
2 files changed, 10 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2011-12-07 Kaz Kylheku <kaz@kylheku.com> + * parser.l: In the CHRLIT state, return a nonblank character as an + IDENT token. This allows for character literals like #\$. + +2011-12-07 Kaz Kylheku <kaz@kylheku.com> + * eval.c (eval_init): New character functions registered. * lib.c (c_num): Generalized to convert characters to numbers also. @@ -585,6 +585,11 @@ UONLY {U2}{U}|{U3}{U}{U}|{U4}{U}{U}{U} return IDENT; } +<CHRLIT>[^ \t\n] { + yylval.lexeme = utf8_dup_from(yytext); + return IDENT; /* hack */ + } + <STRLIT>\n { yyerrprepf(lit("newline in string literal"), nao); lineno++; |