Le 23 avr. 09 à 10:19, Joel E. Denny a écrit :
Hi Joel,
+ /* We need a lookahead either to distinguish different
reductions
+ (i.e., there are two or more), or to distinguish a
reduction from a
+ shift. Otherwise, it is straightforward, and the state is
+ `consistent'. However, for states that have any rules,
treat only
I don't understand "states that have any rules".
It's been a couple of years since I wrote that, but I believe I was
trying
to be consistent with "default rules". I agree it's ugly for many
reasons. I will change it to "states that have any reductions".
I realize now that the sentence is clearer if the phrase is completely
removed, so I removed it. That's probably what you were telling
me. Let
me know if it's still not clear.
Perfect.
From 783b0f0a2d5e46696906fb6300695e5b384a7f78 Mon Sep 17 00:00:00
2001
From: Joel E. Denny <[email protected]>
Date: Thu, 23 Apr 2009 03:18:03 -0400
Subject: [PATCH] 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.
Wow, that change was much larger than I anticipated. But it is
definitely an improvement, thanks!