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