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