mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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.
This commit is contained in:
5
TODO
5
TODO
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user