+/*-----------------------------------------------.
+| For each symbol type, its tags and type name. |
+`-----------------------------------------------*/
+
+static void
+type_names_output (FILE *out)
+{
+ int i;
+ char const *sep = "";
+
+ fputs ("m4_define([b4_type_names],\n[", out);
+ for (i = 0; i < nsyms; ++i)
+ {
+ symbol *sym = symbols[i];
+ /* Symbol-name, Symbol-number, optional typename. */
+ fprintf (out, "%s[", i ? ",\n" : "");
+ escaped_output (out, sym->tag);
+ fprintf (out, ", %d, [[%s]]]",
+ sym->number,
+ sym->type_name ? sym->type_name : "");
+ }
+ fputs ("])\n\n", out);
+}
+
+