mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
#line should have quoted strings.
Ideally, this should be done by m4_quotearg. * src/scan-skel.l: Include quotearg.h. Quote __ofile__. * src/output.c (symbol_printers_output) (symbol_destructors_output): Quote the file name.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user