X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/35b8730d018b0bb25f7864d0db20f687ebad11b6..97abf5441273627cd271cb8dbaa646a1946fae4b:/src/muscle_tab.h diff --git a/src/muscle_tab.h b/src/muscle_tab.h index 19fba8b9..941c67e3 100644 --- a/src/muscle_tab.h +++ b/src/muscle_tab.h @@ -1,5 +1,5 @@ /* Muscle table manager for Bison, - Copyright (C) 2001, 2002, 2003, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2006, 2007, 2008 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -33,8 +33,8 @@ extern struct obstack muscle_obstack; #define MUSCLE_INSERT_BOOL(Key, Value) \ do { \ - int v = Value; \ - MUSCLE_INSERT_INT (Key, v); \ + int v__ = Value; \ + MUSCLE_INSERT_INT (Key, v__); \ } while(0) #define MUSCLE_INSERT_INT(Key, Value) \ @@ -51,6 +51,7 @@ do { \ muscle_insert (Key, obstack_finish (&muscle_obstack)); \ } while(0) +/* Key -> Value, but don't apply escaping to Value. */ #define MUSCLE_INSERT_STRING_RAW(Key, Value) \ do { \ obstack_sgrow (&muscle_obstack, Value); \ @@ -58,6 +59,7 @@ do { \ muscle_insert (Key, obstack_finish (&muscle_obstack)); \ } while(0) +/* Key -> Value, applying M4 escaping to Value. */ #define MUSCLE_INSERT_STRING(Key, Value) \ do { \ MUSCLE_OBSTACK_SGROW (&muscle_obstack, Value); \ @@ -65,18 +67,18 @@ do { \ muscle_insert (Key, obstack_finish (&muscle_obstack)); \ } while(0) -#define MUSCLE_OBSTACK_SGROW(Obstack, Value) \ -do { \ - char const *p; \ - for (p = Value; *p; p++) \ - switch (*p) \ - { \ - case '$': obstack_sgrow (Obstack, "$]["); break; \ - case '@': obstack_sgrow (Obstack, "@@" ); break; \ - case '[': obstack_sgrow (Obstack, "@{" ); break; \ - case ']': obstack_sgrow (Obstack, "@}" ); break; \ - default: obstack_1grow (Obstack, *p); break; \ - } \ +#define MUSCLE_OBSTACK_SGROW(Obstack, Value) \ +do { \ + char const *p__; \ + for (p__ = Value; *p__; p__++) \ + switch (*p__) \ + { \ + case '$': obstack_sgrow (Obstack, "$]["); break; \ + case '@': obstack_sgrow (Obstack, "@@" ); break; \ + case '[': obstack_sgrow (Obstack, "@{" ); break; \ + case ']': obstack_sgrow (Obstack, "@}" ); break; \ + default: obstack_1grow (Obstack, *p__); break; \ + } \ } while(0) #define MUSCLE_INSERT_C_STRING(Key, Value) \