mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +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:
10
ChangeLog
10
ChangeLog
@@ -1,3 +1,13 @@
|
|||||||
|
2002-11-06 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
#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.
|
||||||
|
|
||||||
2002-11-06 Akim Demaille <akim@epita.fr>
|
2002-11-06 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* tests/regression.at (Invalid inputs): Adjust to the recent
|
* tests/regression.at (Invalid inputs): Adjust to the recent
|
||||||
|
|||||||
17
NEWS
17
NEWS
@@ -8,13 +8,6 @@ Changes in version 1.75b:
|
|||||||
|
|
||||||
* --no-line works properly.
|
* --no-line works properly.
|
||||||
|
|
||||||
Changes in version 1.75a, 2002-10-24:
|
|
||||||
|
|
||||||
* Bison can no longer be built by a K&R C compiler; it requires C89 or
|
|
||||||
later to be built. This change originally took place a few versions
|
|
||||||
ago, but nobody noticed until we recently asked someone to try
|
|
||||||
building Bison with a K&R C compiler.
|
|
||||||
|
|
||||||
* %error-verbose
|
* %error-verbose
|
||||||
This new directive is preferred over YYERROR_VERBOSE.
|
This new directive is preferred over YYERROR_VERBOSE.
|
||||||
|
|
||||||
@@ -26,6 +19,16 @@ Changes in version 1.75a, 2002-10-24:
|
|||||||
* #line
|
* #line
|
||||||
Bison now recognizes #line in its input, and forwards them.
|
Bison now recognizes #line in its input, and forwards them.
|
||||||
|
|
||||||
|
* #line
|
||||||
|
File names are properly escaped. E.g. foo\bar.y give #line 123 "foo\\bar.y".
|
||||||
|
|
||||||
|
Changes in version 1.75a, 2002-10-24:
|
||||||
|
|
||||||
|
* Bison can no longer be built by a K&R C compiler; it requires C89 or
|
||||||
|
later to be built. This change originally took place a few versions
|
||||||
|
ago, but nobody noticed until we recently asked someone to try
|
||||||
|
building Bison with a K&R C compiler.
|
||||||
|
|
||||||
Changes in version 1.75, 2002-10-14:
|
Changes in version 1.75, 2002-10-14:
|
||||||
|
|
||||||
* Bison should now work on 64-bit hosts.
|
* Bison should now work on 64-bit hosts.
|
||||||
|
|||||||
@@ -380,7 +380,8 @@ symbol_destructors_output (FILE *out)
|
|||||||
destructor, typename. */
|
destructor, typename. */
|
||||||
fprintf (out, "%s[[[%s]], [[%d]], [[%s]], [[%d]], [[%s]], [[%s]]]",
|
fprintf (out, "%s[[[%s]], [[%d]], [[%s]], [[%d]], [[%s]], [[%s]]]",
|
||||||
first ? "" : ",\n",
|
first ? "" : ",\n",
|
||||||
symbol->destructor_location.file,
|
quotearg_style (escape_quoting_style,
|
||||||
|
symbol->destructor_location.file),
|
||||||
symbol->destructor_location.first_line,
|
symbol->destructor_location.first_line,
|
||||||
symbol->tag,
|
symbol->tag,
|
||||||
symbol->number,
|
symbol->number,
|
||||||
@@ -414,7 +415,8 @@ symbol_printers_output (FILE *out)
|
|||||||
printer, typename. */
|
printer, typename. */
|
||||||
fprintf (out, "%s[[[%s]], [[%d]], [[%s]], [[%d]], [[%s]], [[%s]]]",
|
fprintf (out, "%s[[[%s]], [[%d]], [[%s]], [[%d]], [[%s]], [[%s]]]",
|
||||||
first ? "" : ",\n",
|
first ? "" : ",\n",
|
||||||
symbol->printer_location.file,
|
quotearg_style (escape_quoting_style,
|
||||||
|
symbol->printer_location.file),
|
||||||
symbol->printer_location.first_line,
|
symbol->printer_location.first_line,
|
||||||
symbol->tag,
|
symbol->tag,
|
||||||
symbol->number,
|
symbol->number,
|
||||||
|
|||||||
@@ -23,12 +23,16 @@
|
|||||||
|
|
||||||
%{
|
%{
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
#include "quotearg.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "getargs.h"
|
#include "getargs.h"
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
|
|
||||||
int skel_lex (void);
|
int skel_lex (void);
|
||||||
|
|
||||||
static int yylineno = 1;
|
static int yylineno = 1;
|
||||||
static char *yyoutname = NULL;
|
static char *yyoutname = NULL;
|
||||||
|
|
||||||
%}
|
%}
|
||||||
%%
|
%%
|
||||||
/* This is an approximation, but we don't need more. */
|
/* This is an approximation, but we don't need more. */
|
||||||
@@ -44,7 +48,7 @@ static char *yyoutname = NULL;
|
|||||||
"@:>@" fputc (']', yyout);
|
"@:>@" fputc (']', yyout);
|
||||||
|
|
||||||
"__oline__" fprintf (yyout, "%d", yylineno+1);
|
"__oline__" fprintf (yyout, "%d", yylineno+1);
|
||||||
"__ofile__" fprintf (yyout, "%s", yyoutname);
|
"__ofile__" fprintf (yyout, "%s", quotearg_style (escape_quoting_style, yyoutname));
|
||||||
[^@_\n]+ ECHO;
|
[^@_\n]+ ECHO;
|
||||||
\n+ yylineno += yyleng; ECHO;
|
\n+ yylineno += yyleng; ECHO;
|
||||||
. ECHO;
|
. ECHO;
|
||||||
|
|||||||
Reference in New Issue
Block a user