mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
yacc: define dummy yytokname() and yystatname() macros if not yydebug
This commit is contained in:
parent
93c94e8c40
commit
68bba88d78
1 changed files with 11 additions and 13 deletions
|
@ -4,19 +4,6 @@
|
||||||
|
|
||||||
#ifdef yydebug
|
#ifdef yydebug
|
||||||
#include "y.debug"
|
#include "y.debug"
|
||||||
#else
|
|
||||||
#define yydebug 0
|
|
||||||
char* yytoknames[1]; /* for debugging */
|
|
||||||
char* yystates[1]; /* for debugging */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* parser for yacc output */
|
|
||||||
|
|
||||||
int yynerrs = 0; /* number of errors */
|
|
||||||
int yyerrflag = 0; /* error recovery flag */
|
|
||||||
|
|
||||||
extern int fprint(int, char*, ...);
|
|
||||||
extern int sprint(char*, char*, ...);
|
|
||||||
|
|
||||||
char*
|
char*
|
||||||
yytokname(int yyc)
|
yytokname(int yyc)
|
||||||
|
@ -41,6 +28,17 @@ yystatname(int yys)
|
||||||
sprint(x, "<%d>\n", yys);
|
sprint(x, "<%d>\n", yys);
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
#define yydebug 0
|
||||||
|
#define yytokname(x) ""
|
||||||
|
#define yystatname(x) ""
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* parser for yacc output */
|
||||||
|
|
||||||
|
int yynerrs = 0; /* number of errors */
|
||||||
|
int yyerrflag = 0; /* error recovery flag */
|
||||||
|
|
||||||
|
|
||||||
long
|
long
|
||||||
yylex1(void)
|
yylex1(void)
|
||||||
|
|
Loading…
Reference in a new issue