diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-04-12 16:46:51 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-04-12 19:23:40 +0200 |
commit | 5839f4d289eed182a4b4282614c5d845e951f211 (patch) | |
tree | 53a68765298fcd4c77f8017494580e62f84bf289 /examples | |
parent | ffa46e651686a684bd4bf95e7a1cb9ae8989915e (diff) | |
download | bison-5839f4d289eed182a4b4282614c5d845e951f211.tar.gz |
c: rename yyexpected_tokens as yypcontext_expected_tokens
The user should think of yypcontext fields as accessible only via
yypcontext_* functions. So let's rename yyexpected_tokens to reflect
that.
Let's _not_ rename yyreport_syntax_error, as the user may define this
function, and is not allowed to access directly the fields of
yypcontext_t: she *must* use the "accessors". This is comparable to
the case of C++/Java where the user defines
parser::report_syntax_error, not parser::context::report_syntax_error.
* data/skeletons/glr.c, data/skeletons/yacc.c (yyexpected_tokens):
Rename as...
(yypcontext_expected_tokens): this.
Adjust dependencies.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/c/bistromathic/parse.y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/c/bistromathic/parse.y b/examples/c/bistromathic/parse.y index 4d4b1e45..54002d29 100644 --- a/examples/c/bistromathic/parse.y +++ b/examples/c/bistromathic/parse.y @@ -290,7 +290,7 @@ yyreport_syntax_error (const yypcontext_t *ctx) { enum { TOKENMAX = 10 }; yysymbol_kind_t expected[TOKENMAX]; - int n = yyexpected_tokens (ctx, expected, TOKENMAX); + int n = yypcontext_expected_tokens (ctx, expected, TOKENMAX); if (n < 0) // Forward errors to yyparse. res = n; |