summaryrefslogtreecommitdiff
path: root/TODO
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-04-12 08:29:44 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-04-12 08:38:30 +0200
commit2ab70cf0c6373a1457565c8fd99c442dbec7ee14 (patch)
tree17c7886b261689b67036fdc06006e494e61a6c56 /TODO
parent99664706e2c0fdac1d54207aef4a15054aa7378a (diff)
downloadbison-2ab70cf0c6373a1457565c8fd99c442dbec7ee14.tar.gz
style: comment changes
* src/closure.h, src/closure.c, src/lalr.c: here.
Diffstat (limited to 'TODO')
-rw-r--r--TODO43
1 files changed, 43 insertions, 0 deletions
diff --git a/TODO b/TODO
index 6e7e387e..932086d9 100644
--- a/TODO
+++ b/TODO
@@ -53,6 +53,27 @@ syntax error, unexpected $end, expecting ↦ or 🎅🐃 or '\n'
While at it, we should stop using "$end" by default, in favor of "end of
file", or "end of input", whatever.
+** clean up
+*** lalr.c
+Introduce a goto struct, and use it in place of from_state/to_state.
+Rename states1 as path, length as pathlen.
+Introduce inline functions for things such as nullable[*rp - ntokens]
+where we need to map from symbol number to nterm number.
+
+There are probably a significant part of the the relations management that
+should be migrated on top of a bitsetv.
+
+*** closure
+It should probably take a "state*" instead of two arguments.
+
+*** traces
+The "automaton" and "set" categories are not so useful. We should probably
+introduce lr(0) and lalr, just the way we have ielr categories. The
+"closure" function is too verbose, it should probably have its own category.
+
+"set" can still be used for summariring the important sets. That would make
+tests easy to maintain.
+
** use gettext-h in gnulib instead of gettext
** use gnulib-po
For some reason, according to syntax-check, we have to keep getopt.c in
@@ -63,6 +84,28 @@ fixed.
Meanwhile, bitset/stats.c is removed from the set of translations, which is
not too much of a problem as users are not expected to see this.
+** bad diagnostics
+
+%token <val> NUM
+%type <val> expr term fact
+
+%%
+
+res: expr { printf ("%d\n", $1); };
+expr: expr '+' term { $$ = $1 + $3; } | term;
+term: NUM | { $$ = 0; };
+
+The second warning about fact is... useless.
+
+$ bison /tmp/bar.y
+/tmp/bar.y:2.24-27: warning: symbol fact is used, but is not defined as a token and has no rules [-Wother]
+ %type <val> expr term fact
+ ^~~~
+/tmp/bar.y: warning: 1 nonterminal useless in grammar [-Wother]
+/tmp/bar.y:2.24-27: warning: nonterminal useless in grammar: fact [-Wother]
+ %type <val> expr term fact
+ ^~~~
+
* Completion
Several features are not available in all the backends.