mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
examples: improve some function prototypes
* examples/c/bistromathic/parse.y, examples/c/glr/c++-types.y, * examples/c/lexcalc/parse.y: Use const where appropriate. Avoid `yy` prefixes where it does not make sense. Avoid the `p` prefix for pointers.
This commit is contained in:
@@ -87,7 +87,7 @@
|
||||
yytoken_kind_t
|
||||
yylex (const char **line, YYSTYPE *yylval, YYLTYPE *yylloc,
|
||||
const user_context *uctx);
|
||||
void yyerror (YYLTYPE *loc, const user_context *uctx,
|
||||
void yyerror (const YYLTYPE *loc, const user_context *uctx,
|
||||
char const *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 3, 4)));
|
||||
}
|
||||
@@ -466,7 +466,7 @@ yyreport_syntax_error (const yypcontext_t *ctx, const user_context *uctx)
|
||||
|
||||
|
||||
// Called by yyparse on error.
|
||||
void yyerror (YYLTYPE *loc, const user_context *uctx, char const *format, ...)
|
||||
void yyerror (const YYLTYPE *loc, const user_context *uctx, char const *format, ...)
|
||||
{
|
||||
if (uctx->silent)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user