mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 13:53:03 +00:00
Minor fixups to get 'make maintainer-check' to work.
* configure.ac: Don't use -Wnested-externs, as it's incompatible with the new verify.h implementation. * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput). * data/glr.c (YYUSE): Depend on __GNUC__ as well. * data/yacc.c (YYUSE): Likewise. * data/lalr1.cc (yysyntax_error_): YYUSE (yystate). * lib/subpipe.c (end_of_output_subpipe): The args are unused. * src/parse-gram.y (declaration): Don't pass a string constant to a function that expects char *, since GCC might complain about the constant value. * src/reader.c (symbol_typed_p): Add parens to pacify GCC. * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval before #defining them. * tests/glr-regression.at (Incorrectly initialized location for empty right-hand side in GLR): In yyerror, use the msg arg. (Corrupted semantic options if user action cuts parse): (Incorrect lookahead during deterministic GLR): (Incorrect lookahead during nondeterministic GLR): Don't name a local var 'index'; it shadows string.h's 'index'.
This commit is contained in:
@@ -206,7 +206,11 @@ declaration:
|
||||
grammar_declaration
|
||||
| PROLOGUE { prologue_augment ($1, @1); }
|
||||
| "%debug" { debug_flag = true; }
|
||||
| "%define" string_content { muscle_insert ($2, "1"); }
|
||||
| "%define" string_content
|
||||
{
|
||||
static char one[] = "1";
|
||||
muscle_insert ($2, one);
|
||||
}
|
||||
| "%define" string_content string_content { muscle_insert ($2, $3); }
|
||||
| "%defines" { defines_flag = true; }
|
||||
| "%error-verbose" { error_verbose = true; }
|
||||
@@ -214,14 +218,14 @@ declaration:
|
||||
| "%expect-rr" INT { expected_rr_conflicts = $2; }
|
||||
| "%file-prefix" "=" string_content { spec_file_prefix = $3; }
|
||||
| "%glr-parser"
|
||||
{
|
||||
nondeterministic_parser = true;
|
||||
glr_parser = true;
|
||||
}
|
||||
{
|
||||
nondeterministic_parser = true;
|
||||
glr_parser = true;
|
||||
}
|
||||
| "%initial-action {...}"
|
||||
{
|
||||
muscle_code_grow ("initial_action", $1, @1);
|
||||
}
|
||||
{
|
||||
muscle_code_grow ("initial_action", $1, @1);
|
||||
}
|
||||
| "%lex-param {...}" { add_param ("lex_param", $1, @1); }
|
||||
| "%locations" { locations_flag = true; }
|
||||
| "%name-prefix" "=" string_content { spec_name_prefix = $3; }
|
||||
|
||||
@@ -221,7 +221,7 @@ static bool
|
||||
symbol_typed_p (const symbol_list *s)
|
||||
{
|
||||
return (s->sym->type_name
|
||||
|| s->midrule && s->midrule->used);
|
||||
|| (s->midrule && s->midrule->used));
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------.
|
||||
|
||||
Reference in New Issue
Block a user