* src/parse-gram.y: Include quotearg.h.

(string_as_id): Quote $1 before using it as a key, since the
lexer no longer quotes it for us.
(string_content): Don't strip quotes, since lexer no longer
quotes it for us.
* src/scan-gram.l: Include quotearg.h.
("\""): Omit quote.
("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
a key, since the rest of the lexer doesn't quote it.
* src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
* tests/regression.at (Token definitions): Check for backslashes
in token strings.
This commit is contained in:
Paul Eggert
2005-04-16 06:32:51 +00:00
parent 506ffb1f74
commit ca407bdf9d
5 changed files with 63 additions and 17 deletions

View File

@@ -475,8 +475,7 @@ symbol_get (const char *key, location loc)
symbol probe;
symbol *entry;
/* Keep the symbol in a printable form. */
key = uniqstr_new (quotearg_style (escape_quoting_style, key));
key = uniqstr_new (key);
probe.tag = key;
entry = hash_lookup (symbol_table, &probe);