muscles: fix incorrect decoding of $

Bug introduced in 458171e6df.
https://lists.gnu.org/archive/html/bison-patches/2013-11/msg00009.html

Reported by Ahcheong Lee.
https://lists.gnu.org/r/bug-bison/2020-03/msg00010.html

* src/muscle-tab.c (COMMON_DECODE): "$" is coded as "$][", not "$[][".
* tests/input.at ("%define" enum variables): Check that case.
This commit is contained in:
Akim Demaille
2020-03-07 07:41:47 +01:00
parent 641e326303
commit b82b387da9
3 changed files with 22 additions and 4 deletions

View File

@@ -292,7 +292,6 @@ muscle_location_grow (char const *key, location loc)
#define COMMON_DECODE(Value) \
case '$': \
++(Value); aver (*(Value) == '['); \
++(Value); aver (*(Value) == ']'); \
++(Value); aver (*(Value) == '['); \
obstack_sgrow (&muscle_obstack, "$"); \