summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2021-01-23 09:42:24 +0100
committerAkim Demaille <akim.demaille@gmail.com>2021-01-23 10:43:25 +0100
commit11f6839645fcac9d4ac3470f19e385d312e10b8d (patch)
tree8256e6acb5b50f7396b964ff3b82cff2bd1330d5 /tests
parent4910c025796684bf2a70341dde766cd68f3c6b2b (diff)
downloadbison-11f6839645fcac9d4ac3470f19e385d312e10b8d.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/actions.at8
-rw-r--r--tests/c++.at6
-rw-r--r--tests/headers.at2
-rw-r--r--tests/local.at6
4 files changed, 11 insertions, 11 deletions
diff --git a/tests/actions.at b/tests/actions.at
index d90851de..da11ceb2 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -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';
}
diff --git a/tests/c++.at b/tests/c++.at
index 949bdeb6..b894c0f7 100644
--- a/tests/c++.at
+++ b/tests/c++.at
@@ -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;
}
diff --git a/tests/headers.at b/tests/headers.at
index 73a43454..4e745ccb 100644
--- a/tests/headers.at
+++ b/tests/headers.at
@@ -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
diff --git a/tests/local.at b/tests/local.at
index 91e1e734..c697f5a7 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -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 () << ": ";]])[