bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Convert underscores to dashes in some %define variable names.


From: Joel E. Denny
Subject: [PATCH] Convert underscores to dashes in some %define variable names.
Date: Thu, 30 Apr 2009 03:58:23 -0400 (EDT)

I know we're waiting until at least 2.6 for most of the renaming, but I 
feel the following couple of renames are stable enough:

1. api.push_pull -> api.push-pull.  It hasn't evolved for a while.  
Besides, it's still labeled experimental.

2. lr.keep_unreachable_states -> lr.keep-unreachable-states.  It's a 
Boolean, unfortunately, but I think it's obscure enough that it won't 
evolve any time soon.

The old names are deprecated but still supported.

I pushed the following patch to branch-2.5 and a similar one to master.

>From 812775a0391e122eff1983afea2da96c600c7307 Mon Sep 17 00:00:00 2001
From: Joel E. Denny <address@hidden>
Date: Thu, 30 Apr 2009 01:04:33 -0400
Subject: [PATCH] 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.

diff --git a/NEWS b/NEWS
index 80b49da..edb1610 100644
--- a/NEWS
+++ b/NEWS
@@ -47,6 +47,21 @@ Bison News
   for any NAME and VALUE.  Omitting `=VALUE' on the command line is
   equivalent to omitting `"VALUE"' in the declaration.
 
+** %define variables renamed.
+
+  The following %define variables
+
+    api.push_pull
+    lr.keep_unreachable_states
+
+  have been renamed to
+
+    api.push-pull
+    lr.keep-unreachable-states
+
+  The old names are now deprecated but will be maintained indefinitely
+  for backward compatibility.
+
 ** Temporary hack for adding a semicolon to the user action.
 
   Previously, Bison appended a semicolon to every user action for
diff --git a/data/c.m4 b/data/c.m4
index 1fe4bc5..39b6e58 100644
--- a/data/c.m4
+++ b/data/c.m4
@@ -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
diff --git a/data/yacc.c b/data/yacc.c
index 3c7c602..76a1baa 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -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]])])
 
diff --git a/doc/bison.texinfo b/doc/bison.texinfo
index a81f9cf..99cd38f 100644
--- a/doc/bison.texinfo
+++ b/doc/bison.texinfo
@@ -4561,7 +4561,7 @@ valid grammar.
 @subsection A Push Parser
 @cindex push parser
 @cindex push parser
address@hidden %define api.push_pull
address@hidden %define api.push-pull
 
 (The current push parsing interface is experimental and may evolve.
 More user feedback will help to stabilize it.)
@@ -4577,10 +4577,10 @@ within a certain time period.
 
 Normally, Bison generates a pull parser.
 The following Bison declaration says that you want the parser to be a push
-parser (@pxref{Decl Summary,,%define api.push_pull}):
+parser (@pxref{Decl Summary,,%define api.push-pull}):
 
 @example
-%define api.push_pull "push"
+%define api.push-pull "push"
 @end example
 
 In almost all cases, you want to ensure that your push parser is also
@@ -4591,7 +4591,7 @@ what you are doing, your declarations should look like 
this:
 
 @example
 %define api.pure
-%define api.push_pull "push"
+%define api.push-pull "push"
 @end example
 
 There is a major notable functional difference between the pure push parser
@@ -4640,14 +4640,14 @@ for use by the next invocation of the 
@code{yypush_parse} function.
 
 Bison also supports both the push parser interface along with the pull parser
 interface in the same generated parser.  In order to get this functionality,
-you should replace the @code{%define api.push_pull "push"} declaration with the
address@hidden api.push_pull "both"} declaration.  Doing this will create all of
+you should replace the @code{%define api.push-pull "push"} declaration with the
address@hidden api.push-pull "both"} declaration.  Doing this will create all of
 the symbols mentioned earlier along with the two extra symbols, @code{yyparse}
 and @code{yypull_parse}.  @code{yyparse} can be used exactly as it normally
 would be used.  However, the user should note that it is implemented in the
 generated parser by calling @code{yypull_parse}.
 This makes the @code{yyparse} function that is generated with the
address@hidden api.push_pull "both"} declaration slower than the normal
address@hidden api.push-pull "both"} declaration slower than the normal
 @code{yyparse} function.  If the user
 calls the @code{yypull_parse} function it will parse the rest of the input
 stream.  It is possible to @code{yypush_parse} tokens to select a subgrammar
