mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +00:00
Simplify union and prologue handling, and escape union and lex/parse
params with digraphs.
* data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
values to the empty string since these are no longer guaranteed
initialized by the front-end.
* data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
braces around b4_user_stype since this is no longer done by the
front-end.
* src/files.c, src/files.h (pre_prologue_obstack,
post_prologue_obstack): Remove.
* src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
with digraphs. This fixes lex params and parse params.
* src/muscle_tab.h (muscle_pair_list_grow): Update comments.
* src/output.c (prepare): Remove muscle insertion of the prologues.
(output): Remove freeing of pre_prologue_obstack and
post_prologue_obstack.
* src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
than prologue_augment for prologue parsing so you don't need prologue
obstacks.
(grammar_declaration): Use `braceless' instead of "{...}" so that
braces are already stripped and code is escaped with digraphs.
* src/reader.c (prologue_augment): Remove.
(reader): Remove initialization of pre_prologue_obstack and
post_prologue_obstack.
* src/reader.h (prologue_augment): Remove.
* data/c.m4: Remove stray parenthesis.
This commit is contained in:
@@ -104,10 +104,9 @@ void muscle_code_grow (const char *key, const char *value, location loc);
|
||||
|
||||
|
||||
/* MUSCLE is an M4 list of pairs. Create or extend it with the pair
|
||||
(A1, A2). Note that because the muscle values are output *double*
|
||||
quoted, one needs to strip the first level of quotes to reach the
|
||||
list itself. */
|
||||
|
||||
(A1, A2) after escaping both values with digraphs. Note that because the
|
||||
muscle values are output *double* quoted, one needs to strip the first level
|
||||
of quotes to reach the list itself. */
|
||||
void muscle_pair_list_grow (const char *muscle,
|
||||
const char *a1, const char *a2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user