summaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-06-23 07:33:03 +0200
committerAkim Demaille <akim.demaille@gmail.com>2020-09-27 09:23:51 +0200
commita0b044186b4ec990a536aa323170b7591688cd2b (patch)
treee538a94fcd49a7f2cda8929aab81fb42da25f03a /TODO
parent01af4ad9c3498c0b5d25bc8f89aebf42490d61f7 (diff)
downloadbison-a0b044186b4ec990a536aa323170b7591688cd2b.tar.gz
todo: more
Diffstat (limited to 'TODO')
-rw-r--r--TODO19
1 files changed, 19 insertions, 0 deletions
diff --git a/TODO b/TODO
index 5b3c670e..0f53ed8a 100644
--- a/TODO
+++ b/TODO
@@ -672,6 +672,25 @@ participate in the count.
Do we want to disallow terminal start symbols? The limitation is not
technical. Can it be useful to someone to "parse" a token?
+*** Fix default_reduction_only_for_accept
+In src/lalr.c:
+
+ /* 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, do not treat a state with any reductions as
+ consistent unless it is the accepting state (because there is never
+ a lookahead token that makes sense there, and so no lookahead token
+ should be read) if the user has otherwise disabled default
+ reductions. */
+ s->consistent =
+ !(reds->num > 1
+ || (reds->num == 1 && trans->num && TRANSITION_IS_SHIFT (trans, 0))
+ || (reds->num == 1 && reds->rules[0]->number != 0
+ && default_reduction_only_for_accept));
+
+We should have a test for "is accepting rule".
+
** %include
This is a popular demand. We already made many changes in the parser that
should make this reasonably easy to implement.