@@ -4664,8 +4664,8 @@ yypstate_delete (ps);
 @end example
 
 Adding the @code{%define api.pure} declaration does exactly the same thing to
-the generated parser with @code{%define api.push_pull "both"} as it did for
address@hidden api.push_pull "push"}.
+the generated parser with @code{%define api.push-pull "both"} as it did for
address@hidden api.push-pull "push"}.
 
 @node Decl Summary
 @subsection Bison Declaration Summary
@@ -4887,8 +4887,8 @@ Some of the accepted @var{variable}s are:
 @item Default Value: @code{"false"}
 @end itemize
 
address@hidden api.push_pull
address@hidden %define api.push_pull
address@hidden api.push-pull
address@hidden %define api.push-pull
 
 @itemize @bullet
 @item Language(s): C (deterministic parsers only)
@@ -4968,8 +4968,8 @@ without performing any extra reductions.
 @end itemize
 @end itemize
 
address@hidden lr.keep_unreachable_states
address@hidden %define lr.keep_unreachable_states
address@hidden lr.keep-unreachable-states
address@hidden %define lr.keep-unreachable-states
 
 @itemize @bullet
 @item Language(s): all
@@ -5467,8 +5467,8 @@ exp: @dots{}    @{ @dots{}; *randomness += 1; @dots{} @}
 More user feedback will help to stabilize it.)
 
 You call the function @code{yypush_parse} to parse a single token.  This
-function is available if either the @code{%define api.push_pull "push"} or
address@hidden api.push_pull "both"} declaration is used.
+function is available if either the @code{%define api.push-pull "push"} or
address@hidden api.push-pull "both"} declaration is used.
 @xref{Push Decl, ,A Push Parser}.
 
 @deftypefun int yypush_parse (yypstate *yyps)
@@ -5485,7 +5485,7 @@ is required to finish parsing the grammar.
 More user feedback will help to stabilize it.)
 
 You call the function @code{yypull_parse} to parse the rest of the input
-stream.  This function is available if the @code{%define api.push_pull "both"}
+stream.  This function is available if the @code{%define api.push-pull "both"}
 declaration is used.
 @xref{Push Decl, ,A Push Parser}.
 
@@ -5501,8 +5501,8 @@ The value returned by @code{yypull_parse} is the same as 
for @code{yyparse}.
 More user feedback will help to stabilize it.)
 
 You call the function @code{yypstate_new} to create a new parser instance.
-This function is available if either the @code{%define api.push_pull "push"} or
address@hidden api.push_pull "both"} declaration is used.
+This function is available if either the @code{%define api.push-pull "push"} or
address@hidden api.push-pull "both"} declaration is used.
 @xref{Push Decl, ,A Push Parser}.
 
 @deftypefun yypstate *yypstate_new (void)
@@ -5520,8 +5520,8 @@ allocated.
 More user feedback will help to stabilize it.)
 
 You call the function @code{yypstate_delete} to delete a parser instance.
-function is available if either the @code{%define api.push_pull "push"} or
address@hidden api.push_pull "both"} declaration is used.
+function is available if either the @code{%define api.push-pull "push"} or
address@hidden api.push-pull "both"} declaration is used.
 @xref{Push Decl, ,A Push Parser}.
 
 @deftypefun void yypstate_delete (yypstate *yyps)
@@ -8929,7 +8929,7 @@ and @code{%define api.pure} directives does not do 
anything when used in
 Java.
 
 Push parsers are currently unsupported in Java and @code{%define
-api.push_pull} have no effect.
+api.push-pull} have no effect.
 
 @acronym{GLR} parsers are currently unsupported in Java.  Do not use the
 @code{glr-parser} directive.
diff --git a/etc/bench.pl.in b/etc/bench.pl.in
index ca43349..f36691f 100755
--- a/etc/bench.pl.in
+++ b/etc/bench.pl.in
@@ -1,6 +1,6 @@
 #! /usr/bin/perl -w
 
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is part of Bison, the GNU Compiler Compiler.
 #
@@ -343,8 +343,8 @@ sub bench_grammar ($)
     (
      "pull-impure" => '',
      "pull-pure" => '%define api.pure',
-     "push-impure" => '%define api.push_pull "both"',
-     "push-pure" => '%define api.push_pull "both" %define api.pure',
+     "push-impure" => '%define api.push-pull "both"',
+     "push-pure" => '%define api.push-pull "both" %define api.pure',
     );
 
   my %bench;
