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