* src/symtab.c (bucket_new): New function.

(getsym): Use it.
* src/output.c (output_short_table): New argument to display the
comment associated with the table.
Adjust dependencies.
(output_gram): Use it.
(output_rule_data): Nicer output layout for YYTNAME.
This commit is contained in:
Akim Demaille
2000-10-16 18:10:46 +00:00
parent f282676b7e
commit 1e9798d569
5 changed files with 128 additions and 99 deletions

View File

@@ -462,12 +462,18 @@ parse_token_decl (symbol_class what_is, symbol_class what_is_not)
{
int token = 0;
char *typename = 0;
struct bucket *symbol = NULL; /* pts to symbol being defined */
/* The symbol being defined. */
struct bucket *symbol = NULL;
/* After `%token' and `%nterm', any number of symbols maybe be
defined. */
for (;;)
{
int tmp_char = ungetc (skip_white_space (), finput);
/* `%' (for instance from `%token', or from `%%' etc.) is the
only valid means to end this declaration. */
if (tmp_char == '%')
return;
if (tmp_char == EOF)