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