]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/byacc/test/err_syntax4.y
Copy googletest 1.8.1 from ^/vendor/google/googletest/1.8.1 to .../contrib/googletest
[FreeBSD/FreeBSD.git] / contrib / byacc / test / err_syntax4.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 }