err_syntax1.y revision 264790
1264790Sbapt % { 2264790Sbaptint yylex(void); 3264790Sbaptstatic void yyerror(const char *); 4264790Sbapt%} 5264790Sbapt%% 6264790SbaptS: error 7264790Sbapt%% 8264790Sbapt 9264790Sbapt#include <stdio.h> 10264790Sbapt 11264790Sbaptint 12264790Sbaptmain(void) 13264790Sbapt{ 14264790Sbapt printf("yyparse() = %d\n", yyparse()); 15264790Sbapt return 0; 16264790Sbapt} 17264790Sbapt 18264790Sbaptint 19264790Sbaptyylex(void) 20264790Sbapt{ 21264790Sbapt return -1; 22264790Sbapt} 23264790Sbapt 24264790Sbaptstatic void 25264790Sbaptyyerror(const char* s) 26264790Sbapt{ 27264790Sbapt printf("%s\n", s); 28264790Sbapt} 29