mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23:33:03 +00:00
2006-10-08 Paolo Bonzini <bonzini@gnu.org>
* data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
b4_define_user_cde and uses): Remove.
(b4_comment, b4_prefix, b4_sync_start): New.
* data/bison.m4: New file, with most of the content removed from c.m4.
* src/muscle_tab.h: Use "do {...} while(0)" throughout.
* src/output.c (output_skeleton): Pass bison.m4.
(prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
only if specified.
This commit is contained in:
@@ -33,34 +33,34 @@ void muscle_free (void);
|
||||
extern struct obstack muscle_obstack;
|
||||
|
||||
#define MUSCLE_INSERT_BOOL(Key, Value) \
|
||||
{ \
|
||||
do { \
|
||||
int v = Value; \
|
||||
MUSCLE_INSERT_INT (Key, v); \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define MUSCLE_INSERT_INT(Key, Value) \
|
||||
{ \
|
||||
do { \
|
||||
obstack_fgrow1 (&muscle_obstack, "%d", Value); \
|
||||
obstack_1grow (&muscle_obstack, 0); \
|
||||
muscle_insert (Key, obstack_finish (&muscle_obstack)); \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define MUSCLE_INSERT_LONG_INT(Key, Value) \
|
||||
{ \
|
||||
do { \
|
||||
obstack_fgrow1 (&muscle_obstack, "%ld", Value); \
|
||||
obstack_1grow (&muscle_obstack, 0); \
|
||||
muscle_insert (Key, obstack_finish (&muscle_obstack)); \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define MUSCLE_INSERT_STRING(Key, Value) \
|
||||
{ \
|
||||
do { \
|
||||
obstack_sgrow (&muscle_obstack, Value); \
|
||||
obstack_1grow (&muscle_obstack, 0); \
|
||||
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) \
|
||||
@@ -71,16 +71,16 @@ extern struct obstack muscle_obstack;
|
||||
case ']': obstack_sgrow (Obstack, "@}" ); break; \
|
||||
default: obstack_1grow (Obstack, *p); break; \
|
||||
} \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
#define MUSCLE_INSERT_C_STRING(Key, Value) \
|
||||
{ \
|
||||
do { \
|
||||
MUSCLE_OBSTACK_SGROW (&muscle_obstack, \
|
||||
quotearg_style (c_quoting_style, \
|
||||
Value)); \
|
||||
obstack_1grow (&muscle_obstack, 0); \
|
||||
muscle_insert (Key, obstack_finish (&muscle_obstack)); \
|
||||
}
|
||||
} while(0)
|
||||
|
||||
/* Append VALUE to the current value of KEY. If KEY did not already
|
||||
exist, create it. Use MUSCLE_OBSTACK. De-allocate the previously
|
||||
|
||||
Reference in New Issue
Block a user