xref: /freebsd/contrib/byacc/test/err_syntax4.y (revision b00ab754)
1 %{
2 int yylex(void);
3 static void yyerror(const char *);
4 }
5 %%
6 S: error
7 %%
8 
9 #include <stdio.h>
10 
11 int
12 main(void)
13 {
14     printf("yyparse() = %d\n", yyparse());
15     return 0;
16 }
17 
18 int
19 yylex(void)
20 {
21     return -1;
22 }
23 
24 static void
25 yyerror(const char* s)
26 {
27     printf("%s\n", s);
28 }
29