]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/usr.bin/yacc/error.y
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / usr.bin / yacc / error.y
1 %{
2 int yylex(void);
3 static void yyerror(const char *);
4 %}
5 %%
6 S: error
7 %%
8
9 #include <stdio.h>
10
11 int
12 main(void)
13 {
14     printf("yyparse() = %d\n", yyparse());
15     return 0;
16 }
17
18 int
19 yylex(void)
20 {
21     return -1;
22 }
23
24 static void
25 yyerror(const char* s)
26 {
27     printf("%s\n", s);
28 }