]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - tools/regression/usr.bin/yacc/error.y
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.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 }