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