mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
style: YYUSE is private, make it YY_USE
This macro is not exposed to users, make start it with 'YY_'. * data/skeletons/bison.m4, data/skeletons/c.m4, data/skeletons/glr.c, * data/skeletons/glr.cc, data/skeletons/lalr1.cc, * src/parse-gram.c, tests/actions.at, tests/c++.at, tests/headers.at, * tests/local.at (YYUSE): Rename as... (YY_USE): this.
This commit is contained in:
@@ -334,10 +334,10 @@ exp: { ]AT_CXX_IF([[std::cerr << @$ << '\n']],
|
||||
|
||||
]AT_YYLEX_PROTOTYPE[
|
||||
{]AT_PURE_IF([
|
||||
YYUSE(lvalp);
|
||||
YYUSE(llocp);], [AT_CXX_IF([
|
||||
YYUSE(lvalp);
|
||||
YYUSE(llocp);])])[
|
||||
YY_USE(lvalp);
|
||||
YY_USE(llocp);], [AT_CXX_IF([
|
||||
YY_USE(lvalp);
|
||||
YY_USE(llocp);])])[
|
||||
return 'x';
|
||||
}
|
||||
|
||||
|
||||
@@ -1232,10 +1232,10 @@ list:
|
||||
|
||||
item:
|
||||
'a' { $$ = $][1; }
|
||||
| 'e' { YYUSE ($$); YYUSE ($][1); error ("syntax error"); }
|
||||
| 'e' { YY_USE ($$); YY_USE ($][1); error ("syntax error"); }
|
||||
// Not just 'E', otherwise we reduce when 'E' is the lookahead, and
|
||||
// then the stack is emptied, defeating the point of the test.
|
||||
| 'E' 'a' { YYUSE ($][1); $$ = $][2; }
|
||||
| 'E' 'a' { YY_USE ($][1); $$ = $][2; }
|
||||
| 'R' { ]AT_VARIANT_IF([], [$$ = YY_NULLPTR; delete $][1]; )[YYERROR; }
|
||||
| 'p' { $$ = $][1; }
|
||||
| 's' { $$ = $][1; throw std::runtime_error ("reduction"); }
|
||||
@@ -1394,7 +1394,7 @@ int yylex (yy::parser::semantic_type *lvalp)
|
||||
// Note: this argument is unused, but named on purpose. There used to be a
|
||||
// bug with a macro that erroneously expanded this identifier to
|
||||
// yystackp->yyval.
|
||||
YYUSE (lvalp);
|
||||
YY_USE (lvalp);
|
||||
return yy::parser::token::ZERO;
|
||||
}
|
||||
|
||||
|
||||
@@ -340,7 +340,7 @@ AT_PERL_CHECK([[-n -0777 -e '
|
||||
|YYNTOKENS # This is actual scoped in a C++ class.
|
||||
|YYPUSH_MORE(?:_DEFINED)?
|
||||
|S_(YY(ACCEPT|EMPTY|EOF|error|UNDEF)) # These guys are scoped.
|
||||
|YYUSE
|
||||
|YY_USE
|
||||
|YY_ATTRIBUTE(?:_PURE|_UNUSED)
|
||||
|YY(?:_REINTERPRET)?_CAST
|
||||
|YY_CONSTEXPR
|
||||
|
||||
@@ -643,7 +643,7 @@ yyreport_syntax_error (const yypcontext_t *ctx]AT_PARAM_IF([, AT_PARSE_PARAMS])[
|
||||
{
|
||||
int res = 0;]AT_PARAM_IF([m4_bpatsubst(m4_defn([AT_PARSE_PARAMS]),
|
||||
[[^,]+[^A-Za-z_0-9]\([A-Za-z_][A-Za-z_0-9]*\),* *], [
|
||||
YYUSE (\1);])])[]m4_bmatch(m4_defn([AT_PARSE_PARAMS]), [nerrs],[[
|
||||
YY_USE (\1);])])[]m4_bmatch(m4_defn([AT_PARSE_PARAMS]), [nerrs],[[
|
||||
++global_nerrs;
|
||||
++*nerrs;]])[]AT_LOCATION_IF([[
|
||||
LOCATION_PRINT (stderr, *yypcontext_location (ctx));
|
||||
@@ -679,7 +679,7 @@ static
|
||||
]AT_YYERROR_PROTOTYPE[
|
||||
{]m4_bpatsubst(m4_defn([AT_PARSE_PARAMS]),
|
||||
[[^,]+[^A-Za-z_0-9]\([A-Za-z_][A-Za-z_0-9]*\),* *], [
|
||||
YYUSE (\1);])dnl
|
||||
YY_USE (\1);])dnl
|
||||
AT_YYERROR_SEES_LOC_IF([[
|
||||
LOCATION_PRINT (stderr, ]AT_LOC[);
|
||||
fprintf (stderr, ": ");]])[
|
||||
@@ -760,7 +760,7 @@ void
|
||||
]AT_NAMESPACE[::parser::report_syntax_error (const context& ctx) const
|
||||
{]AT_PARAM_IF([m4_bpatsubst(m4_defn([AT_PARSE_PARAMS]),
|
||||
[[^,]+[^A-Za-z_0-9]\([A-Za-z_][A-Za-z_0-9]*\),* *], [
|
||||
YYUSE (\1);])])[]m4_bmatch(m4_defn([AT_PARSE_PARAMS]), [nerrs],[[
|
||||
YY_USE (\1);])])[]m4_bmatch(m4_defn([AT_PARSE_PARAMS]), [nerrs],[[
|
||||
++global_nerrs;
|
||||
++*nerrs;]])[]AT_LOCATION_IF([[
|
||||
std::cerr << ctx.location () << ": ";]])[
|
||||
|
||||
Reference in New Issue
Block a user