X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ec6dc4375eaeb5ef358fb2a0e9082a53dcc54d87..cc8962bdde81b04aa728aef21e53b4a08a0debfe:/src/symlist.c diff --git a/src/symlist.c b/src/symlist.c index 72ca1109..50915c18 100644 --- a/src/symlist.c +++ b/src/symlist.c @@ -44,9 +44,12 @@ symbol_list_sym_new (symbol *sym, location loc) /* Members used for LHS only. */ res->ruleprec = NULL; + res->percent_empty_loc = empty_location; code_props_none_init (&res->action_props); res->dprec = 0; + res->dprec_location = empty_location; res->merger = 0; + res->merger_declaration_location = empty_location; res->next = NULL; @@ -84,12 +87,17 @@ symbol_list_type_new (uniqstr type_name, location loc) void symbol_list_syms_print (const symbol_list *l, FILE *f) { + char const *sep = ""; for (/* Nothing. */; l && l->content.sym; l = l->next) { + fputs (sep, f); + fputs (l->content_type == SYMLIST_SYMBOL ? "symbol: " + : l->content_type == SYMLIST_TYPE ? "type: " + : "invalid content_type: ", + f); symbol_print (l->content.sym, f); - fprintf (f, l->action_props.is_value_used ? " used" : " unused"); - if (l && l->content.sym) - fprintf (f, ", "); + fputs (l->action_props.is_value_used ? " used" : " unused", f); + sep = ", "; } }