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