X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/c5e3e5105512fe14bc2c7d5fdcb49018712403e8..0ced3098fd97e1483b4ac938bdce99bfc7942539:/src/scan-skel.l?ds=sidebyside diff --git a/src/scan-skel.l b/src/scan-skel.l index e7f5b708..af5226c9 100644 --- a/src/scan-skel.l +++ b/src/scan-skel.l @@ -1,5 +1,6 @@ /* Scan Bison Skeletons. -*- C -*- - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + + Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -23,15 +24,17 @@ %{ #include "system.h" -#include "quotearg.h" -#include "error.h" + +#include +#include + #include "getargs.h" #include "files.h" int skel_lex (void); #define QPUTS(String) \ - fputs (quotearg_style (c_quoting_style, (String)), yyout); + fputs (quotearg_style (c_quoting_style, (String)), yyout) %} %% @@ -57,6 +60,7 @@ int skel_lex (void); XFREE (outname); outname = xstrdup (filename); + xfclose (yyout); yyout = xfopen (outname, "w"); lineno = 1; } @@ -65,7 +69,7 @@ int skel_lex (void); "@{" fputc ('[', yyout); "@}" fputc (']', yyout); -"@oline@" fprintf (yyout, "%d", lineno); +"@oline@" fprintf (yyout, "%d", lineno + 1); "@ofile@" QPUTS (outname); "@output_parser_name@" QPUTS (parser_file_name); "@output_header_name@" QPUTS (spec_defines_file);