- /* These are opened by `done' or `open_extra_files', if at all */
- if (spec_outfile)
- tabfile = spec_outfile;
- else
- tabfile = stringappend (base_name, ".c");
-
- attrsfile = stringappend (short_base_name, EXT_STYPE_H);
- guardfile = stringappend (short_base_name, EXT_GUARD_C);
-
- /* Initialize the obstacks. */
- obstack_init (&action_obstack);
- obstack_init (&attrs_obstack);
- obstack_init (&table_obstack);
- obstack_init (&defines_obstack);
-}
-
-
-
-/*-----------------------------------------------------.
-| Close the open files, produce all the output files. |
-`-----------------------------------------------------*/
-
-void
-output_files (void)
-{
- xfclose (fguard);
- xfclose (finput);
- xfclose (foutput);
-
- /* Output the main file. */
- obstack_save (&table_obstack, tabfile);
-
- /* Output the header file if wanted. */
- if (defines_flag)
- obstack_save (&defines_obstack, defsfile);
-
- /* If we output only the table, dump the actions in ACTFILE.
- */
- if (no_parser_flag)
- obstack_save (&action_obstack, actfile);
-
- /* If we produced a semantic parser ATTRS_OBSTACK must be dumped
- into its own file, ATTTRSFILE. */
- if (semantic_parser)
- obstack_save (&attrs_obstack, attrsfile);
+ for (j = 0; j < names; j++)
+ for (i = 0; i < j; i++)
+ if (strcmp (name[i], name[j]) == 0)
+ warn (_("conflicting outputs to file %s"), quote (name[i]));