]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/byacc/test/err_syntax2.y
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / byacc / test / err_syntax2.y
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 }