[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/17] todo: more
From: |
Akim Demaille |
Subject: |
[PATCH 12/17] todo: more |
Date: |
Sun, 20 Sep 2020 10:37:44 +0200 |
---
TODO | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/TODO b/TODO
index 018247c4..b7221d69 100644
--- a/TODO
+++ b/TODO
@@ -679,6 +679,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.
--
2.28.0
- [PATCH 02/17] reader: get ready to create several initial rules, (continued)
- [PATCH 02/17] reader: get ready to create several initial rules, Akim Demaille, 2020/09/20
- [PATCH 03/17] parser: expose a list of symbols, Akim Demaille, 2020/09/20
- [PATCH 04/17] regen, Akim Demaille, 2020/09/20
- [PATCH 05/17] multistart: turn start symbols into rules on $accept, Akim Demaille, 2020/09/20
- [PATCH 06/17] regen, Akim Demaille, 2020/09/20
- [PATCH 07/17] multistart: adjust computation of initial core and adjust reports, Akim Demaille, 2020/09/20
- [PATCH 08/17] multistart: also check the HTML report, Akim Demaille, 2020/09/20
- [PATCH 09/17] multistart: pass the list of start symbols to the backend, Akim Demaille, 2020/09/20
- [PATCH 10/17] multistart: equip yacc.c, Akim Demaille, 2020/09/20
- [PATCH 11/17] multistart: toy with it in lexcalc, Akim Demaille, 2020/09/20
- [PATCH 12/17] todo: more,
Akim Demaille <=
- [PATCH 13/17] multistart: adjust reader checks for generated rules, Akim Demaille, 2020/09/20
- [PATCH 14/17] multistart: use b4_accept instead of action post-processing, Akim Demaille, 2020/09/20
- [PATCH 15/17] multistart: allow tokens as start symbols, Akim Demaille, 2020/09/20
- [PATCH 16/17] yacc.c: also count calls to YYERROR in yynerrs, Akim Demaille, 2020/09/20
- [PATCH 17/17] multistart: also give access to yynerrs, Akim Demaille, 2020/09/20
- Re: [PATCH 00/17] RFC: multiple start symbols, Paul Eggert, 2020/09/20