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:
Joel E. Denny
2009-04-23 03:18:03 -04:00
parent 34a6c2d19b
commit 620b572773
17 changed files with 339 additions and 302 deletions

View File

@@ -1,5 +1,5 @@
/* Prepare the LALR and GLR parser tables.
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Copyright (C) 2002, 2004, 2009 Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
@@ -45,9 +45,9 @@
YYSTOS[S] = the symbol number of the symbol that leads to state S.
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.
YYDEFGOTO[I] = default state to go to after a reduction of a rule
that generates variable NTOKENS + I, except when YYTABLE specifies