summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-03-29 11:51:31 +0200
committerAkim Demaille <akim.demaille@gmail.com>2020-04-01 08:31:48 +0200
commit086506bf239ad331934e77105cb611dd841585c1 (patch)
treea10b144758510326728598968be90d3807ea2fd2 /tests
parent39792f57fb0d4b7ed45465cc4b701473e94ca7f0 (diff)
downloadbison-086506bf239ad331934e77105cb611dd841585c1.tar.gz
glr.c, yacc.c: propagate yysymbol_type_t
Now that yacc.c and glr.c both know yysymbol_type_t, convert the common routines. * data/skeletons/c.m4 (yydestruct, yy_symbol_value_print) (yy_symbol_print): Use yysymbol_type_t instead of int. * data/skeletons/glr.c: Use yySymbol where appropriate. * data/skeletons/yacc.c (YY_ACCESSING_SYMBOL): New wrapper around yystos. Use it. * tests/local.at (yyreport_syntax_error): Use yysymbol_type_t where appropriate.
Diffstat (limited to 'tests')
-rw-r--r--tests/local.at4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/local.at b/tests/local.at
index fdb715c9..43a51f8b 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -633,13 +633,13 @@ yyreport_syntax_error (const yyparse_context_t *ctx]AT_PARAM_IF([, AT_PARSE_PARA
fprintf (stderr, ": ");]])[
fprintf (stderr, "syntax error");
{
- int la = yyparse_context_token (ctx);
+ yysymbol_type_t la = yyparse_context_token (ctx);
if (la != YYEMPTY)
fprintf (stderr, " on token [%s]", yysymbol_name (la));
}
{
enum { TOKENMAX = 10 };
- int expected[TOKENMAX];
+ yysymbol_type_t expected[TOKENMAX];
int n = yyexpected_tokens (ctx, expected, TOKENMAX);
/* Forward errors to yyparse. */
if (n < 0)