mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +00:00
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:
@@ -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, "$"); \
|
||||
|
||||
@@ -209,10 +209,10 @@ typedef size_t uintptr_t;
|
||||
|
||||
/* Output Str both quoted for M4 (i.e., embed in [[...]]), and escaped
|
||||
for our postprocessing (i.e., escape M4 special characters). If
|
||||
Str is empty (or NULL), output "[]" instead of "[[]]" as it make M4
|
||||
programming easier (m4_ifval can be used).
|
||||
Str is empty (or NULL), output "[]" instead of "[[]]" as it makes
|
||||
M4 programming easier (m4_ifval can be used).
|
||||
|
||||
For instance "[foo]" -> "[[@{foo@}]]", "$$" -> "[[$][$][]]". */
|
||||
For instance "[foo]" -> "[[@{foo@}]]", "$$" -> "[[$][$][]]". */
|
||||
|
||||
# define obstack_quote(Obs, Str) \
|
||||
do { \
|
||||
|
||||
Reference in New Issue
Block a user