err_syntax5.y revision 268899
1178479Sjb%{ 2178479Sjbint yylex(void); 3178479Sjbstatic void yyerror(const char *); 4178479Sjb%} 5178479Sjb 6178479Sjb%union { 7178479Sjb char *str; 8178479Sjb int num 9178479Sjb 10178479Sjb%% 11178479SjbS: error 12178479Sjb%% 13178479Sjb 14178479Sjb#include <stdio.h> 15178479Sjb 16178479Sjbint 17178479Sjbmain(void) 18178479Sjb{ 19178479Sjb printf("yyparse() = %d\n", yyparse()); 20178479Sjb return 0; 21178479Sjb} 22178479Sjb 23178479Sjbint 24178479Sjbyylex(void) 25178479Sjb{ 26178479Sjb return -1; 27178479Sjb} 28178479Sjb 29178479Sjbstatic void 30178479Sjbyyerror(const char* s) 31178479Sjb{ 32178479Sjb printf("%s\n", s); 33178479Sjb} 34178479Sjb