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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user