diff --git a/src/files.c b/src/files.c
index 07f761b..41e2453 100644
--- a/src/files.c
+++ b/src/files.c
@@ -1,7 +1,7 @@
 /* Open and close files for Bison.
 
    Copyright (C) 1984, 1986, 1989, 1992, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is part of Bison, the GNU Compiler Compiler.
 
@@ -136,15 +136,6 @@ xfclose (FILE *ptr)
 | Compute ALL_BUT_EXT, ALL_BUT_TAB_EXT and output files extensions. |
 `------------------------------------------------------------------*/
 
-/* In the string S, replace all characters FROM by TO.  */
-static void
-tr (char *s, char from, char to)
-{
-  for (; *s; s++)
-    if (*s == from)
-      *s = to;
-}
-
 /* Compute extensions from the grammar file extension.  */
 static void
 compute_exts_from_gf (const char *ext)
diff --git a/src/getargs.c b/src/getargs.c
index 2f2e900..962dad4 100644
--- a/src/getargs.c
+++ b/src/getargs.c
@@ -663,3 +663,11 @@ getargs (int argc, char *argv[])
   current_file = grammar_file = uniqstr_new (argv[optind]);
   MUSCLE_INSERT_C_STRING ("file_name", grammar_file);
 }
+
+void
+tr (char *s, char from, char to)
+{
+  for (; *s; s++)
+    if (*s == from)
+      *s = to;
+}
diff --git a/src/getargs.h b/src/getargs.h
index d9d9520..b3a2a9b 100644
--- a/src/getargs.h
+++ b/src/getargs.h
@@ -140,4 +140,7 @@ void getargs (int argc, char *argv[]);
 void language_argmatch (char const *arg, int prio, location loc);
 void skeleton_arg (const char *arg, int prio, location loc);
 
+/** In the string \c s, replace all characters \c from by \c to.  */
+void tr (char *s, char from, char to);
+
 #endif /* !GETARGS_H_ */
diff --git a/src/main.c b/src/main.c
index 5769693..c80ed87 100644
--- a/src/main.c
+++ b/src/main.c
@@ -114,7 +114,7 @@ main (int argc, char *argv[])
      declarations.  */
   timevar_push (TV_CONFLICTS);
   conflicts_solve ();
