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