* 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:
Akim Demaille
2002-06-17 07:05:12 +00:00
parent 56c4720342
commit dafdc66ff0
9 changed files with 77 additions and 58 deletions

View File

@@ -1319,7 +1319,7 @@ yyreduce:
symbol_list_t *list;
for (list = yyvsp[0].list; list; list = list->next)
symbol_type_set (list->sym, list->location, yyvsp[-1].string);
LIST_FREE (symbol_list_t, yyvsp[0].list);
symbol_list_free (yyvsp[0].list);
}
break;
@@ -1333,7 +1333,7 @@ yyreduce:
symbol_type_set (list->sym, list->location, current_type);
symbol_precedence_set (list->sym, list->location, current_prec, yyvsp[-2].assoc);
}
LIST_FREE (symbol_list_t, yyvsp[0].list);
symbol_list_free (yyvsp[0].list);
current_type = NULL;
}
break;