* tests/regression.at Characters Escapes): New.

* src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept ' in strings and
characters.
Reported by Jan Nieuwenhuizen.
This commit is contained in:
Akim Demaille
2002-10-11 11:23:19 +00:00
parent b7195100fd
commit eb71459201
5 changed files with 149 additions and 111 deletions

View File

@@ -333,6 +333,32 @@ AT_CLEANUP
## -------------------- ##
## Characters Escapes. ##
## -------------------- ##
AT_SETUP([Characters Escapes])
AT_DATA([input.y],
[%{
void yyerror (const char *s);
int yylex (void);
%}
[%%
exp:
'\'' "\'"
| '\"' "\""
| '"' "'"
;
]])
AT_CHECK([bison input.y -o input.c])
AT_COMPILE([input.o], [-c input.c])
AT_CLEANUP
## -------------- ##
## Web2c Report. ##
## -------------- ##