From: Joel E. Denny Date: Thu, 30 Apr 2009 05:04:33 +0000 (-0400) Subject: Convert underscores to dashes in some %define variable names. X-Git-Tag: v2.7.90~878 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/6721294104e47dd932e755d4d5352407859a4663?hp=ba5c6d94b602e77be718705fdb70aed255d41e6a 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_push_parser): 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. (cherry picked from commit 812775a0391e122eff1983afea2da96c600c7307) Conflicts: data/c.m4 etc/bench.pl.in src/parse-gram.c src/parse-gram.h tests/conflicts.at --- diff --git a/ChangeLog b/ChangeLog index 11d5a15c..bfab04cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,31 @@ +2009-04-30 Joel E. Denny + + 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_push_parser): 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. + 2009-04-30 Joel E. Denny Set all front-end %define defaults in one place. diff --git a/NEWS b/NEWS index e246242a..b9ce898c 100644 --- a/NEWS +++ b/NEWS @@ -55,6 +55,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 5df04cbb..6a9d577e 100644 --- a/data/c.m4 +++ b/data/c.m4 @@ -54,7 +54,7 @@ m4_define([b4_comment], [b4_c_comment($@)]) # ----------------- # 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 c0150c4c..52c8fae6 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -20,13 +20,13 @@ m4_pushdef([b4_copyright_years], # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# 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 f2376f2b..6ec83ade 100644 --- a/doc/bison.texinfo +++ b/doc/bison.texinfo @@ -4569,7 +4569,7 @@ valid grammar. @subsection A Push Parser @cindex push parser @cindex push parser -@findex %define api.push_pull +@findex %define api.push-pull (The current push parsing interface is experimental and may evolve. More user feedback will help to stabilize it.) @@ -4585,10 +4585,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 @@ -4599,7 +4599,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 @@ -4648,14 +4648,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 -@code{%define api.push_pull "both"} declaration. Doing this will create all of +you should replace the @code{%define api.push-pull "push"} declaration with the +@code{%define 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 -@code{%define api.push_pull "both"} declaration slower than the normal +@code{%define 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 @@ -4672,8 +4672,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 -@code{%define api.push_pull "push"}. +the generated parser with @code{%define api.push-pull "both"} as it did for +@code{%define api.push-pull "push"}. @node Decl Summary @subsection Bison Declaration Summary @@ -4896,8 +4896,8 @@ Some of the accepted @var{variable}s are: @end itemize @c api.pure -@item api.push_pull -@findex %define api.push_pull +@item api.push-pull +@findex %define api.push-pull @itemize @bullet @item Language(s): C (deterministic parsers only) @@ -4911,7 +4911,7 @@ More user feedback will help to stabilize it.) @item Default Value: @code{"pull"} @end itemize -@c api.push_pull +@c api.push-pull @item error-verbose @findex %define error-verbose @@ -4995,8 +4995,8 @@ without performing any extra reductions. @end itemize @end itemize -@item lr.keep_unreachable_states -@findex %define lr.keep_unreachable_states +@item lr.keep-unreachable-states +@findex %define lr.keep-unreachable-states @itemize @bullet @item Language(s): all @@ -5037,7 +5037,7 @@ states. However, Bison does not compute which goto actions are useless. @end itemize @end itemize -@c lr.keep_unreachable_states +@c lr.keep-unreachable-states @item lr.type @findex %define lr.type @@ -5529,8 +5529,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 -@code{%define api.push_pull "both"} declaration is used. +function is available if either the @code{%define api.push-pull "push"} or +@code{%define api.push-pull "both"} declaration is used. @xref{Push Decl, ,A Push Parser}. @deftypefun int yypush_parse (yypstate *yyps) @@ -5547,7 +5547,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}. @@ -5563,8 +5563,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 -@code{%define api.push_pull "both"} declaration is used. +This function is available if either the @code{%define api.push-pull "push"} or +@code{%define api.push-pull "both"} declaration is used. @xref{Push Decl, ,A Push Parser}. @deftypefun yypstate *yypstate_new (void) @@ -5582,8 +5582,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 -@code{%define api.push_pull "both"} declaration is used. +function is available if either the @code{%define api.push-pull "push"} or +@code{%define api.push-pull "both"} declaration is used. @xref{Push Decl, ,A Push Parser}. @deftypefun void yypstate_delete (yypstate *yyps) @@ -9054,7 +9054,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 b6143c08..2290fd28 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. # @@ -891,7 +891,7 @@ sub bench_push_parser () qw( [ %d api.pure ] & - [ %d api.push_pull=both ] + [ %d api.push-pull=both ] )); } diff --git a/src/files.c b/src/files.c index 07f761b4..41e2453b 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 467bb4ee..e5b016a6 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -671,3 +671,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 32135b5e..8c624d76 100644 --- a/src/getargs.h +++ b/src/getargs.h @@ -136,4 +136,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 7a9a49d8..c8dc696e 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 90f1c3d7..b998ad6c 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); } /* This is used for backward compatibility, e.g., "%define api.pure" diff --git a/src/parse-gram.c b/src/parse-gram.c index 2b806f54..44e62a2c 100644 --- a/src/parse-gram.c +++ b/src/parse-gram.c @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 2.4.307-8f0d-dirty. */ +/* A Bison parser, made by GNU Bison 2.4.311-ba5c-dirty. */ /* Implementation for Bison's Yacc-like parsers in C @@ -45,7 +45,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.4.307-8f0d-dirty" +#define YYBISON_VERSION "2.4.311-ba5c-dirty" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" diff --git a/src/parse-gram.h b/src/parse-gram.h index 1163bbdc..fccdc8d2 100644 --- a/src/parse-gram.h +++ b/src/parse-gram.h @@ -1,4 +1,4 @@ -/* A Bison parser, made by GNU Bison 2.4.307-8f0d-dirty. */ +/* A Bison parser, made by GNU Bison 2.4.311-ba5c-dirty. */ /* Interface for Bison's Yacc-like parsers in C diff --git a/src/reader.c b/src/reader.c index 9540a8d7..f20d3ca0 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 afbb251a..5ad0507d 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 @@ -575,7 +575,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 28a1c82c..4c046dc7 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, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2005, 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 @@ -869,7 +870,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 3d59fc22..cb3bfd87 100644 --- a/tests/input.at +++ b/tests/input.at @@ -945,18 +945,59 @@ 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 70c1fdce..bf48c682 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 af13e16f..0db3830b 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 753fc919..91b3b1b9 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"]])