mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 05:43:03 +00:00
Rename "default rule" to "default reduction".
This includes changing variable names in code, changing comments, and renaming %define lr.default_rules to %define lr.default_reductions. * NEWS (2.5): Update IELR documentation. * data/glr.c, data/lalr1.cc, data/lalr1.java, data/yacc.c: Adjust YYDEFACT and yydefact_ documentation. * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions and lr.type documentation. Make some other wording improvements. (Glossary): Adjust cross-references and Default Reduction definition. * src/lalr.c (state_lookahead_tokens_count): Adjust code. Remove a confusing comment pointed out by Akim Demaille. (initialize_LA): Adjust code. * src/print-xml.c (print_reductions): Adjust code. * src/print.c (print_reductions): Adjust code. * src/reader.c (reader): Adjust code. * src/tables.c (action_row): Adjust code. (token_actions): Adjust code. * src/tables.h: Adjust YYDEFACT documentation. * tests/input.at (%define lr.default_rules invalid values): Rename test group to... (%define lr.default_reductions invalid values): ... this, and update grammar file and expected output. * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to... (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
This commit is contained in:
14
data/glr.c
14
data/glr.c
@@ -1,8 +1,8 @@
|
||||
-*- C -*-
|
||||
|
||||
# GLR skeleton for Bison
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||
# Foundation, Inc.
|
||||
# Copyright (C) 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
|
||||
@@ -150,7 +150,7 @@ m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison GLR parsers in C],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009])
|
||||
[
|
||||
/* C GLR parser skeleton written by Paul Hilfinger. */
|
||||
|
||||
@@ -412,9 +412,9 @@ static const ]b4_int_type_for([b4_merger])[ yymerger[] =
|
||||
]b4_merger[
|
||||
};
|
||||
|
||||
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
|
||||
doesn't specify something else to do. Zero means the default is an
|
||||
error. */
|
||||
/* YYDEFACT[S] -- default reduction number in state S. Performed when
|
||||
YYTABLE doesn't specify something else to do. Zero means the default
|
||||
is an error. */
|
||||
static const ]b4_int_type_for([b4_defact])[ yydefact[] =
|
||||
{
|
||||
]b4_defact[
|
||||
@@ -2639,7 +2639,7 @@ m4_if(b4_skeleton, ["glr.c"],
|
||||
[b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison GLR parsers in C],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009])
|
||||
|
||||
b4_shared_declarations
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# C++ skeleton for Bison
|
||||
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
@@ -35,7 +35,7 @@ m4_divert_push(0)dnl
|
||||
b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009])
|
||||
dnl FIXME: This is wrong, we want computed header guards.
|
||||
[
|
||||
/* C++ LALR(1) parser skeleton written by Akim Demaille. */
|
||||
@@ -197,7 +197,7 @@ b4_error_verbose_if([, int tok])[);
|
||||
static const ]b4_int_type_for([b4_pact])[ yypact_[];
|
||||
static const ]b4_int_type(b4_pact_ninf, b4_pact_ninf)[ yypact_ninf_;
|
||||
|
||||
/// For a state, default rule to reduce.
|
||||
/// For a state, default reduction number.
|
||||
/// Unless\a yytable_ specifies something else to do.
|
||||
/// Zero means the default is an error.
|
||||
static const ]b4_int_type_for([b4_defact])[ yydefact_[];
|
||||
@@ -300,7 +300,7 @@ b4_percent_code_get([[provides]])[]dnl
|
||||
])dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009])
|
||||
b4_percent_code_get([[top]])[]dnl
|
||||
m4_if(b4_prefix, [yy], [],
|
||||
[
|
||||
@@ -889,9 +889,9 @@ b4_error_verbose_if([, int tok])[)
|
||||
]b4_pact[
|
||||
};
|
||||
|
||||
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
|
||||
doesn't specify something else to do. Zero means the default is an
|
||||
error. */
|
||||
/* YYDEFACT[S] -- default reduction number in state S. Performed when
|
||||
YYTABLE doesn't specify something else to do. Zero means the
|
||||
default is an error. */
|
||||
const ]b4_int_type_for([b4_defact])[
|
||||
]b4_parser_class_name[::yydefact_[] =
|
||||
{
|
||||
@@ -1057,7 +1057,7 @@ b4_error_verbose_if([, int tok])[)
|
||||
dnl
|
||||
@output(b4_dir_prefix[]stack.hh@)@
|
||||
b4_copyright([Stack handling for Bison parsers in C++],
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008])[
|
||||
[2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009])[
|
||||
|
||||
#ifndef BISON_STACK_HH
|
||||
# define BISON_STACK_HH
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Java skeleton for Bison -*- autoconf -*-
|
||||
|
||||
# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 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
|
||||
@@ -25,7 +25,7 @@ m4_ifval(m4_defn([b4_symbol_destructors]),
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison LALR(1) parsers in Java],
|
||||
[2007, 2008])
|
||||
[2007, 2008, 2009])
|
||||
|
||||
b4_percent_define_ifdef([package], [package b4_percent_define_get([package]);
|
||||
])[/* First part of user declarations. */
|
||||
@@ -732,9 +732,9 @@ m4_popdef([b4_at_dollar])])dnl
|
||||
]b4_pact[
|
||||
};
|
||||
|
||||
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
|
||||
doesn't specify something else to do. Zero means the default is an
|
||||
error. */
|
||||
/* YYDEFACT[S] -- default reduction number in state S. Performed when
|
||||
YYTABLE doesn't specify something else to do. Zero means the
|
||||
default is an error. */
|
||||
private static final ]b4_int_type_for([b4_defact])[ yydefact_[] =
|
||||
{
|
||||
]b4_defact[
|
||||
|
||||
12
data/yacc.c
12
data/yacc.c
@@ -3,7 +3,7 @@
|
||||
# Yacc compatible skeleton for Bison
|
||||
|
||||
# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
|
||||
# 2007, 2008 Free Software Foundation, Inc.
|
||||
# 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
|
||||
@@ -155,7 +155,8 @@ m4_changecom()
|
||||
m4_divert_push(0)dnl
|
||||
@output(b4_parser_file_name@)@
|
||||
b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],dnl '
|
||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])[
|
||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
2009])[
|
||||
|
||||
/* C LALR(1) parser skeleton written by Richard Stallman, by
|
||||
simplifying the original so-called "semantic" parser. */
|
||||
@@ -547,8 +548,8 @@ static const ]b4_int_type_for([b4_r2])[ yyr2[] =
|
||||
]b4_r2[
|
||||
};
|
||||
|
||||
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
|
||||
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
|
||||
/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
|
||||
Performed when YYTABLE doesn't specify something else to do. Zero
|
||||
means the default is an error. */
|
||||
static const ]b4_int_type_for([b4_defact])[ yydefact[] =
|
||||
{
|
||||
@@ -1676,7 +1677,8 @@ yypushreturn:
|
||||
b4_defines_if(
|
||||
[@output(b4_spec_defines_file@)@
|
||||
b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],dnl '
|
||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])
|
||||
[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
2009])
|
||||
|
||||
b4_percent_code_get([[requires]])[]dnl
|
||||
|
||||
|
||||
Reference in New Issue
Block a user