mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 21:03:04 +00:00
Convert underscores to dashes in some %define variable names.
For now, just api.push-pull and lr.keep-unreachable-states. Maintain old names for backward compatibility. * NEWS (2.5): Document. * data/c.m4 (b4_identification): Update comment. * data/yacc.c: Update access. * doc/bison.texinfo: Update. * etc/bench.pl.in (bench_grammar): Update use. * src/files.c (tr): Move to... * src/getargs.c, src/getargs.h (tr): ... here because I can't think of a better place to expose it. My logic is that, for all uses of tr so far, command-line arguments can be involved, and getargs.h is already included. * src/main.c (main): Update access. * src/muscle_tab.c (muscle_percent_define_insert): Convert old variable names to new variable names before assigning value. * src/reader.c (reader): Update setting default. * tests/calc.at: Update uses. * tests/conflicts.at (Unreachable States After Conflict Resolution): Update use. * tests/input.at (%define enum variables): Update use. (%define backward compatibility): New test group. * tests/push.at: Update uses. * tests/reduce.at: Update uses. * tests/torture.at: Update uses.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
-*- Autoconf -*-
|
||||
|
||||
# C M4 Macros for Bison.
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
# Copyright (C) 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
|
||||
# Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -31,7 +31,7 @@ m4_define([b4_comment], [/* m4_bpatsubst([$1], [
|
||||
# -----------------
|
||||
# Depends on individual skeletons to define b4_pure_flag, b4_push_flag, or
|
||||
# b4_pull_flag if they use the values of the %define variables api.pure or
|
||||
# api.push_pull.
|
||||
# api.push-pull.
|
||||
m4_define([b4_identification],
|
||||
[[/* Identify Bison output. */
|
||||
#define YYBISON 1
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Check the value of %define api.push_pull.
|
||||
b4_percent_define_default([[api.push_pull]], [[pull]])
|
||||
b4_percent_define_check_values([[[[api.push_pull]],
|
||||
# Check the value of %define api.push-pull.
|
||||
b4_percent_define_default([[api.push-pull]], [[pull]])
|
||||
b4_percent_define_check_values([[[[api.push-pull]],
|
||||
[[pull]], [[push]], [[both]]]])
|
||||
b4_define_flag_if([pull]) m4_define([b4_pull_flag], [[1]])
|
||||
b4_define_flag_if([push]) m4_define([b4_push_flag], [[1]])
|
||||
m4_case(b4_percent_define_get([[api.push_pull]]),
|
||||
m4_case(b4_percent_define_get([[api.push-pull]]),
|
||||
[pull], [m4_define([b4_push_flag], [[0]])],
|
||||
[push], [m4_define([b4_pull_flag], [[0]])])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user