1/* $NetBSD: pure_error.y,v 1.1.1.3 2011/09/10 21:22:05 christos Exp $ */ 2 3%% 4S: error 5%% 6 7#include <stdio.h> 8 9#ifdef YYBYACC 10extern int YYLEX_DECL(); 11static void YYERROR_DECL(); 12#endif 13 14int 15main(void) 16{ 17 printf("yyparse() = %d\n", yyparse()); 18 return 0; 19} 20 21int 22yylex(YYSTYPE *value) 23{ 24 return value ? 0 : -1; 25} 26 27static void 28yyerror(const char* s) 29{ 30 printf("%s\n", s); 31} 32