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

@@ -28,7 +28,7 @@
yytoken_kind_t yylex (YYSTYPE* yylval, YYLTYPE *yylloc)
YY_DECL;
void yyerror (YYLTYPE *loc, const char *msg);
void yyerror (const YYLTYPE *loc, const char *msg);
}
// Emitted on top of the implementation file.
@@ -118,7 +118,7 @@ exp:
%%
// Epilogue (C code).
void yyerror (YYLTYPE *loc, const char *msg)
void yyerror (const YYLTYPE *loc, const char *msg)
{
YYLOCATION_PRINT (stderr, loc);
fprintf (stderr, ": %s\n", msg);