]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/byacc/test/err_syntax17.y
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / byacc / test / err_syntax17.y
1 %{
2 int yylex(void);
3 static void yyerror(const char *);
4 %}
5
6 %%
7
8 S: { error
9 %%
10
11 #include <stdio.h>
12
13 int
14 main(void)
15 {
16     printf("yyparse() = %d\n", yyparse());
17     return 0;
18 }
19
20 int
21 yylex(void)
22 {
23     return -1;
24 }
25
26 static void
27 yyerror(const char* s)
28 {
29     printf("%s\n", s);
30 }