err_syntax15.y revision 268899
1%%
2%{
3int yylex(void);
4static void yyerror(const char *);
5%}
6
7%start text
8
9%%
10S: error
11%%
12
13#include <stdio.h>
14
15int
16main(void)
17{
18    printf("yyparse() = %d\n", yyparse());
19    return 0;
20}
21
22int
23yylex(void)
24{
25    return -1;
26}
27
28static void
29yyerror(const char* s)
30{
31    printf("%s\n", s);
32}
33