mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
(symbol_destructors_output, symbol_printers_output):
Don't assume %union.
This commit is contained in:
20
src/output.c
20
src/output.c
@@ -402,16 +402,18 @@ symbol_destructors_output (FILE *out)
|
|||||||
|
|
||||||
/* Filename, lineno,
|
/* Filename, lineno,
|
||||||
Symbol-name, Symbol-number,
|
Symbol-name, Symbol-number,
|
||||||
destructor, typename. */
|
destructor, optional typename. */
|
||||||
fprintf (out, "%s[", sep);
|
fprintf (out, "%s[", sep);
|
||||||
sep = ",\n";
|
sep = ",\n";
|
||||||
escaped_file_name_output (out, sym->destructor_location.start.file);
|
escaped_file_name_output (out, sym->destructor_location.start.file);
|
||||||
fprintf (out, ", [[%d]], [[%s]], [[%d]], [[%s]], [[%s]]]",
|
fprintf (out, ", [[%d]], [[%s]], [[%d]], [[%s]]",
|
||||||
sym->destructor_location.start.line,
|
sym->destructor_location.start.line,
|
||||||
sym->tag,
|
sym->tag,
|
||||||
sym->number,
|
sym->number,
|
||||||
sym->destructor,
|
sym->destructor);
|
||||||
sym->type_name);
|
if (sym->type_name)
|
||||||
|
fprintf (out, ", [[%s]]", sym->type_name);
|
||||||
|
fputc (']', out);
|
||||||
}
|
}
|
||||||
fputs ("])\n\n", out);
|
fputs ("])\n\n", out);
|
||||||
}
|
}
|
||||||
@@ -435,16 +437,18 @@ symbol_printers_output (FILE *out)
|
|||||||
|
|
||||||
/* Filename, lineno,
|
/* Filename, lineno,
|
||||||
Symbol-name, Symbol-number,
|
Symbol-name, Symbol-number,
|
||||||
printer, typename. */
|
printer, optional typename. */
|
||||||
fprintf (out, "%s[", sep);
|
fprintf (out, "%s[", sep);
|
||||||
sep = ",\n";
|
sep = ",\n";
|
||||||
escaped_file_name_output (out, sym->printer_location.start.file);
|
escaped_file_name_output (out, sym->printer_location.start.file);
|
||||||
fprintf (out, ", [[%d]], [[%s]], [[%d]], [[%s]], [[%s]]]",
|
fprintf (out, ", [[%d]], [[%s]], [[%d]], [[%s]]",
|
||||||
sym->printer_location.start.line,
|
sym->printer_location.start.line,
|
||||||
sym->tag,
|
sym->tag,
|
||||||
sym->number,
|
sym->number,
|
||||||
sym->printer,
|
sym->printer);
|
||||||
sym->type_name);
|
if (sym->type_name)
|
||||||
|
fprintf (out, ", [[%s]]", sym->type_name);
|
||||||
|
fputc (']', out);
|
||||||
}
|
}
|
||||||
fputs ("])\n\n", out);
|
fputs ("])\n\n", out);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user