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