summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
25005f6)
yyerror are declared before use; C99 requires this.
#define YYINITDEPTH 10
static char* format (const char*, ...);
#define YYINITDEPTH 10
static char* format (const char*, ...);
+ struct YYLTYPE;
+#if YYPURE
+# if YYLSP_NEEDED
+# define LEX_PARAMETERS YYSTYPE *lvalp, struct YYLTYPE *llocp
+# define ERROR_PARAMETERS struct YYLTYPE *llocp, char const *s
+# else
+# define LEX_PARAMETERS YYSTYPE *lvalp
+# endif
+#endif
+#ifndef LEX_PARAMETERS
+# define LEX_PARAMETERS void
+#endif
+#ifndef ERROR_PARAMETERS
+# define ERROR_PARAMETERS char const *s
+#endif
+ int yylex (LEX_PARAMETERS);
+ int yyerror (ERROR_PARAMETERS);
-#if YYPURE && YYLSP_NEEDED
- yylex (YYSTYPE *lvalp, YYLTYPE *llocp)
-#elif YYPURE
- yylex (YYSTYPE *lvalp)
-#else
- yylex ()
-#endif
{
char buffer[256];
int c;
{
char buffer[256];
int c;
+yyerror (ERROR_PARAMETERS)
+{
#if YYPURE && YYLSP_NEEDED
#if YYPURE && YYLSP_NEEDED
+ /* Pacify GCC by using llocp. */
+ if (! llocp)
+ abort ();
fprintf (stderr, "%s\n", s);
return 0;
}
fprintf (stderr, "%s\n", s);
return 0;
}