]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/byacc/test/err_syntax7b.y
Merge branch 'releng/11.3' into releng-CDN/11.3
[FreeBSD/FreeBSD.git] / contrib / byacc / test / err_syntax7b.y
1 %{
2 int yylex(void);
3 static void yyerror(const char *);
4 %}
5
6 %token <text> '\x.'
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 }