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