mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23:33:03 +00:00
* src/symlist.h, src/symlist.c (symbol_list_length): New.
* src/scan-gram.l (handle_dollar, handle_at): Compute the rule_length only when needed. * src/output.c (actions_output, token_definitions_output): Output the full M4 block. * src/symtab.c: Don't access directly to the symbol tag, use symbol_tag_get. * src/parse-gram.y: Use symbol_list_free.
This commit is contained in:
@@ -64,6 +64,20 @@ symbol_list_free (symbol_list_t *list)
|
||||
}
|
||||
|
||||
|
||||
/*--------------------.
|
||||
| Return its length. |
|
||||
`--------------------*/
|
||||
|
||||
unsigned int
|
||||
symbol_list_length (symbol_list_t *list)
|
||||
{
|
||||
int res = 0;
|
||||
for (/* Nothing. */; list; list = list->next)
|
||||
++res;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/*--------------------------------------------------------------.
|
||||
| Get the data type (alternative in the union) of the value for |
|
||||
| symbol N in rule RULE. |
|
||||
|
||||
Reference in New Issue
Block a user