]> git.saurik.com Git - bison.git/blobdiff - src/scan-skel.l
* data/glr.c (yyrecoverSyntaxError, yyreturn):
[bison.git] / src / scan-skel.l
index d860c08a55313db2a1f6c576a9d853115615c390..c08c330ab0ee36d260a42ce1afdb224145384fa6 100644 (file)
@@ -16,8 +16,8 @@
 
    You should have received a copy of the GNU General Public License
    along with Bison; see the file COPYING.  If not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.  */
 
 %option nodefault noyywrap nounput never-interactive debug
 %option prefix="skel_" outfile="lex.yy.c"
@@ -31,8 +31,7 @@
 #include "complain.h"
 #include "getargs.h"
 #include "files.h"
-
-int skel_lex (void);
+#include "scan-skel.h"
 
 #define QPUTS(String) \
    fputs (quotearg_style (c_quoting_style, (String)), yyout)
@@ -83,15 +82,20 @@ int skel_lex (void);
 \n        lineno++; ECHO;
 [^@\n]+           ECHO;
 
-<<EOF>>           free (outname); xfclose (yyout); return EOF;
+<<EOF>> {
+  if (outname)
+    {
+      free (outname);
+      xfclose (yyout);
+    }
+  return EOF;
+}
 %%
 
 /*------------------------.
 | Scan a Bison skeleton.  |
 `------------------------*/
 
-void scan_skel (FILE *);
-
 void
 scan_skel (FILE *in)
 {