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:
Akim Demaille
2021-02-09 07:01:00 +01:00
parent e0ab5c324a
commit f50fff58d1
3 changed files with 12 additions and 12 deletions

View File

@@ -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;