X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/3d9a71d28ae444b3fc81f2572ebdb44c83541a96..6e40b4ebd43da977e1399f3b4678f8346d8e3f2c:/src/scan-skel.l diff --git a/src/scan-skel.l b/src/scan-skel.l index e56d3723..aa71ac8c 100644 --- a/src/scan-skel.l +++ b/src/scan-skel.l @@ -23,12 +23,16 @@ %{ #include "system.h" +#include "quotearg.h" #include "error.h" #include "getargs.h" #include "files.h" + 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;