diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2018-12-09 08:14:35 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2018-12-11 06:53:25 +0100 |
commit | 20b07467938cf880a1d30eb30d6e191843a21fec (patch) | |
tree | d73fcf0b38eda466004c62c80c745c84facbc571 /TODO | |
parent | afdefecab6eddb64962b205e799564e4cdb16cbd (diff) | |
download | bison-20b07467938cf880a1d30eb30d6e191843a21fec.tar.gz |
parser: improve the error message for symbol class redefinition
Currently our error messages include both "symbol redeclared" and
"symbol redefined", and they mean something different. This is
obscure, let's make this clearer.
I think the idea between 'definition' vs. 'declaration' is that in the
case of the nonterminals, the actual definition is its set of rules,
so %nterm would be about declaration. The case of %token is less
clear.
* src/symtab.c (complain_class_redefined): New.
(symbol_class_set): Use it.
Simplify the logic of this function to clearly skip its body when the
preconditions are not met.
* tests/input.at (Symbol class redefinition): New.
Diffstat (limited to 'TODO')
-rw-r--r-- | TODO | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7,6 +7,11 @@ Several features are not available in all the backends. - token constructors: Java and C * Short term +** consistency +nonterminal vs non terminal vs non-terminal +token vs terminal +redeclaration vs redefinition + ** yacc.c Now that ylwrap is fixed, we should include foo.tab.h from foo.tab.c rather than duplicating it. |