mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
* data/glr.c (yytnamerr): New function.
(yyreportSyntaxError): Use it to dequote most string literals. * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility with other skeletons. All uses changed. (yytnameerr_): New function. (yyreport_syntax_error): Use it to dequote most string literals. * data/yacc.c (yytnamerr): New function. (yyerrlab): Use it to decode most string literals. * doc/bison.texinfo (Decl Summary, Calling Convention): Clarify quoting convention of yytname. * src/output.c (prepare_symbols): Quote all names. This undoes the 2005-04-17 change, which is now accomplished (mostly) via changes in the parsers as described above. * tests/regression.at (Token definitions, Web2c Actions): Undo most 2005-04-17 change here, too.
This commit is contained in:
@@ -60,7 +60,7 @@ bool error_verbose = false;
|
||||
#define GENERATE_MUSCLE_INSERT_TABLE(Name, Type) \
|
||||
\
|
||||
static void \
|
||||
Name (const char *name, \
|
||||
Name (char const *name, \
|
||||
Type *table_data, \
|
||||
Type first, \
|
||||
int begin, \
|
||||
@@ -162,10 +162,7 @@ prepare_symbols (void)
|
||||
int j = 2;
|
||||
for (i = 0; i < nsyms; i++)
|
||||
{
|
||||
char const *tag = symbols[i]->tag;
|
||||
char const *cp = (*tag == '"'
|
||||
? tag
|
||||
: quotearg_style (c_quoting_style, tag));
|
||||
char const *cp = quotearg_style (c_quoting_style, symbols[i]->tag);
|
||||
/* Width of the next token, including the two quotes, the
|
||||
comma and the space. */
|
||||
int width = strlen (cp) + 2;
|
||||
|
||||
Reference in New Issue
Block a user