diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2011-12-07 09:05:38 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2011-12-07 09:05:38 -0800 |
commit | 46dea2737dcd5d74585878459999f230f2d002bc (patch) | |
tree | d944afa3d26f8a6445939770a17e83526ec332ab | |
parent | b3540d10efec1c3d27d0206d67635eaeb39141ec (diff) | |
download | txr-46dea2737dcd5d74585878459999f230f2d002bc.tar.gz txr-46dea2737dcd5d74585878459999f230f2d002bc.tar.bz2 txr-46dea2737dcd5d74585878459999f230f2d002bc.zip |
* parser.l: In the CHRLIT state, return a nonblank character as an
IDENT token. This allows for character literals like #\$.
-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++; |