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