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