+"@output ".*\n {
+ char const *file_name = yytext + sizeof "@output " - 1;
+ yytext[yyleng - 1] = '\0';
+
+ /* Decode special file names. They include the directory part,
+ contrary to their "free" occurrences, used for issuing #includes,
+ which must not include the directory part. */
+
+ if (*file_name == '@')
+ {
+ if (strcmp (file_name, "@output_header_name@") == 0)
+ {
+ assert (spec_defines_file);
+ file_name = spec_defines_file;
+ }
+ else if (strcmp (file_name, "@output_parser_name@") == 0)
+ {
+ assert (parser_file_name);
+ file_name = parser_file_name;
+ }
+ else
+ fatal ("invalid token in skeleton: %s", yytext);
+ }
+ if (outname)
+ {
+ free (outname);
+ xfclose (yyout);
+ }
+ outname = xstrdup (file_name);
+ yyout = xfopen (outname, "w");
+ lineno = 1;