mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Add maintainer-push-check to run maintainer-check using push parsing in
place of pull parsing where available. * Makefile.am (maintainer-push-check): New. * data/bison.m4 (b4_use_push_for_pull_if): New. * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if appropriately based on their existing values. (yypush_parse): Don't print push-parser-specific diagnostics if push parsing is being used in place of pull parsing. * data/yacc.c: If push parsing should replace pull parsing, redirect to push.c. * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment variable, and insert b4_use_push_for_pull_flag into muscles. * tests/Makefile.am (maintainer-push-check): New.
This commit is contained in:
12
src/output.c
12
src/output.c
@@ -1,7 +1,7 @@
|
||||
/* Output the generated parsing program for Bison.
|
||||
|
||||
Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006 Free Software Foundation, Inc.
|
||||
2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of Bison, the GNU Compiler Compiler.
|
||||
|
||||
@@ -586,6 +586,15 @@ output_skeleton (void)
|
||||
static void
|
||||
prepare (void)
|
||||
{
|
||||
/* BISON_USE_PUSH_FOR_PULL is for the test suite and should not be documented
|
||||
for the user. */
|
||||
char const *use_push_for_pull_env = getenv ("BISON_USE_PUSH_FOR_PULL");
|
||||
bool use_push_for_pull_flag = false;
|
||||
if (use_push_for_pull_env != NULL
|
||||
&& use_push_for_pull_env[0] != '\0'
|
||||
&& 0 != strcmp (use_push_for_pull_env, "0"))
|
||||
use_push_for_pull_flag = true;
|
||||
|
||||
/* Flags. */
|
||||
MUSCLE_INSERT_BOOL ("debug_flag", debug_flag);
|
||||
MUSCLE_INSERT_BOOL ("defines_flag", defines_flag);
|
||||
@@ -595,6 +604,7 @@ prepare (void)
|
||||
MUSCLE_INSERT_BOOL ("nondeterministic_flag", nondeterministic_parser);
|
||||
MUSCLE_INSERT_BOOL ("pull_flag", pull_parser);
|
||||
MUSCLE_INSERT_BOOL ("pure_flag", pure_parser);
|
||||
MUSCLE_INSERT_BOOL ("use_push_for_pull_flag", use_push_for_pull_flag);
|
||||
MUSCLE_INSERT_BOOL ("push_flag", push_parser);
|
||||
MUSCLE_INSERT_BOOL ("synclines_flag", !no_lines_flag);
|
||||
MUSCLE_INSERT_BOOL ("tag_seen_flag", tag_seen);
|
||||
|
||||
Reference in New Issue
Block a user