]> git.saurik.com Git - bison.git/blobdiff - src/scan-skel.l
Let yyerror always receive the msg as last argument, so that
[bison.git] / src / scan-skel.l
index 3f98cf7dd59946aaeab2715933bd726f1d05d047..aa71ac8c865bd563e50b001c07cb691655438f55 100644 (file)
 
 %{
 #include "system.h"
+#include "quotearg.h"
 #include "error.h"
 #include "getargs.h"
 #include "files.h"
-int skel_lex PARAMS ((void));
+
+int skel_lex (void);
+
 static int yylineno = 1;
 static char *yyoutname = NULL;
+
 %}
 %%
   /* This is an approximation, but we don't need more. */
@@ -44,7 +48,7 @@ static char *yyoutname = NULL;
 "@:>@"           fputc (']', yyout);
 
 "__oline__"      fprintf (yyout, "%d", yylineno+1);
-"__ofile__"      fprintf (yyout, "%s", yyoutname);
+"__ofile__"      fprintf (yyout, "%s", quotearg_style (escape_quoting_style, yyoutname));
 [^@_\n]+         ECHO;
 \n+              yylineno += yyleng; ECHO;
 .                ECHO;