-  if (!muscle_percent_define_flag_if ("lr.keep_unreachable_states"))
+  if (!muscle_percent_define_flag_if ("lr.keep-unreachable-states"))
     {
       state_number *old_to_new = xnmalloc (nstates, sizeof *old_to_new);
       state_number nstates_old = nstates;
diff --git a/src/muscle_tab.c b/src/muscle_tab.c
index 8e2a3e2..764ea93 100644
--- a/src/muscle_tab.c
+++ b/src/muscle_tab.c
@@ -403,10 +403,20 @@ void
 muscle_percent_define_insert (char const *variable, location variable_loc,
                               char const *value)
 {
+  char *variable_tr = NULL;
   char const *name;
   char const *loc_name;
   char const *syncline_name;
 
+  /* Permit certain names with underscores for backward compatibility.  */
+  if (0 == strcmp (variable, "api.push_pull")
+      || 0 == strcmp (variable, "lr.keep_unreachable_states"))
+    {
+      variable_tr = strdup (variable);
+      tr (variable_tr, '_', '-');
+      variable = variable_tr;
+    }
+
   MUSCLE_USER_NAME_CONVERT (name, "percent_define(", variable, ")");
   MUSCLE_USER_NAME_CONVERT (loc_name, "percent_define_loc(", variable, ")");
   MUSCLE_USER_NAME_CONVERT (syncline_name,
@@ -427,6 +437,8 @@ muscle_percent_define_insert (char const *variable, 
location variable_loc,
   muscle_syncline_grow (syncline_name, variable_loc);
   muscle_user_name_list_grow ("percent_define_user_variables", variable,
                               variable_loc);
+
+  free (variable_tr);
 }
 
 char *
diff --git a/src/reader.c b/src/reader.c
index 2f3cd82..c542a5c 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -556,7 +556,7 @@ reader (void)
   gram_parse ();
 
   /* Set front-end %define variable defaults.  */
-  muscle_percent_define_default ("lr.keep_unreachable_states", "false");
+  muscle_percent_define_default ("lr.keep-unreachable-states", "false");
   {
     char *lr_type;
     /* IELR would be a better default, but LALR is historically the
diff --git a/tests/calc.at b/tests/calc.at
index 5f11858..802d483 100644
--- a/tests/calc.at
+++ b/tests/calc.at
@@ -1,7 +1,7 @@
 # Simple calculator.                         -*- Autotest -*-
 
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free
-# Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+# 2009 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -576,7 +576,7 @@ AT_CHECK_CALC_LALR([%yacc])
 AT_CHECK_CALC_LALR([%error-verbose])
 
 AT_CHECK_CALC_LALR([%define api.pure %locations])
-AT_CHECK_CALC_LALR([%define api.push_pull "both" %define api.pure %locations])
+AT_CHECK_CALC_LALR([%define api.push-pull "both" %define api.pure %locations])
 AT_CHECK_CALC_LALR([%error-verbose %locations])
 
 AT_CHECK_CALC_LALR([%error-verbose %locations %defines %name-prefix "calc" 
%verbose %yacc])
@@ -585,7 +585,7 @@ AT_CHECK_CALC_LALR([%debug])
 AT_CHECK_CALC_LALR([%error-verbose %debug %locations %defines %name-prefix 
"calc" %verbose %yacc])
 
 AT_CHECK_CALC_LALR([%define api.pure %error-verbose %debug %locations %defines 
%name-prefix "calc" %verbose %yacc])
-AT_CHECK_CALC_LALR([%define api.push_pull "both" %define api.pure 
%error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc])
+AT_CHECK_CALC_LALR([%define api.push-pull "both" %define api.pure 
%error-verbose %debug %locations %defines %name-prefix "calc" %verbose %yacc])
 
 AT_CHECK_CALC_LALR([%define api.pure %error-verbose %debug %locations %defines 
%name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} 
%parse-param {int *count}])
 
diff --git a/tests/conflicts.at b/tests/conflicts.at
index 866b944..78a90ad 100644
--- a/tests/conflicts.at
+++ b/tests/conflicts.at
@@ -1,6 +1,7 @@
 # Exercising Bison on conflicts.                         -*- Autotest -*-
 
-# Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 Free Software
+# Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -813,7 +814,7 @@ state 7
 ]])
 
 AT_DATA([[input-keep.y]],
-[[%define lr.keep_unreachable_states
+[[%define lr.keep-unreachable-states
 ]])
 AT_CHECK([[cat input.y >> input-keep.y]])
 
diff --git a/tests/input.at b/tests/input.at
index b1f5f0a..73bf734 100644
--- a/tests/input.at
+++ b/tests/input.at
@@ -951,17 +951,58 @@ input.y:1.9-29: accepted value: `accepting'
 
 # Back-end.
 AT_DATA([[input.y]],
+[[%define api.push-pull "neither"
+%%
+start: ;
+]])
+AT_BISON_CHECK([[input.y]], [1], [],
+[[input.y:1.9-21: invalid value for %define variable `api.push-pull': `neither'
+input.y:1.9-21: accepted value: `pull'
+input.y:1.9-21: accepted value: `push'
+input.y:1.9-21: accepted value: `both'
+]])
+
+AT_CLEANUP
+
+## -------------------------------- ##
+## %define backward compatibility.  ##
+## -------------------------------- ##
+
+AT_SETUP([[%define backward compatibility]])
+
+# The error messages tell us whether underscores in these variables are
+# being converted to dashes.
+
+AT_DATA([[input.y]],
 [[%define api.push_pull "neither"
 %%
 start: ;
 ]])
 AT_BISON_CHECK([[input.y]], [1], [],
-[[input.y:1.9-21: invalid value for %define variable `api.push_pull': `neither'
+[[input.y:1.9-21: invalid value for %define variable `api.push-pull': `neither'
 input.y:1.9-21: accepted value: `pull'
 input.y:1.9-21: accepted value: `push'
 input.y:1.9-21: accepted value: `both'
 ]])
 
+AT_DATA([[input.y]],
+[[%define lr.keep_unreachable_states "maybe"
+%%
+start: ;
+]])
+AT_BISON_CHECK([[input.y]], [1], [],
+[[input.y:1.9-34: invalid value for %define Boolean variable 
`lr.keep-unreachable-states'
+]])
+
+AT_DATA([[input.y]],
+[[%define foo_bar "baz"
+%%
+start: ;
+]])
+AT_BISON_CHECK([[input.y]], [0], [],
+[[input.y:1.9-15: warning: %define variable `foo_bar' is not used
+]])
+
 AT_CLEANUP
 
 ## ------------------------- ##
diff --git a/tests/push.at b/tests/push.at
index 70c1fdc..bf48c68 100644
--- a/tests/push.at
+++ b/tests/push.at
@@ -1,5 +1,5 @@
 # Checking Push Parsing.                            -*- Autotest -*-
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ AT_DATA_GRAMMAR([[input.y]],
   void yyerror (char const *msg);
 %}
 
-%define api.pure %define api.push_pull "push"
+%define api.pure %define api.push-pull "push"
 
 %%
 
@@ -93,7 +93,7 @@ AT_DATA_GRAMMAR([[input.y]],
   int yylex (void);
 %}
 
-%define api.push_pull "]$1["
+%define api.push-pull "]$1["
 
 %%
 
@@ -156,13 +156,13 @@ AT_SETUP([[Push Parsing: Unsupported Skeletons]])
 
 AT_DATA([[input.y]],
 [[%glr-parser
-%define api.push_pull "push"
+%define api.push-pull "push"
 %%
 start: ;
 ]])
 
 AT_BISON_CHECK([[input.y]], [0], [],
-[[input.y:2.9-21: warning: %define variable `api.push_pull' is not used
+[[input.y:2.9-21: warning: %define variable `api.push-pull' is not used
 ]])
 
 AT_CLEANUP
diff --git a/tests/reduce.at b/tests/reduce.at
index af13e16..0db3830 100644
--- a/tests/reduce.at
+++ b/tests/reduce.at
@@ -396,7 +396,7 @@ AT_TEST_LR_TYPE([[Single State Split]],
 [[%left 'a'
 // Conflict resolution renders state 12 unreachable for canonical LR(1).  We
 // keep it so that the paser table diff is easier to code.
-%define lr.keep_unreachable_states]],
+%define lr.keep-unreachable-states]],
 [[
 S: 'a' A 'a' /* rule 1 */
  | 'b' A 'b' /* rule 2 */
@@ -629,7 +629,7 @@ AT_TEST_LR_TYPE([[Lane Split]],
 [[%left 'a'
 // Conflict resolution renders state 16 unreachable for canonical LR(1).  We
 // keep it so that the paser table diff is easier to code.
-%define lr.keep_unreachable_states]],
+%define lr.keep-unreachable-states]],
 [[
 /* Similar to the last test case set but two states must be split.  */
 S: 'a' A 'a' /* rule 1 */
@@ -873,7 +873,7 @@ AT_TEST_LR_TYPE([[Complex Lane Split]],
 [[%left 'a'
 // Conflict resolution renders state 16 unreachable for canonical LR(1).  We
 // keep it so that the paser table diff is easier to code.
-%define lr.keep_unreachable_states]],
+%define lr.keep-unreachable-states]],
 [[
 /* Similar to the last test case set but forseeing the S/R conflict from the
    first state that must be split is becoming difficult.  Imagine if B were
@@ -1139,7 +1139,7 @@ dnl PARSER-EXIT-VALUE, PARSER-STDOUT, PARSER-STDERR
 ]])])
 
 AT_TEST_LR_TYPE([[Split During Added Lookahead Propagation]],
-[[%define lr.keep_unreachable_states]],
+[[%define lr.keep-unreachable-states]],
 [[
 /* The partial state chart diagram below is for LALR(1).  State 0 is the start
    state.  States are iterated for successor construction in numerical order.
diff --git a/tests/torture.at b/tests/torture.at
index 753fc91..91b3b1b 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -1,6 +1,6 @@
 # Torturing Bison.                                    -*- Autotest -*-
-# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2009 Free Software
+# Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -496,7 +496,7 @@ AT_PARSER_CHECK([./input 10000], 2, [], [ignore],
 # just helps guarantee we don't let the YYSTACK_USE_ALLOCA feature affect
 # push parsers.
 AT_DATA_STACK_TORTURE([AT_USE_ALLOCA],
-[[%define api.push_pull "both"
+[[%define api.push-pull "both"
 ]])
 AT_PARSER_CHECK([./input 20], 0, [], [ignore],
                 [[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
@@ -534,7 +534,7 @@ AT_PARSER_CHECK([./input 10000], 2, [], [ignore],
                 [[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
 
 AT_DATA_STACK_TORTURE([AT_USE_ALLOCA],
-[[%define api.push_pull "both"
+[[%define api.push-pull "both"
 ]])
 AT_PARSER_CHECK([./input 20], 0, [], [ignore],
                 [[VALGRIND_OPTS="$VALGRIND_OPTS --log-fd=1"]])
-- 
1.5.4.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]