61 |
static void yyungetc (int c); |
static void yyungetc (int c); |
62 |
|
|
63 |
extern void perror (const char *s); |
extern void perror (const char *s); |
64 |
|
|
65 |
|
/* Exercise pre-prologue dependency to %union. */ |
66 |
|
typedef int value_t; |
67 |
|
|
68 |
%} |
%} |
69 |
|
|
70 |
/* Also exercise %union. */ |
/* Also exercise %union. */ |
71 |
%union |
%union |
72 |
{ |
{ |
73 |
int ival; /* A comment to exercise an old bug. */ |
value_t ival; /* A comment to exercise an old bug. */ |
74 |
}; |
}; |
75 |
|
|
76 |
|
/* Exercise post-prologue dependency to %union. */ |
77 |
|
%{ |
78 |
|
static void id (YYSTYPE *lval); |
79 |
|
%} |
80 |
|
|
81 |
/* Bison Declarations */ |
/* Bison Declarations */ |
82 |
%token CALC_EOF 0 "end of file" |
%token CALC_EOF 0 "end of file" |
83 |
%token <ival> NUM "number" |
%token <ival> NUM "number" |
245 |
return res; |
return res; |
246 |
} |
} |
247 |
|
|
248 |
|
void |
249 |
|
id (YYSTYPE* lval) |
250 |
|
{ |
251 |
|
} |
252 |
|
|
253 |
int |
int |
254 |
main (int argc, const char **argv) |
main (int argc, const char **argv) |
255 |
{ |
{ |