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