freebsd-skq/contrib/byacc/test/empty.y
Baptiste Daroussin 0c8de5b03c Update to byacc 20140409
Among all the modifications, this new byacc also solves a 14 year old bug [1]

PR:		bin/23254 [1]
Submitted by:	marka@nominum.com [1]
MFC after:	3 weeks
2014-04-23 05:57:45 +00:00

25 lines
290 B
Plaintext

%{
#ifdef YYBISON
#define YYLEX_DECL() yylex(void)
#define YYERROR_DECL() yyerror(const char *s)
static int YYLEX_DECL();
static void YYERROR_DECL();
#endif
%}
%%
start: ;
%%
#include <stdio.h>
static int
YYLEX_DECL() {
return -1;
}
static void
YYERROR_DECL() {
printf("%s\n",s);
}