mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 06:13:02 +00:00
muscles: fix handling of the "@'" escape
When we use `b4_` or `m4_` somewhere in the input, it is escaped as `b4@'_`/`m4@'_` so that the warning about unexpanded b4_foo/m4_foo macros does not fire. But in the case of muscles, the `@'` escape was not recognized, and an assertion was triggered. Reported by Han Zheng. <https://github.com/akimd/bison/issues/91> * src/muscle-tab.c (COMMON_DECODE): Handle `@'`. * tests/skeletons.at (Suspicious sequences): Check that case.
This commit is contained in:
@@ -294,10 +294,11 @@ muscle_location_grow (char const *key, location loc)
|
||||
case '@': \
|
||||
switch (*++(Value)) \
|
||||
{ \
|
||||
case '@': obstack_sgrow (&muscle_obstack, "@" ); break; \
|
||||
case '{': obstack_sgrow (&muscle_obstack, "[" ); break; \
|
||||
case '}': obstack_sgrow (&muscle_obstack, "]" ); break; \
|
||||
default: aver (false); break; \
|
||||
case '\'': /* Ignore "@'" */ break; \
|
||||
case '@': obstack_sgrow (&muscle_obstack, "@" ); break; \
|
||||
case '{': obstack_sgrow (&muscle_obstack, "[" ); break; \
|
||||
case '}': obstack_sgrow (&muscle_obstack, "]" ); break; \
|
||||
default: aver (false); break; \
|
||||
} \
|
||||
break; \
|
||||
default: \
|
||||
|
||||
Reference in New Issue
Block a user