X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/7625ec2c8305644991a041afb1c9a707e96e3d93..01e972b3f529991ad22e68f0f8cc142543ac5d45:/src/scan-skel.l diff --git a/src/scan-skel.l b/src/scan-skel.l index e3a5eabd..e787d288 100644 --- a/src/scan-skel.l +++ b/src/scan-skel.l @@ -1,6 +1,7 @@ /* Scan Bison Skeletons. -*- C -*- - Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software + Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -28,8 +29,11 @@ #undef skel_wrap #define skel_wrap() 1 -#include "system.h" +#define FLEX_NO_OBSTACK +#define FLEX_PREFIX(Id) skel_ ## Id +#include "flex-scanner.h" +#include #include #include @@ -38,8 +42,13 @@ #include "files.h" #include "scan-skel.h" +int skel_lex (void); + #define QPUTS(String) \ - fputs (quotearg_style (c_quoting_style, (String)), yyout) + fputs (quotearg_style (c_quoting_style, String), yyout) + +#define BASE_QPUTS(File) \ + QPUTS (last_component (File)) %} %% @@ -66,7 +75,6 @@ else fatal ("invalid token in skeleton: %s", yytext); } - if (outname) { free (outname); @@ -84,8 +92,8 @@ "@oline@" fprintf (yyout, "%d", lineno + 1); "@ofile@" QPUTS (outname); "@dir_prefix@" QPUTS (dir_prefix); -"@output_parser_name@" QPUTS (base_name (parser_file_name)); -"@output_header_name@" QPUTS (base_name (spec_defines_file)); +"@output_parser_name@" BASE_QPUTS (parser_file_name); +"@output_header_name@" BASE_QPUTS (spec_defines_file); /* This pattern must not match more than the previous @ patterns. */ @[^{}@\n]* fatal ("invalid @ in skeleton: %s", yytext);