mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 23:03:04 +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:
@@ -35,9 +35,6 @@
|
||||
#include "getargs.h"
|
||||
#include "gram.h"
|
||||
|
||||
struct obstack pre_prologue_obstack;
|
||||
struct obstack post_prologue_obstack;
|
||||
|
||||
/* Initializing some values below (such SPEC_NAME_PREFIX to `yy') is
|
||||
tempting, but don't do that: for the time being our handling of the
|
||||
%directive vs --option leaves precedence to the options by deciding
|
||||
|
||||
Reference in New Issue
Block a user