1 |
|
/* A Bison parser, made from ./getdate.y |
2 |
/* A Bison parser, made from ./getdate.y |
by GNU bison 1.35. */ |
|
by GNU Bison version 1.28 */ |
|
3 |
|
|
4 |
#define YYBISON 1 /* Identify Bison output. */ |
#define YYBISON 1 /* Identify Bison output. */ |
5 |
|
|
6 |
#define tAGO 257 |
# define tAGO 257 |
7 |
#define tDST 258 |
# define tDST 258 |
8 |
#define tDAY 259 |
# define tDAY 259 |
9 |
#define tDAY_UNIT 260 |
# define tDAY_UNIT 260 |
10 |
#define tDAYZONE 261 |
# define tDAYZONE 261 |
11 |
#define tHOUR_UNIT 262 |
# define tHOUR_UNIT 262 |
12 |
#define tLOCAL_ZONE 263 |
# define tLOCAL_ZONE 263 |
13 |
#define tMERIDIAN 264 |
# define tMERIDIAN 264 |
14 |
#define tMINUTE_UNIT 265 |
# define tMINUTE_UNIT 265 |
15 |
#define tMONTH 266 |
# define tMONTH 266 |
16 |
#define tMONTH_UNIT 267 |
# define tMONTH_UNIT 267 |
17 |
#define tSEC_UNIT 268 |
# define tSEC_UNIT 268 |
18 |
#define tYEAR_UNIT 269 |
# define tYEAR_UNIT 269 |
19 |
#define tZONE 270 |
# define tZONE 270 |
20 |
#define tSNUMBER 271 |
# define tSNUMBER 271 |
21 |
#define tUNUMBER 272 |
# define tUNUMBER 272 |
22 |
|
|
23 |
#line 1 "./getdate.y" |
#line 1 "./getdate.y" |
24 |
|
|
186 |
|
|
187 |
|
|
188 |
#line 172 "./getdate.y" |
#line 172 "./getdate.y" |
189 |
|
#ifndef YYSTYPE |
190 |
typedef union |
typedef union |
191 |
{ |
{ |
192 |
int intval; |
int intval; |
193 |
textint textintval; |
textint textintval; |
194 |
} YYSTYPE; |
} yystype; |
195 |
#include <stdio.h> |
# define YYSTYPE yystype |
196 |
|
# define YYSTYPE_IS_TRIVIAL 1 |
|
#ifndef __cplusplus |
|
|
#ifndef __STDC__ |
|
|
#define const |
|
197 |
#endif |
#endif |
198 |
|
#ifndef YYDEBUG |
199 |
|
# define YYDEBUG 0 |
200 |
#endif |
#endif |
201 |
|
|
202 |
|
|
205 |
#define YYFLAG -32768 |
#define YYFLAG -32768 |
206 |
#define YYNTBASE 22 |
#define YYNTBASE 22 |
207 |
|
|
208 |
|
/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ |
209 |
#define YYTRANSLATE(x) ((unsigned)(x) <= 272 ? yytranslate[x] : 33) |
#define YYTRANSLATE(x) ((unsigned)(x) <= 272 ? yytranslate[x] : 33) |
210 |
|
|
211 |
static const char yytranslate[] = { 0, |
/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ |
212 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
static const char yytranslate[] = |
213 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
{ |
214 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
215 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
216 |
2, 2, 2, 20, 2, 2, 21, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
217 |
2, 2, 2, 2, 2, 2, 2, 19, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
218 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 20, 2, 2, 21, 2, 2, |
219 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 19, 2, |
220 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
221 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
222 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
223 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
224 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
225 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
226 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
227 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
228 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
229 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
230 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
231 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
232 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
233 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
234 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
235 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
236 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
237 |
2, 2, 2, 2, 2, 1, 3, 4, 5, 6, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
238 |
7, 8, 9, 10, 11, 12, 13, 14, 15, 16, |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
239 |
17, 18 |
2, 2, 2, 2, 2, 2, 1, 3, 4, 5, |
240 |
|
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, |
241 |
|
16, 17, 18 |
242 |
}; |
}; |
243 |
|
|
244 |
#if YYDEBUG != 0 |
#if YYDEBUG |
245 |
static const short yyprhs[] = { 0, |
static const short yyprhs[] = |
246 |
0, 1, 4, 6, 8, 10, 12, 14, 16, 18, |
{ |
247 |
21, 26, 31, 38, 45, 47, 50, 52, 54, 57, |
0, 0, 1, 4, 6, 8, 10, 12, 14, 16, |
248 |
59, 62, 65, 69, 75, 79, 83, 86, 91, 94, |
18, 21, 26, 31, 38, 45, 47, 50, 52, 54, |
249 |
98, 101, 103, 106, 109, 111, 114, 117, 119, 122, |
57, 59, 62, 65, 69, 75, 79, 83, 86, 91, |
250 |
125, 127, 130, 133, 135, 138, 141, 143, 146, 149, |
94, 98, 101, 103, 106, 109, 111, 114, 117, 119, |
251 |
151, 153, 154 |
122, 125, 127, 130, 133, 135, 138, 141, 143, 146, |
252 |
|
149, 151, 153, 154 |
253 |
}; |
}; |
254 |
|
static const short yyrhs[] = |
255 |
static const short yyrhs[] = { -1, |
{ |
256 |
22, 23, 0, 24, 0, 25, 0, 26, 0, 28, |
-1, 22, 23, 0, 24, 0, 25, 0, 26, 0, |
257 |
0, 27, 0, 29, 0, 31, 0, 18, 10, 0, |
28, 0, 27, 0, 29, 0, 31, 0, 18, 10, |
258 |
18, 19, 18, 32, 0, 18, 19, 18, 17, 0, |
0, 18, 19, 18, 32, 0, 18, 19, 18, 17, |
259 |
18, 19, 18, 19, 18, 32, 0, 18, 19, 18, |
0, 18, 19, 18, 19, 18, 32, 0, 18, 19, |
260 |
19, 18, 17, 0, 9, 0, 9, 4, 0, 16, |
18, 19, 18, 17, 0, 9, 0, 9, 4, 0, |
261 |
0, 7, 0, 16, 4, 0, 5, 0, 5, 20, |
16, 0, 7, 0, 16, 4, 0, 5, 0, 5, |
262 |
0, 18, 5, 0, 18, 21, 18, 0, 18, 21, |
20, 0, 18, 5, 0, 18, 21, 18, 0, 18, |
263 |
18, 21, 18, 0, 18, 17, 17, 0, 18, 12, |
21, 18, 21, 18, 0, 18, 17, 17, 0, 18, |
264 |
17, 0, 12, 18, 0, 12, 18, 20, 18, 0, |
12, 17, 0, 12, 18, 0, 12, 18, 20, 18, |
265 |
18, 12, 0, 18, 12, 18, 0, 30, 3, 0, |
0, 18, 12, 0, 18, 12, 18, 0, 30, 3, |
266 |
30, 0, 18, 15, 0, 17, 15, 0, 15, 0, |
0, 30, 0, 18, 15, 0, 17, 15, 0, 15, |
267 |
18, 13, 0, 17, 13, 0, 13, 0, 18, 6, |
0, 18, 13, 0, 17, 13, 0, 13, 0, 18, |
268 |
0, 17, 6, 0, 6, 0, 18, 8, 0, 17, |
6, 0, 17, 6, 0, 6, 0, 18, 8, 0, |
269 |
8, 0, 8, 0, 18, 11, 0, 17, 11, 0, |
17, 8, 0, 8, 0, 18, 11, 0, 17, 11, |
270 |
11, 0, 18, 14, 0, 17, 14, 0, 14, 0, |
0, 11, 0, 18, 14, 0, 17, 14, 0, 14, |
271 |
18, 0, 0, 10, 0 |
0, 18, 0, 0, 10, 0 |
272 |
}; |
}; |
273 |
|
|
274 |
#endif |
#endif |
275 |
|
|
276 |
#if YYDEBUG != 0 |
#if YYDEBUG |
277 |
static const short yyrline[] = { 0, |
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
278 |
189, 191, 194, 197, 199, 201, 203, 205, 207, 210, |
static const short yyrline[] = |
279 |
218, 225, 233, 240, 251, 254, 258, 261, 263, 267, |
{ |
280 |
273, 278, 285, 291, 311, 318, 326, 331, 337, 342, |
0, 189, 191, 194, 197, 199, 201, 203, 205, 207, |
281 |
350, 360, 363, 366, 368, 370, 372, 374, 376, 378, |
210, 218, 225, 233, 240, 251, 254, 258, 261, 263, |
282 |
380, 382, 384, 386, 388, 390, 392, 394, 396, 398, |
267, 273, 278, 285, 291, 311, 318, 326, 331, 337, |
283 |
402, 438, 441 |
342, 350, 360, 363, 366, 368, 370, 372, 374, 376, |
284 |
|
378, 380, 382, 384, 386, 388, 390, 392, 394, 396, |
285 |
|
398, 402, 438, 441 |
286 |
}; |
}; |
287 |
#endif |
#endif |
288 |
|
|
289 |
|
|
290 |
#if YYDEBUG != 0 || defined (YYERROR_VERBOSE) |
#if (YYDEBUG) || defined YYERROR_VERBOSE |
291 |
|
|
292 |
static const char * const yytname[] = { "$","error","$undefined.","tAGO","tDST", |
/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ |
293 |
"tDAY","tDAY_UNIT","tDAYZONE","tHOUR_UNIT","tLOCAL_ZONE","tMERIDIAN","tMINUTE_UNIT", |
static const char *const yytname[] = |
294 |
"tMONTH","tMONTH_UNIT","tSEC_UNIT","tYEAR_UNIT","tZONE","tSNUMBER","tUNUMBER", |
{ |
295 |
"':'","','","'/'","spec","item","time","local_zone","zone","day","date","rel", |
"$", "error", "$undefined.", "tAGO", "tDST", "tDAY", "tDAY_UNIT", |
296 |
"relunit","number","o_merid", NULL |
"tDAYZONE", "tHOUR_UNIT", "tLOCAL_ZONE", "tMERIDIAN", "tMINUTE_UNIT", |
297 |
|
"tMONTH", "tMONTH_UNIT", "tSEC_UNIT", "tYEAR_UNIT", "tZONE", "tSNUMBER", |
298 |
|
"tUNUMBER", "':'", "','", "'/'", "spec", "item", "time", "local_zone", |
299 |
|
"zone", "day", "date", "rel", "relunit", "number", "o_merid", 0 |
300 |
}; |
}; |
301 |
#endif |
#endif |
302 |
|
|
303 |
static const short yyr1[] = { 0, |
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
304 |
22, 22, 23, 23, 23, 23, 23, 23, 23, 24, |
static const short yyr1[] = |
305 |
24, 24, 24, 24, 25, 25, 26, 26, 26, 27, |
{ |
306 |
27, 27, 28, 28, 28, 28, 28, 28, 28, 28, |
0, 22, 22, 23, 23, 23, 23, 23, 23, 23, |
307 |
29, 29, 30, 30, 30, 30, 30, 30, 30, 30, |
24, 24, 24, 24, 24, 25, 25, 26, 26, 26, |
308 |
30, 30, 30, 30, 30, 30, 30, 30, 30, 30, |
27, 27, 27, 28, 28, 28, 28, 28, 28, 28, |
309 |
31, 32, 32 |
28, 29, 29, 30, 30, 30, 30, 30, 30, 30, |
310 |
|
30, 30, 30, 30, 30, 30, 30, 30, 30, 30, |
311 |
|
30, 31, 32, 32 |
312 |
}; |
}; |
313 |
|
|
314 |
static const short yyr2[] = { 0, |
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
315 |
0, 2, 1, 1, 1, 1, 1, 1, 1, 2, |
static const short yyr2[] = |
316 |
4, 4, 6, 6, 1, 2, 1, 1, 2, 1, |
{ |
317 |
2, 2, 3, 5, 3, 3, 2, 4, 2, 3, |
0, 0, 2, 1, 1, 1, 1, 1, 1, 1, |
318 |
2, 1, 2, 2, 1, 2, 2, 1, 2, 2, |
2, 4, 4, 6, 6, 1, 2, 1, 1, 2, |
319 |
1, 2, 2, 1, 2, 2, 1, 2, 2, 1, |
1, 2, 2, 3, 5, 3, 3, 2, 4, 2, |
320 |
1, 0, 1 |
3, 2, 1, 2, 2, 1, 2, 2, 1, 2, |
321 |
|
2, 1, 2, 2, 1, 2, 2, 1, 2, 2, |
322 |
|
1, 1, 0, 1 |
323 |
}; |
}; |
324 |
|
|
325 |
static const short yydefact[] = { 1, |
/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE |
326 |
0, 20, 41, 18, 44, 15, 47, 0, 38, 50, |
doesn't specify something else to do. Zero means the default is an |
327 |
35, 17, 0, 51, 2, 3, 4, 5, 7, 6, |
error. */ |
328 |
8, 32, 9, 21, 16, 27, 19, 40, 43, 46, |
static const short yydefact[] = |
329 |
37, 49, 34, 22, 39, 42, 10, 45, 29, 36, |
{ |
330 |
48, 33, 0, 0, 0, 31, 0, 26, 30, 25, |
1, 0, 20, 41, 18, 44, 15, 47, 0, 38, |
331 |
52, 23, 28, 53, 12, 0, 11, 0, 52, 24, |
50, 35, 17, 0, 51, 2, 3, 4, 5, 7, |
332 |
14, 13, 0, 0 |
6, 8, 32, 9, 21, 16, 27, 19, 40, 43, |
333 |
|
46, 37, 49, 34, 22, 39, 42, 10, 45, 29, |
334 |
|
36, 48, 33, 0, 0, 0, 31, 0, 26, 30, |
335 |
|
25, 52, 23, 28, 53, 12, 0, 11, 0, 52, |
336 |
|
24, 14, 13, 0, 0 |
337 |
}; |
}; |
338 |
|
|
339 |
static const short yydefgoto[] = { 1, |
static const short yydefgoto[] = |
340 |
15, 16, 17, 18, 19, 20, 21, 22, 23, 57 |
{ |
341 |
|
1, 15, 16, 17, 18, 19, 20, 21, 22, 23, |
342 |
|
57 |
343 |
}; |
}; |
344 |
|
|
345 |
static const short yypact[] = {-32768, |
static const short yypact[] = |
346 |
0, 1,-32768,-32768,-32768, 19,-32768, -14,-32768,-32768, |
{ |
347 |
-32768, 32, 26, 14,-32768,-32768,-32768,-32768,-32768,-32768, |
-32768, 0, 1,-32768,-32768,-32768, 19,-32768, -14,-32768, |
348 |
-32768, 27,-32768,-32768,-32768, 22,-32768,-32768,-32768,-32768, |
-32768,-32768, 32, 26, 14,-32768,-32768,-32768,-32768,-32768, |
349 |
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -16,-32768, |
-32768,-32768, 27,-32768,-32768,-32768, 22,-32768,-32768,-32768, |
350 |
-32768,-32768, 29, 25, 30,-32768, 31,-32768,-32768,-32768, |
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -16, |
351 |
28, 23,-32768,-32768,-32768, 33,-32768, 34, -7,-32768, |
-32768,-32768,-32768, 29, 25, 30,-32768, 31,-32768,-32768, |
352 |
-32768,-32768, 50,-32768 |
-32768, 28, 23,-32768,-32768,-32768, 33,-32768, 34, -7, |
353 |
|
-32768,-32768,-32768, 50,-32768 |
354 |
}; |
}; |
355 |
|
|
356 |
static const short yypgoto[] = {-32768, |
static const short yypgoto[] = |
357 |
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, -6 |
{ |
358 |
|
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768, |
359 |
|
-6 |
360 |
}; |
}; |
361 |
|
|
362 |
|
|
363 |
#define YYLAST 53 |
#define YYLAST 53 |
364 |
|
|
365 |
|
|
366 |
static const short yytable[] = { 63, |
static const short yytable[] = |
367 |
48, 49, 54, 26, 2, 3, 4, 5, 6, 61, |
{ |
368 |
7, 8, 9, 10, 11, 12, 13, 14, 34, 35, |
63, 48, 49, 54, 26, 2, 3, 4, 5, 6, |
369 |
24, 36, 25, 37, 38, 39, 40, 41, 42, 46, |
61, 7, 8, 9, 10, 11, 12, 13, 14, 34, |
370 |
43, 28, 44, 29, 45, 27, 30, 54, 31, 32, |
35, 24, 36, 25, 37, 38, 39, 40, 41, 42, |
371 |
33, 47, 51, 58, 55, 50, 56, 52, 53, 64, |
46, 43, 28, 44, 29, 45, 27, 30, 54, 31, |
372 |
59, 60, 62 |
32, 33, 47, 51, 58, 55, 50, 56, 52, 53, |
373 |
|
64, 59, 60, 62 |
374 |
}; |
}; |
375 |
|
|
376 |
static const short yycheck[] = { 0, |
static const short yycheck[] = |
377 |
17, 18, 10, 18, 5, 6, 7, 8, 9, 17, |
{ |
378 |
11, 12, 13, 14, 15, 16, 17, 18, 5, 6, |
0, 17, 18, 10, 18, 5, 6, 7, 8, 9, |
379 |
20, 8, 4, 10, 11, 12, 13, 14, 15, 3, |
17, 11, 12, 13, 14, 15, 16, 17, 18, 5, |
380 |
17, 6, 19, 8, 21, 4, 11, 10, 13, 14, |
6, 20, 8, 4, 10, 11, 12, 13, 14, 15, |
381 |
15, 20, 18, 21, 17, 17, 19, 18, 18, 0, |
3, 17, 6, 19, 8, 21, 4, 11, 10, 13, |
382 |
18, 18, 59 |
14, 15, 20, 18, 21, 17, 17, 19, 18, 18, |
383 |
|
0, 18, 18, 59 |
384 |
}; |
}; |
385 |
#define YYPURE 1 |
#define YYPURE 1 |
386 |
|
|
387 |
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ |
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ |
388 |
#line 3 "/usr/share/bison/bison.simple" |
#line 3 "/usr/share/bison/bison.simple" |
|
/* This file comes from bison-1.28. */ |
|
389 |
|
|
390 |
/* Skeleton output parser for bison, |
/* Skeleton output parser for bison, |
391 |
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. |
|
392 |
|
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software |
393 |
|
Foundation, Inc. |
394 |
|
|
395 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
396 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
412 |
This special exception was added by the Free Software Foundation |
This special exception was added by the Free Software Foundation |
413 |
in version 1.24 of Bison. */ |
in version 1.24 of Bison. */ |
414 |
|
|
415 |
/* This is the parser code that is written into each bison parser |
/* This is the parser code that is written into each bison parser when |
416 |
when the %semantic_parser declaration is not specified in the grammar. |
the %semantic_parser declaration is not specified in the grammar. |
417 |
It was written by Richard Stallman by simplifying the hairy parser |
It was written by Richard Stallman by simplifying the hairy parser |
418 |
used when %semantic_parser is specified. */ |
used when %semantic_parser is specified. */ |
419 |
|
|
420 |
#ifndef YYSTACK_USE_ALLOCA |
/* All symbols defined below should begin with yy or YY, to avoid |
421 |
#ifdef alloca |
infringing on user name space. This should be done even for local |
422 |
#define YYSTACK_USE_ALLOCA |
variables, as they might otherwise be expanded by user macros. |
423 |
#else /* alloca not defined */ |
There are some unavoidable exceptions within include files to |
424 |
#ifdef __GNUC__ |
define necessary library symbols; they are noted "INFRINGES ON |
425 |
#define YYSTACK_USE_ALLOCA |
USER NAME SPACE" below. */ |
426 |
#define alloca __builtin_alloca |
|
427 |
#else /* not GNU C. */ |
#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) |
428 |
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) |
|
429 |
#define YYSTACK_USE_ALLOCA |
/* The parser invokes alloca or malloc; define the necessary symbols. */ |
430 |
#include <alloca.h> |
|
431 |
#else /* not sparc */ |
# if YYSTACK_USE_ALLOCA |
432 |
/* We think this test detects Watcom and Microsoft C. */ |
# define YYSTACK_ALLOC alloca |
433 |
/* This used to test MSDOS, but that is a bad idea |
# else |
434 |
since that symbol is in the user namespace. */ |
# ifndef YYSTACK_USE_ALLOCA |
435 |
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) |
# if defined (alloca) || defined (_ALLOCA_H) |
436 |
#if 0 /* No need for malloc.h, which pollutes the namespace; |
# define YYSTACK_ALLOC alloca |
437 |
instead, just don't use alloca. */ |
# else |
438 |
#include <malloc.h> |
# ifdef __GNUC__ |
439 |
#endif |
# define YYSTACK_ALLOC __builtin_alloca |
440 |
#else /* not MSDOS, or __TURBOC__ */ |
# endif |
441 |
#if defined(_AIX) |
# endif |
442 |
/* I don't know what this was needed for, but it pollutes the namespace. |
# endif |
443 |
So I turned it off. rms, 2 May 1997. */ |
# endif |
444 |
/* #include <malloc.h> */ |
|
445 |
#pragma alloca |
# ifdef YYSTACK_ALLOC |
446 |
#define YYSTACK_USE_ALLOCA |
/* Pacify GCC's `empty if-body' warning. */ |
447 |
#else /* not MSDOS, or __TURBOC__, or _AIX */ |
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
448 |
#if 0 |
# else |
449 |
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, |
# if defined (__STDC__) || defined (__cplusplus) |
450 |
and on HPUX 10. Eventually we can turn this on. */ |
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
451 |
#define YYSTACK_USE_ALLOCA |
# define YYSIZE_T size_t |
452 |
#define alloca __builtin_alloca |
# endif |
453 |
#endif /* __hpux */ |
# define YYSTACK_ALLOC malloc |
454 |
#endif |
# define YYSTACK_FREE free |
455 |
#endif /* not _AIX */ |
# endif |
456 |
#endif /* not MSDOS, or __TURBOC__ */ |
#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ |
457 |
#endif /* not sparc */ |
|
458 |
#endif /* not GNU C */ |
|
459 |
#endif /* alloca not defined */ |
#if (! defined (yyoverflow) \ |
460 |
#endif /* YYSTACK_USE_ALLOCA not defined */ |
&& (! defined (__cplusplus) \ |
461 |
|
|| (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
462 |
|
|
463 |
|
/* A type that is properly aligned for any stack member. */ |
464 |
|
union yyalloc |
465 |
|
{ |
466 |
|
short yyss; |
467 |
|
YYSTYPE yyvs; |
468 |
|
# if YYLSP_NEEDED |
469 |
|
YYLTYPE yyls; |
470 |
|
# endif |
471 |
|
}; |
472 |
|
|
473 |
|
/* The size of the maximum gap between one aligned stack and the next. */ |
474 |
|
# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) |
475 |
|
|
476 |
|
/* The size of an array large to enough to hold all stacks, each with |
477 |
|
N elements. */ |
478 |
|
# if YYLSP_NEEDED |
479 |
|
# define YYSTACK_BYTES(N) \ |
480 |
|
((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ |
481 |
|
+ 2 * YYSTACK_GAP_MAX) |
482 |
|
# else |
483 |
|
# define YYSTACK_BYTES(N) \ |
484 |
|
((N) * (sizeof (short) + sizeof (YYSTYPE)) \ |
485 |
|
+ YYSTACK_GAP_MAX) |
486 |
|
# endif |
487 |
|
|
488 |
|
/* Copy COUNT objects from FROM to TO. The source and destination do |
489 |
|
not overlap. */ |
490 |
|
# ifndef YYCOPY |
491 |
|
# if 1 < __GNUC__ |
492 |
|
# define YYCOPY(To, From, Count) \ |
493 |
|
__builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
494 |
|
# else |
495 |
|
# define YYCOPY(To, From, Count) \ |
496 |
|
do \ |
497 |
|
{ \ |
498 |
|
register YYSIZE_T yyi; \ |
499 |
|
for (yyi = 0; yyi < (Count); yyi++) \ |
500 |
|
(To)[yyi] = (From)[yyi]; \ |
501 |
|
} \ |
502 |
|
while (0) |
503 |
|
# endif |
504 |
|
# endif |
505 |
|
|
506 |
|
/* Relocate STACK from its old location to the new one. The |
507 |
|
local variables YYSIZE and YYSTACKSIZE give the old and new number of |
508 |
|
elements in the stack, and YYPTR gives the new location of the |
509 |
|
stack. Advance YYPTR to a properly aligned location for the next |
510 |
|
stack. */ |
511 |
|
# define YYSTACK_RELOCATE(Stack) \ |
512 |
|
do \ |
513 |
|
{ \ |
514 |
|
YYSIZE_T yynewbytes; \ |
515 |
|
YYCOPY (&yyptr->Stack, Stack, yysize); \ |
516 |
|
Stack = &yyptr->Stack; \ |
517 |
|
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ |
518 |
|
yyptr += yynewbytes / sizeof (*yyptr); \ |
519 |
|
} \ |
520 |
|
while (0) |
521 |
|
|
|
#ifdef YYSTACK_USE_ALLOCA |
|
|
#define YYSTACK_ALLOC alloca |
|
|
#else |
|
|
#define YYSTACK_ALLOC malloc |
|
522 |
#endif |
#endif |
523 |
|
|
524 |
/* Note: there must be only one dollar sign in this file. |
|
525 |
It is replaced by the list of actions, each action |
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) |
526 |
as one case of the switch. */ |
# define YYSIZE_T __SIZE_TYPE__ |
527 |
|
#endif |
528 |
|
#if ! defined (YYSIZE_T) && defined (size_t) |
529 |
|
# define YYSIZE_T size_t |
530 |
|
#endif |
531 |
|
#if ! defined (YYSIZE_T) |
532 |
|
# if defined (__STDC__) || defined (__cplusplus) |
533 |
|
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
534 |
|
# define YYSIZE_T size_t |
535 |
|
# endif |
536 |
|
#endif |
537 |
|
#if ! defined (YYSIZE_T) |
538 |
|
# define YYSIZE_T unsigned int |
539 |
|
#endif |
540 |
|
|
541 |
#define yyerrok (yyerrstatus = 0) |
#define yyerrok (yyerrstatus = 0) |
542 |
#define yyclearin (yychar = YYEMPTY) |
#define yyclearin (yychar = YYEMPTY) |
545 |
#define YYACCEPT goto yyacceptlab |
#define YYACCEPT goto yyacceptlab |
546 |
#define YYABORT goto yyabortlab |
#define YYABORT goto yyabortlab |
547 |
#define YYERROR goto yyerrlab1 |
#define YYERROR goto yyerrlab1 |
548 |
/* Like YYERROR except do call yyerror. |
/* Like YYERROR except do call yyerror. This remains here temporarily |
549 |
This remains here temporarily to ease the |
to ease the transition to the new meaning of YYERROR, for GCC. |
|
transition to the new meaning of YYERROR, for GCC. |
|
550 |
Once GCC version 2 has supplanted version 1, this can go. */ |
Once GCC version 2 has supplanted version 1, this can go. */ |
551 |
#define YYFAIL goto yyerrlab |
#define YYFAIL goto yyerrlab |
552 |
#define YYRECOVERING() (!!yyerrstatus) |
#define YYRECOVERING() (!!yyerrstatus) |
553 |
#define YYBACKUP(token, value) \ |
#define YYBACKUP(Token, Value) \ |
554 |
do \ |
do \ |
555 |
if (yychar == YYEMPTY && yylen == 1) \ |
if (yychar == YYEMPTY && yylen == 1) \ |
556 |
{ yychar = (token), yylval = (value); \ |
{ \ |
557 |
|
yychar = (Token); \ |
558 |
|
yylval = (Value); \ |
559 |
yychar1 = YYTRANSLATE (yychar); \ |
yychar1 = YYTRANSLATE (yychar); \ |
560 |
YYPOPSTACK; \ |
YYPOPSTACK; \ |
561 |
goto yybackup; \ |
goto yybackup; \ |
562 |
} \ |
} \ |
563 |
else \ |
else \ |
564 |
{ yyerror ("syntax error: cannot back up"); YYERROR; } \ |
{ \ |
565 |
|
yyerror ("syntax error: cannot back up"); \ |
566 |
|
YYERROR; \ |
567 |
|
} \ |
568 |
while (0) |
while (0) |
569 |
|
|
570 |
#define YYTERROR 1 |
#define YYTERROR 1 |
571 |
#define YYERRCODE 256 |
#define YYERRCODE 256 |
572 |
|
|
|
#ifndef YYPURE |
|
|
#define YYLEX yylex() |
|
|
#endif |
|
|
|
|
|
#ifdef YYPURE |
|
|
#ifdef YYLSP_NEEDED |
|
|
#ifdef YYLEX_PARAM |
|
|
#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM) |
|
|
#else |
|
|
#define YYLEX yylex(&yylval, &yylloc) |
|
|
#endif |
|
|
#else /* not YYLSP_NEEDED */ |
|
|
#ifdef YYLEX_PARAM |
|
|
#define YYLEX yylex(&yylval, YYLEX_PARAM) |
|
|
#else |
|
|
#define YYLEX yylex(&yylval) |
|
|
#endif |
|
|
#endif /* not YYLSP_NEEDED */ |
|
|
#endif |
|
|
|
|
|
/* If nonreentrant, generate the variables here */ |
|
|
|
|
|
#ifndef YYPURE |
|
573 |
|
|
574 |
int yychar; /* the lookahead symbol */ |
/* YYLLOC_DEFAULT -- Compute the default location (before the actions |
575 |
YYSTYPE yylval; /* the semantic value of the */ |
are run). |
|
/* lookahead symbol */ |
|
576 |
|
|
577 |
#ifdef YYLSP_NEEDED |
When YYLLOC_DEFAULT is run, CURRENT is set the location of the |
578 |
YYLTYPE yylloc; /* location data for the lookahead */ |
first token. By default, to implement support for ranges, extend |
579 |
/* symbol */ |
its range to the last symbol. */ |
580 |
|
|
581 |
|
#ifndef YYLLOC_DEFAULT |
582 |
|
# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
583 |
|
Current.last_line = Rhs[N].last_line; \ |
584 |
|
Current.last_column = Rhs[N].last_column; |
585 |
#endif |
#endif |
586 |
|
|
|
int yynerrs; /* number of parse errors so far */ |
|
|
#endif /* not YYPURE */ |
|
587 |
|
|
588 |
#if YYDEBUG != 0 |
/* YYLEX -- calling `yylex' with the right arguments. */ |
589 |
int yydebug; /* nonzero means print parse trace */ |
|
590 |
/* Since this is uninitialized, it does not stop multiple parsers |
#if YYPURE |
591 |
from coexisting. */ |
# if YYLSP_NEEDED |
592 |
#endif |
# ifdef YYLEX_PARAM |
593 |
|
# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) |
594 |
|
# else |
595 |
|
# define YYLEX yylex (&yylval, &yylloc) |
596 |
|
# endif |
597 |
|
# else /* !YYLSP_NEEDED */ |
598 |
|
# ifdef YYLEX_PARAM |
599 |
|
# define YYLEX yylex (&yylval, YYLEX_PARAM) |
600 |
|
# else |
601 |
|
# define YYLEX yylex (&yylval) |
602 |
|
# endif |
603 |
|
# endif /* !YYLSP_NEEDED */ |
604 |
|
#else /* !YYPURE */ |
605 |
|
# define YYLEX yylex () |
606 |
|
#endif /* !YYPURE */ |
607 |
|
|
608 |
|
|
609 |
|
/* Enable debugging if requested. */ |
610 |
|
#if YYDEBUG |
611 |
|
|
612 |
|
# ifndef YYFPRINTF |
613 |
|
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
614 |
|
# define YYFPRINTF fprintf |
615 |
|
# endif |
616 |
|
|
617 |
/* YYINITDEPTH indicates the initial size of the parser's stacks */ |
# define YYDPRINTF(Args) \ |
618 |
|
do { \ |
619 |
|
if (yydebug) \ |
620 |
|
YYFPRINTF Args; \ |
621 |
|
} while (0) |
622 |
|
/* Nonzero means print parse trace. It is left uninitialized so that |
623 |
|
multiple parsers can coexist. */ |
624 |
|
int yydebug; |
625 |
|
#else /* !YYDEBUG */ |
626 |
|
# define YYDPRINTF(Args) |
627 |
|
#endif /* !YYDEBUG */ |
628 |
|
|
629 |
|
/* YYINITDEPTH -- initial size of the parser's stacks. */ |
630 |
#ifndef YYINITDEPTH |
#ifndef YYINITDEPTH |
631 |
#define YYINITDEPTH 200 |
# define YYINITDEPTH 200 |
632 |
#endif |
#endif |
633 |
|
|
634 |
/* YYMAXDEPTH is the maximum size the stacks can grow to |
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
635 |
(effective only if the built-in stack extension method is used). */ |
if the built-in stack extension method is used). |
636 |
|
|
637 |
|
Do not make this value too large; the results are undefined if |
638 |
|
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) |
639 |
|
evaluated with infinite-precision integer arithmetic. */ |
640 |
|
|
641 |
#if YYMAXDEPTH == 0 |
#if YYMAXDEPTH == 0 |
642 |
#undef YYMAXDEPTH |
# undef YYMAXDEPTH |
643 |
#endif |
#endif |
644 |
|
|
645 |
#ifndef YYMAXDEPTH |
#ifndef YYMAXDEPTH |
646 |
#define YYMAXDEPTH 10000 |
# define YYMAXDEPTH 10000 |
647 |
#endif |
#endif |
648 |
|
|
649 |
/* Define __yy_memcpy. Note that the size argument |
#ifdef YYERROR_VERBOSE |
650 |
should be passed with type unsigned int, because that is what the non-GCC |
|
651 |
definitions require. With GCC, __builtin_memcpy takes an arg |
# ifndef yystrlen |
652 |
of type size_t, but it can handle unsigned int. */ |
# if defined (__GLIBC__) && defined (_STRING_H) |
653 |
|
# define yystrlen strlen |
654 |
#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ |
# else |
655 |
#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) |
/* Return the length of YYSTR. */ |
656 |
#else /* not GNU C or C++ */ |
static YYSIZE_T |
657 |
#ifndef __cplusplus |
# if defined (__STDC__) || defined (__cplusplus) |
658 |
|
yystrlen (const char *yystr) |
659 |
/* This is the most reliable way to avoid incompatibilities |
# else |
660 |
in available built-in functions on various systems. */ |
yystrlen (yystr) |
661 |
static void |
const char *yystr; |
662 |
__yy_memcpy (to, from, count) |
# endif |
663 |
char *to; |
{ |
664 |
char *from; |
register const char *yys = yystr; |
665 |
unsigned int count; |
|
666 |
{ |
while (*yys++ != '\0') |
667 |
register char *f = from; |
continue; |
|
register char *t = to; |
|
|
register int i = count; |
|
668 |
|
|
669 |
while (i-- > 0) |
return yys - yystr - 1; |
|
*t++ = *f++; |
|
670 |
} |
} |
671 |
|
# endif |
672 |
|
# endif |
673 |
|
|
674 |
#else /* __cplusplus */ |
# ifndef yystpcpy |
675 |
|
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) |
676 |
|
# include <string.h> |
677 |
|
# define yystpcpy stpcpy |
678 |
|
# else |
679 |
|
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
680 |
|
YYDEST. */ |
681 |
|
static char * |
682 |
|
# if defined (__STDC__) || defined (__cplusplus) |
683 |
|
yystpcpy (char *yydest, const char *yysrc) |
684 |
|
# else |
685 |
|
yystpcpy (yydest, yysrc) |
686 |
|
char *yydest; |
687 |
|
const char *yysrc; |
688 |
|
# endif |
689 |
|
{ |
690 |
|
register char *yyd = yydest; |
691 |
|
register const char *yys = yysrc; |
692 |
|
|
693 |
/* This is the most reliable way to avoid incompatibilities |
while ((*yyd++ = *yys++) != '\0') |
694 |
in available built-in functions on various systems. */ |
continue; |
|
static void |
|
|
__yy_memcpy (char *to, char *from, unsigned int count) |
|
|
{ |
|
|
register char *t = to; |
|
|
register char *f = from; |
|
|
register int i = count; |
|
695 |
|
|
696 |
while (i-- > 0) |
return yyd - 1; |
|
*t++ = *f++; |
|
697 |
} |
} |
698 |
|
# endif |
699 |
#endif |
# endif |
700 |
#endif |
#endif |
701 |
|
|
702 |
#line 217 "/usr/share/bison/bison.simple" |
#line 316 "/usr/share/bison/bison.simple" |
703 |
|
|
704 |
|
|
705 |
/* The user can define YYPARSE_PARAM as the name of an argument to be passed |
/* The user can define YYPARSE_PARAM as the name of an argument to be passed |
706 |
into yyparse. The argument should have type void *. |
into yyparse. The argument should have type void *. |
709 |
to the proper pointer type. */ |
to the proper pointer type. */ |
710 |
|
|
711 |
#ifdef YYPARSE_PARAM |
#ifdef YYPARSE_PARAM |
712 |
#ifdef __cplusplus |
# if defined (__STDC__) || defined (__cplusplus) |
713 |
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM |
# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM |
714 |
#define YYPARSE_PARAM_DECL |
# define YYPARSE_PARAM_DECL |
715 |
#else /* not __cplusplus */ |
# else |
716 |
#define YYPARSE_PARAM_ARG YYPARSE_PARAM |
# define YYPARSE_PARAM_ARG YYPARSE_PARAM |
717 |
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; |
# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; |
718 |
#endif /* not __cplusplus */ |
# endif |
719 |
#else /* not YYPARSE_PARAM */ |
#else /* !YYPARSE_PARAM */ |
720 |
#define YYPARSE_PARAM_ARG |
# define YYPARSE_PARAM_ARG |
721 |
#define YYPARSE_PARAM_DECL |
# define YYPARSE_PARAM_DECL |
722 |
#endif /* not YYPARSE_PARAM */ |
#endif /* !YYPARSE_PARAM */ |
723 |
|
|
724 |
/* Prevent warning if -Wstrict-prototypes. */ |
/* Prevent warning if -Wstrict-prototypes. */ |
725 |
#ifdef __GNUC__ |
#ifdef __GNUC__ |
726 |
#ifdef YYPARSE_PARAM |
# ifdef YYPARSE_PARAM |
727 |
int yyparse (void *); |
int yyparse (void *); |
728 |
#else |
# else |
729 |
int yyparse (void); |
int yyparse (void); |
730 |
|
# endif |
731 |
#endif |
#endif |
732 |
|
|
733 |
|
/* YY_DECL_VARIABLES -- depending whether we use a pure parser, |
734 |
|
variables are global, or local to YYPARSE. */ |
735 |
|
|
736 |
|
#define YY_DECL_NON_LSP_VARIABLES \ |
737 |
|
/* The lookahead symbol. */ \ |
738 |
|
int yychar; \ |
739 |
|
\ |
740 |
|
/* The semantic value of the lookahead symbol. */ \ |
741 |
|
YYSTYPE yylval; \ |
742 |
|
\ |
743 |
|
/* Number of parse errors so far. */ \ |
744 |
|
int yynerrs; |
745 |
|
|
746 |
|
#if YYLSP_NEEDED |
747 |
|
# define YY_DECL_VARIABLES \ |
748 |
|
YY_DECL_NON_LSP_VARIABLES \ |
749 |
|
\ |
750 |
|
/* Location data for the lookahead symbol. */ \ |
751 |
|
YYLTYPE yylloc; |
752 |
|
#else |
753 |
|
# define YY_DECL_VARIABLES \ |
754 |
|
YY_DECL_NON_LSP_VARIABLES |
755 |
#endif |
#endif |
756 |
|
|
757 |
|
|
758 |
|
/* If nonreentrant, generate the variables here. */ |
759 |
|
|
760 |
|
#if !YYPURE |
761 |
|
YY_DECL_VARIABLES |
762 |
|
#endif /* !YYPURE */ |
763 |
|
|
764 |
int |
int |
765 |
yyparse(YYPARSE_PARAM_ARG) |
yyparse (YYPARSE_PARAM_ARG) |
766 |
YYPARSE_PARAM_DECL |
YYPARSE_PARAM_DECL |
767 |
{ |
{ |
768 |
|
/* If reentrant, generate the variables here. */ |
769 |
|
#if YYPURE |
770 |
|
YY_DECL_VARIABLES |
771 |
|
#endif /* !YYPURE */ |
772 |
|
|
773 |
register int yystate; |
register int yystate; |
774 |
register int yyn; |
register int yyn; |
775 |
|
int yyresult; |
776 |
|
/* Number of tokens to shift before error messages enabled. */ |
777 |
|
int yyerrstatus; |
778 |
|
/* Lookahead token as an internal (translated) token number. */ |
779 |
|
int yychar1 = 0; |
780 |
|
|
781 |
|
/* Three stacks and their tools: |
782 |
|
`yyss': related to states, |
783 |
|
`yyvs': related to semantic values, |
784 |
|
`yyls': related to locations. |
785 |
|
|
786 |
|
Refer to the stacks thru separate pointers, to allow yyoverflow |
787 |
|
to reallocate them elsewhere. */ |
788 |
|
|
789 |
|
/* The state stack. */ |
790 |
|
short yyssa[YYINITDEPTH]; |
791 |
|
short *yyss = yyssa; |
792 |
register short *yyssp; |
register short *yyssp; |
|
register YYSTYPE *yyvsp; |
|
|
int yyerrstatus; /* number of tokens to shift before error messages enabled */ |
|
|
int yychar1 = 0; /* lookahead token as an internal (translated) token number */ |
|
|
|
|
|
short yyssa[YYINITDEPTH]; /* the state stack */ |
|
|
YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ |
|
793 |
|
|
794 |
short *yyss = yyssa; /* refer to the stacks thru separate pointers */ |
/* The semantic value stack. */ |
795 |
YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ |
YYSTYPE yyvsa[YYINITDEPTH]; |
796 |
|
YYSTYPE *yyvs = yyvsa; |
797 |
|
register YYSTYPE *yyvsp; |
798 |
|
|
799 |
#ifdef YYLSP_NEEDED |
#if YYLSP_NEEDED |
800 |
YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ |
/* The location stack. */ |
801 |
|
YYLTYPE yylsa[YYINITDEPTH]; |
802 |
YYLTYPE *yyls = yylsa; |
YYLTYPE *yyls = yylsa; |
803 |
YYLTYPE *yylsp; |
YYLTYPE *yylsp; |
804 |
|
#endif |
805 |
|
|
806 |
#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) |
#if YYLSP_NEEDED |
807 |
|
# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) |
808 |
#else |
#else |
809 |
#define YYPOPSTACK (yyvsp--, yyssp--) |
# define YYPOPSTACK (yyvsp--, yyssp--) |
810 |
#endif |
#endif |
811 |
|
|
812 |
int yystacksize = YYINITDEPTH; |
YYSIZE_T yystacksize = YYINITDEPTH; |
|
int yyfree_stacks = 0; |
|
813 |
|
|
|
#ifdef YYPURE |
|
|
int yychar; |
|
|
YYSTYPE yylval; |
|
|
int yynerrs; |
|
|
#ifdef YYLSP_NEEDED |
|
|
YYLTYPE yylloc; |
|
|
#endif |
|
|
#endif |
|
814 |
|
|
815 |
YYSTYPE yyval; /* the variable used to return */ |
/* The variables used to return semantic value and location from the |
816 |
/* semantic values from the action */ |
action routines. */ |
817 |
/* routines */ |
YYSTYPE yyval; |
818 |
|
#if YYLSP_NEEDED |
819 |
|
YYLTYPE yyloc; |
820 |
|
#endif |
821 |
|
|
822 |
|
/* When reducing, the number of symbols on the RHS of the reduced |
823 |
|
rule. */ |
824 |
int yylen; |
int yylen; |
825 |
|
|
826 |
#if YYDEBUG != 0 |
YYDPRINTF ((stderr, "Starting parse\n")); |
|
if (yydebug) |
|
|
fprintf(stderr, "Starting parse\n"); |
|
|
#endif |
|
827 |
|
|
828 |
yystate = 0; |
yystate = 0; |
829 |
yyerrstatus = 0; |
yyerrstatus = 0; |
835 |
so that they stay on the same level as the state stack. |
so that they stay on the same level as the state stack. |
836 |
The wasted elements are never initialized. */ |
The wasted elements are never initialized. */ |
837 |
|
|
838 |
yyssp = yyss - 1; |
yyssp = yyss; |
839 |
yyvsp = yyvs; |
yyvsp = yyvs; |
840 |
#ifdef YYLSP_NEEDED |
#if YYLSP_NEEDED |
841 |
yylsp = yyls; |
yylsp = yyls; |
842 |
#endif |
#endif |
843 |
|
goto yysetstate; |
844 |
|
|
845 |
/* Push a new state, which is found in yystate . */ |
/*------------------------------------------------------------. |
846 |
/* In all cases, when you get here, the value and location stacks |
| yynewstate -- Push a new state, which is found in yystate. | |
847 |
have just been pushed. so pushing a state here evens the stacks. */ |
`------------------------------------------------------------*/ |
848 |
yynewstate: |
yynewstate: |
849 |
|
/* In all cases, when you get here, the value and location stacks |
850 |
|
have just been pushed. so pushing a state here evens the stacks. |
851 |
|
*/ |
852 |
|
yyssp++; |
853 |
|
|
854 |
*++yyssp = yystate; |
yysetstate: |
855 |
|
*yyssp = yystate; |
856 |
|
|
857 |
if (yyssp >= yyss + yystacksize - 1) |
if (yyssp >= yyss + yystacksize - 1) |
858 |
{ |
{ |
|
/* Give user a chance to reallocate the stack */ |
|
|
/* Use copies of these so that the &'s don't force the real ones into memory. */ |
|
|
YYSTYPE *yyvs1 = yyvs; |
|
|
short *yyss1 = yyss; |
|
|
#ifdef YYLSP_NEEDED |
|
|
YYLTYPE *yyls1 = yyls; |
|
|
#endif |
|
|
|
|
859 |
/* Get the current used size of the three stacks, in elements. */ |
/* Get the current used size of the three stacks, in elements. */ |
860 |
int size = yyssp - yyss + 1; |
YYSIZE_T yysize = yyssp - yyss + 1; |
861 |
|
|
862 |
#ifdef yyoverflow |
#ifdef yyoverflow |
863 |
/* Each stack pointer address is followed by the size of |
{ |
864 |
the data in use in that stack, in bytes. */ |
/* Give user a chance to reallocate the stack. Use copies of |
865 |
#ifdef YYLSP_NEEDED |
these so that the &'s don't force the real ones into |
866 |
/* This used to be a conditional around just the two extra args, |
memory. */ |
867 |
but that might be undefined if yyoverflow is a macro. */ |
YYSTYPE *yyvs1 = yyvs; |
868 |
yyoverflow("parser stack overflow", |
short *yyss1 = yyss; |
869 |
&yyss1, size * sizeof (*yyssp), |
|
870 |
&yyvs1, size * sizeof (*yyvsp), |
/* Each stack pointer address is followed by the size of the |
871 |
&yyls1, size * sizeof (*yylsp), |
data in use in that stack, in bytes. */ |
872 |
&yystacksize); |
# if YYLSP_NEEDED |
873 |
#else |
YYLTYPE *yyls1 = yyls; |
874 |
yyoverflow("parser stack overflow", |
/* This used to be a conditional around just the two extra args, |
875 |
&yyss1, size * sizeof (*yyssp), |
but that might be undefined if yyoverflow is a macro. */ |
876 |
&yyvs1, size * sizeof (*yyvsp), |
yyoverflow ("parser stack overflow", |
877 |
&yystacksize); |
&yyss1, yysize * sizeof (*yyssp), |
878 |
#endif |
&yyvs1, yysize * sizeof (*yyvsp), |
879 |
|
&yyls1, yysize * sizeof (*yylsp), |
880 |
yyss = yyss1; yyvs = yyvs1; |
&yystacksize); |
881 |
#ifdef YYLSP_NEEDED |
yyls = yyls1; |
882 |
yyls = yyls1; |
# else |
883 |
#endif |
yyoverflow ("parser stack overflow", |
884 |
|
&yyss1, yysize * sizeof (*yyssp), |
885 |
|
&yyvs1, yysize * sizeof (*yyvsp), |
886 |
|
&yystacksize); |
887 |
|
# endif |
888 |
|
yyss = yyss1; |
889 |
|
yyvs = yyvs1; |
890 |
|
} |
891 |
#else /* no yyoverflow */ |
#else /* no yyoverflow */ |
892 |
|
# ifndef YYSTACK_RELOCATE |
893 |
|
goto yyoverflowlab; |
894 |
|
# else |
895 |
/* Extend the stack our own way. */ |
/* Extend the stack our own way. */ |
896 |
if (yystacksize >= YYMAXDEPTH) |
if (yystacksize >= YYMAXDEPTH) |
897 |
{ |
goto yyoverflowlab; |
|
yyerror("parser stack overflow"); |
|
|
if (yyfree_stacks) |
|
|
{ |
|
|
free (yyss); |
|
|
free (yyvs); |
|
|
#ifdef YYLSP_NEEDED |
|
|
free (yyls); |
|
|
#endif |
|
|
} |
|
|
return 2; |
|
|
} |
|
898 |
yystacksize *= 2; |
yystacksize *= 2; |
899 |
if (yystacksize > YYMAXDEPTH) |
if (yystacksize > YYMAXDEPTH) |
900 |
yystacksize = YYMAXDEPTH; |
yystacksize = YYMAXDEPTH; |
901 |
#ifndef YYSTACK_USE_ALLOCA |
|
902 |
yyfree_stacks = 1; |
{ |
903 |
#endif |
short *yyss1 = yyss; |
904 |
yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); |
union yyalloc *yyptr = |
905 |
__yy_memcpy ((char *)yyss, (char *)yyss1, |
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
906 |
size * (unsigned int) sizeof (*yyssp)); |
if (! yyptr) |
907 |
yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); |
goto yyoverflowlab; |
908 |
__yy_memcpy ((char *)yyvs, (char *)yyvs1, |
YYSTACK_RELOCATE (yyss); |
909 |
size * (unsigned int) sizeof (*yyvsp)); |
YYSTACK_RELOCATE (yyvs); |
910 |
#ifdef YYLSP_NEEDED |
# if YYLSP_NEEDED |
911 |
yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); |
YYSTACK_RELOCATE (yyls); |
912 |
__yy_memcpy ((char *)yyls, (char *)yyls1, |
# endif |
913 |
size * (unsigned int) sizeof (*yylsp)); |
# undef YYSTACK_RELOCATE |
914 |
#endif |
if (yyss1 != yyssa) |
915 |
|
YYSTACK_FREE (yyss1); |
916 |
|
} |
917 |
|
# endif |
918 |
#endif /* no yyoverflow */ |
#endif /* no yyoverflow */ |
919 |
|
|
920 |
yyssp = yyss + size - 1; |
yyssp = yyss + yysize - 1; |
921 |
yyvsp = yyvs + size - 1; |
yyvsp = yyvs + yysize - 1; |
922 |
#ifdef YYLSP_NEEDED |
#if YYLSP_NEEDED |
923 |
yylsp = yyls + size - 1; |
yylsp = yyls + yysize - 1; |
924 |
#endif |
#endif |
925 |
|
|
926 |
#if YYDEBUG != 0 |
YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
927 |
if (yydebug) |
(unsigned long int) yystacksize)); |
|
fprintf(stderr, "Stack size increased to %d\n", yystacksize); |
|
|
#endif |
|
928 |
|
|
929 |
if (yyssp >= yyss + yystacksize - 1) |
if (yyssp >= yyss + yystacksize - 1) |
930 |
YYABORT; |
YYABORT; |
931 |
} |
} |
932 |
|
|
933 |
#if YYDEBUG != 0 |
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
|
if (yydebug) |
|
|
fprintf(stderr, "Entering state %d\n", yystate); |
|
|
#endif |
|
934 |
|
|
935 |
goto yybackup; |
goto yybackup; |
936 |
yybackup: |
|
937 |
|
|
938 |
|
/*-----------. |
939 |
|
| yybackup. | |
940 |
|
`-----------*/ |
941 |
|
yybackup: |
942 |
|
|
943 |
/* Do appropriate processing given the current state. */ |
/* Do appropriate processing given the current state. */ |
944 |
/* Read a lookahead token if we need one and don't already have one. */ |
/* Read a lookahead token if we need one and don't already have one. */ |
957 |
|
|
958 |
if (yychar == YYEMPTY) |
if (yychar == YYEMPTY) |
959 |
{ |
{ |
960 |
#if YYDEBUG != 0 |
YYDPRINTF ((stderr, "Reading a token: ")); |
|
if (yydebug) |
|
|
fprintf(stderr, "Reading a token: "); |
|
|
#endif |
|
961 |
yychar = YYLEX; |
yychar = YYLEX; |
962 |
} |
} |
963 |
|
|
968 |
yychar1 = 0; |
yychar1 = 0; |
969 |
yychar = YYEOF; /* Don't call YYLEX any more */ |
yychar = YYEOF; /* Don't call YYLEX any more */ |
970 |
|
|
971 |
#if YYDEBUG != 0 |
YYDPRINTF ((stderr, "Now at end of input.\n")); |
|
if (yydebug) |
|
|
fprintf(stderr, "Now at end of input.\n"); |
|
|
#endif |
|
972 |
} |
} |
973 |
else |
else |
974 |
{ |
{ |
975 |
yychar1 = YYTRANSLATE(yychar); |
yychar1 = YYTRANSLATE (yychar); |
976 |
|
|
977 |
#if YYDEBUG != 0 |
#if YYDEBUG |
978 |
|
/* We have to keep this `#if YYDEBUG', since we use variables |
979 |
|
which are defined only if `YYDEBUG' is set. */ |
980 |
if (yydebug) |
if (yydebug) |
981 |
{ |
{ |
982 |
fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]); |
YYFPRINTF (stderr, "Next token is %d (%s", |
983 |
/* Give the individual parser a way to print the precise meaning |
yychar, yytname[yychar1]); |
984 |
of a token, for further debugging info. */ |
/* Give the individual parser a way to print the precise |
985 |
#ifdef YYPRINT |
meaning of a token, for further debugging info. */ |
986 |
|
# ifdef YYPRINT |
987 |
YYPRINT (stderr, yychar, yylval); |
YYPRINT (stderr, yychar, yylval); |
988 |
#endif |
# endif |
989 |
fprintf (stderr, ")\n"); |
YYFPRINTF (stderr, ")\n"); |
990 |
} |
} |
991 |
#endif |
#endif |
992 |
} |
} |
1018 |
YYACCEPT; |
YYACCEPT; |
1019 |
|
|
1020 |
/* Shift the lookahead token. */ |
/* Shift the lookahead token. */ |
1021 |
|
YYDPRINTF ((stderr, "Shifting token %d (%s), ", |
1022 |
#if YYDEBUG != 0 |
yychar, yytname[yychar1])); |
|
if (yydebug) |
|
|
fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]); |
|
|
#endif |
|
1023 |
|
|
1024 |
/* Discard the token being shifted unless it is eof. */ |
/* Discard the token being shifted unless it is eof. */ |
1025 |
if (yychar != YYEOF) |
if (yychar != YYEOF) |
1026 |
yychar = YYEMPTY; |
yychar = YYEMPTY; |
1027 |
|
|
1028 |
*++yyvsp = yylval; |
*++yyvsp = yylval; |
1029 |
#ifdef YYLSP_NEEDED |
#if YYLSP_NEEDED |
1030 |
*++yylsp = yylloc; |
*++yylsp = yylloc; |
1031 |
#endif |
#endif |
1032 |
|
|
1033 |
/* count tokens shifted since error; after three, turn off error status. */ |
/* Count tokens shifted since error; after three, turn off error |
1034 |
if (yyerrstatus) yyerrstatus--; |
status. */ |
1035 |
|
if (yyerrstatus) |
1036 |
|
yyerrstatus--; |
1037 |
|
|
1038 |
yystate = yyn; |
yystate = yyn; |
1039 |
goto yynewstate; |
goto yynewstate; |
1040 |
|
|
|
/* Do the default action for the current state. */ |
|
|
yydefault: |
|
1041 |
|
|
1042 |
|
/*-----------------------------------------------------------. |
1043 |
|
| yydefault -- do the default action for the current state. | |
1044 |
|
`-----------------------------------------------------------*/ |
1045 |
|
yydefault: |
1046 |
yyn = yydefact[yystate]; |
yyn = yydefact[yystate]; |
1047 |
if (yyn == 0) |
if (yyn == 0) |
1048 |
goto yyerrlab; |
goto yyerrlab; |
1049 |
|
goto yyreduce; |
1050 |
|
|
1051 |
/* Do a reduction. yyn is the number of a rule to reduce with. */ |
|
1052 |
|
/*-----------------------------. |
1053 |
|
| yyreduce -- Do a reduction. | |
1054 |
|
`-----------------------------*/ |
1055 |
yyreduce: |
yyreduce: |
1056 |
|
/* yyn is the number of a rule to reduce with. */ |
1057 |
yylen = yyr2[yyn]; |
yylen = yyr2[yyn]; |
|
if (yylen > 0) |
|
|
yyval = yyvsp[1-yylen]; /* implement default value of the action */ |
|
1058 |
|
|
1059 |
#if YYDEBUG != 0 |
/* If YYLEN is nonzero, implement the default value of the action: |
1060 |
|
`$$ = $1'. |
1061 |
|
|
1062 |
|
Otherwise, the following line sets YYVAL to the semantic value of |
1063 |
|
the lookahead token. This behavior is undocumented and Bison |
1064 |
|
users should not rely upon it. Assigning to YYVAL |
1065 |
|
unconditionally makes the parser a bit smaller, and it avoids a |
1066 |
|
GCC warning that YYVAL may be used uninitialized. */ |
1067 |
|
yyval = yyvsp[1-yylen]; |
1068 |
|
|
1069 |
|
#if YYLSP_NEEDED |
1070 |
|
/* Similarly for the default location. Let the user run additional |
1071 |
|
commands if for instance locations are ranges. */ |
1072 |
|
yyloc = yylsp[1-yylen]; |
1073 |
|
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); |
1074 |
|
#endif |
1075 |
|
|
1076 |
|
#if YYDEBUG |
1077 |
|
/* We have to keep this `#if YYDEBUG', since we use variables which |
1078 |
|
are defined only if `YYDEBUG' is set. */ |
1079 |
if (yydebug) |
if (yydebug) |
1080 |
{ |
{ |
1081 |
int i; |
int yyi; |
1082 |
|
|
1083 |
fprintf (stderr, "Reducing via rule %d (line %d), ", |
YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", |
1084 |
yyn, yyrline[yyn]); |
yyn, yyrline[yyn]); |
1085 |
|
|
1086 |
/* Print the symbols being reduced, and their result. */ |
/* Print the symbols being reduced, and their result. */ |
1087 |
for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) |
for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) |
1088 |
fprintf (stderr, "%s ", yytname[yyrhs[i]]); |
YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); |
1089 |
fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); |
YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); |
1090 |
} |
} |
1091 |
#endif |
#endif |
1092 |
|
|
|
|
|
1093 |
switch (yyn) { |
switch (yyn) { |
1094 |
|
|
1095 |
case 3: |
case 3: |
1096 |
#line 196 "./getdate.y" |
#line 196 "./getdate.y" |
1097 |
{ PC.times_seen++; ; |
{ PC.times_seen++; } |
1098 |
break;} |
break; |
1099 |
case 4: |
case 4: |
1100 |
#line 198 "./getdate.y" |
#line 198 "./getdate.y" |
1101 |
{ PC.local_zones_seen++; ; |
{ PC.local_zones_seen++; } |
1102 |
break;} |
break; |
1103 |
case 5: |
case 5: |
1104 |
#line 200 "./getdate.y" |
#line 200 "./getdate.y" |
1105 |
{ PC.zones_seen++; ; |
{ PC.zones_seen++; } |
1106 |
break;} |
break; |
1107 |
case 6: |
case 6: |
1108 |
#line 202 "./getdate.y" |
#line 202 "./getdate.y" |
1109 |
{ PC.dates_seen++; ; |
{ PC.dates_seen++; } |
1110 |
break;} |
break; |
1111 |
case 7: |
case 7: |
1112 |
#line 204 "./getdate.y" |
#line 204 "./getdate.y" |
1113 |
{ PC.days_seen++; ; |
{ PC.days_seen++; } |
1114 |
break;} |
break; |
1115 |
case 8: |
case 8: |
1116 |
#line 206 "./getdate.y" |
#line 206 "./getdate.y" |
1117 |
{ PC.rels_seen++; ; |
{ PC.rels_seen++; } |
1118 |
break;} |
break; |
1119 |
case 10: |
case 10: |
1120 |
#line 212 "./getdate.y" |
#line 212 "./getdate.y" |
1121 |
{ |
{ |
1123 |
PC.minutes = 0; |
PC.minutes = 0; |
1124 |
PC.seconds = 0; |
PC.seconds = 0; |
1125 |
PC.meridian = yyvsp[0].intval; |
PC.meridian = yyvsp[0].intval; |
1126 |
; |
} |
1127 |
break;} |
break; |
1128 |
case 11: |
case 11: |
1129 |
#line 219 "./getdate.y" |
#line 219 "./getdate.y" |
1130 |
{ |
{ |
1132 |
PC.minutes = yyvsp[-1].textintval.value; |
PC.minutes = yyvsp[-1].textintval.value; |
1133 |
PC.seconds = 0; |
PC.seconds = 0; |
1134 |
PC.meridian = yyvsp[0].intval; |
PC.meridian = yyvsp[0].intval; |
1135 |
; |
} |
1136 |
break;} |
break; |
1137 |
case 12: |
case 12: |
1138 |
#line 226 "./getdate.y" |
#line 226 "./getdate.y" |
1139 |
{ |
{ |
1142 |
PC.meridian = MER24; |
PC.meridian = MER24; |
1143 |
PC.zones_seen++; |
PC.zones_seen++; |
1144 |
PC.time_zone = yyvsp[0].textintval.value % 100 + (yyvsp[0].textintval.value / 100) * 60; |
PC.time_zone = yyvsp[0].textintval.value % 100 + (yyvsp[0].textintval.value / 100) * 60; |
1145 |
; |
} |
1146 |
break;} |
break; |
1147 |
case 13: |
case 13: |
1148 |
#line 234 "./getdate.y" |
#line 234 "./getdate.y" |
1149 |
{ |
{ |
1151 |
PC.minutes = yyvsp[-3].textintval.value; |
PC.minutes = yyvsp[-3].textintval.value; |
1152 |
PC.seconds = yyvsp[-1].textintval.value; |
PC.seconds = yyvsp[-1].textintval.value; |
1153 |
PC.meridian = yyvsp[0].intval; |
PC.meridian = yyvsp[0].intval; |
1154 |
; |
} |
1155 |
break;} |
break; |
1156 |
case 14: |
case 14: |
1157 |
#line 241 "./getdate.y" |
#line 241 "./getdate.y" |
1158 |
{ |
{ |
1162 |
PC.meridian = MER24; |
PC.meridian = MER24; |
1163 |
PC.zones_seen++; |
PC.zones_seen++; |
1164 |
PC.time_zone = yyvsp[0].textintval.value % 100 + (yyvsp[0].textintval.value / 100) * 60; |
PC.time_zone = yyvsp[0].textintval.value % 100 + (yyvsp[0].textintval.value / 100) * 60; |
1165 |
; |
} |
1166 |
break;} |
break; |
1167 |
case 15: |
case 15: |
1168 |
#line 253 "./getdate.y" |
#line 253 "./getdate.y" |
1169 |
{ PC.local_isdst = yyvsp[0].intval; ; |
{ PC.local_isdst = yyvsp[0].intval; } |
1170 |
break;} |
break; |
1171 |
case 16: |
case 16: |
1172 |
#line 255 "./getdate.y" |
#line 255 "./getdate.y" |
1173 |
{ PC.local_isdst = yyvsp[-1].intval < 0 ? 1 : yyvsp[-1].intval + 1; ; |
{ PC.local_isdst = yyvsp[-1].intval < 0 ? 1 : yyvsp[-1].intval + 1; } |
1174 |
break;} |
break; |
1175 |
case 17: |
case 17: |
1176 |
#line 260 "./getdate.y" |
#line 260 "./getdate.y" |
1177 |
{ PC.time_zone = yyvsp[0].intval; ; |
{ PC.time_zone = yyvsp[0].intval; } |
1178 |
break;} |
break; |
1179 |
case 18: |
case 18: |
1180 |
#line 262 "./getdate.y" |
#line 262 "./getdate.y" |
1181 |
{ PC.time_zone = yyvsp[0].intval + 60; ; |
{ PC.time_zone = yyvsp[0].intval + 60; } |
1182 |
break;} |
break; |
1183 |
case 19: |
case 19: |
1184 |
#line 264 "./getdate.y" |
#line 264 "./getdate.y" |
1185 |
{ PC.time_zone = yyvsp[-1].intval + 60; ; |
{ PC.time_zone = yyvsp[-1].intval + 60; } |
1186 |
break;} |
break; |
1187 |
case 20: |
case 20: |
1188 |
#line 269 "./getdate.y" |
#line 269 "./getdate.y" |
1189 |
{ |
{ |
1190 |
PC.day_ordinal = 1; |
PC.day_ordinal = 1; |
1191 |
PC.day_number = yyvsp[0].intval; |
PC.day_number = yyvsp[0].intval; |
1192 |
; |
} |
1193 |
break;} |
break; |
1194 |
case 21: |
case 21: |
1195 |
#line 274 "./getdate.y" |
#line 274 "./getdate.y" |
1196 |
{ |
{ |
1197 |
PC.day_ordinal = 1; |
PC.day_ordinal = 1; |
1198 |
PC.day_number = yyvsp[-1].intval; |
PC.day_number = yyvsp[-1].intval; |
1199 |
; |
} |
1200 |
break;} |
break; |
1201 |
case 22: |
case 22: |
1202 |
#line 279 "./getdate.y" |
#line 279 "./getdate.y" |
1203 |
{ |
{ |
1204 |
PC.day_ordinal = yyvsp[-1].textintval.value; |
PC.day_ordinal = yyvsp[-1].textintval.value; |
1205 |
PC.day_number = yyvsp[0].intval; |
PC.day_number = yyvsp[0].intval; |
1206 |
; |
} |
1207 |
break;} |
break; |
1208 |
case 23: |
case 23: |
1209 |
#line 287 "./getdate.y" |
#line 287 "./getdate.y" |
1210 |
{ |
{ |
1211 |
PC.month = yyvsp[-2].textintval.value; |
PC.month = yyvsp[-2].textintval.value; |
1212 |
PC.day = yyvsp[0].textintval.value; |
PC.day = yyvsp[0].textintval.value; |
1213 |
; |
} |
1214 |
break;} |
break; |
1215 |
case 24: |
case 24: |
1216 |
#line 292 "./getdate.y" |
#line 292 "./getdate.y" |
1217 |
{ |
{ |
1232 |
PC.day = yyvsp[-2].textintval.value; |
PC.day = yyvsp[-2].textintval.value; |
1233 |
PC.year = yyvsp[0].textintval; |
PC.year = yyvsp[0].textintval; |
1234 |
} |
} |
1235 |
; |
} |
1236 |
break;} |
break; |
1237 |
case 25: |
case 25: |
1238 |
#line 312 "./getdate.y" |
#line 312 "./getdate.y" |
1239 |
{ |
{ |
1241 |
PC.year = yyvsp[-2].textintval; |
PC.year = yyvsp[-2].textintval; |
1242 |
PC.month = -yyvsp[-1].textintval.value; |
PC.month = -yyvsp[-1].textintval.value; |
1243 |
PC.day = -yyvsp[0].textintval.value; |
PC.day = -yyvsp[0].textintval.value; |
1244 |
; |
} |
1245 |
break;} |
break; |
1246 |
case 26: |
case 26: |
1247 |
#line 319 "./getdate.y" |
#line 319 "./getdate.y" |
1248 |
{ |
{ |
1251 |
PC.month = yyvsp[-1].intval; |
PC.month = yyvsp[-1].intval; |
1252 |
PC.year.value = -yyvsp[0].textintval.value; |
PC.year.value = -yyvsp[0].textintval.value; |
1253 |
PC.year.digits = yyvsp[0].textintval.digits; |
PC.year.digits = yyvsp[0].textintval.digits; |
1254 |
; |
} |
1255 |
break;} |
break; |
1256 |
case 27: |
case 27: |
1257 |
#line 327 "./getdate.y" |
#line 327 "./getdate.y" |
1258 |
{ |
{ |
1259 |
PC.month = yyvsp[-1].intval; |
PC.month = yyvsp[-1].intval; |
1260 |
PC.day = yyvsp[0].textintval.value; |
PC.day = yyvsp[0].textintval.value; |
1261 |
; |
} |
1262 |
break;} |
break; |
1263 |
case 28: |
case 28: |
1264 |
#line 332 "./getdate.y" |
#line 332 "./getdate.y" |
1265 |
{ |
{ |
1266 |
PC.month = yyvsp[-3].intval; |
PC.month = yyvsp[-3].intval; |
1267 |
PC.day = yyvsp[-2].textintval.value; |
PC.day = yyvsp[-2].textintval.value; |
1268 |
PC.year = yyvsp[0].textintval; |
PC.year = yyvsp[0].textintval; |
1269 |
; |
} |
1270 |
break;} |
break; |
1271 |
case 29: |
case 29: |
1272 |
#line 338 "./getdate.y" |
#line 338 "./getdate.y" |
1273 |
{ |
{ |
1274 |
PC.day = yyvsp[-1].textintval.value; |
PC.day = yyvsp[-1].textintval.value; |
1275 |
PC.month = yyvsp[0].intval; |
PC.month = yyvsp[0].intval; |
1276 |
; |
} |
1277 |
break;} |
break; |
1278 |
case 30: |
case 30: |
1279 |
#line 343 "./getdate.y" |
#line 343 "./getdate.y" |
1280 |
{ |
{ |
1281 |
PC.day = yyvsp[-2].textintval.value; |
PC.day = yyvsp[-2].textintval.value; |
1282 |
PC.month = yyvsp[-1].intval; |
PC.month = yyvsp[-1].intval; |
1283 |
PC.year = yyvsp[0].textintval; |
PC.year = yyvsp[0].textintval; |
1284 |
; |
} |
1285 |
break;} |
break; |
1286 |
case 31: |
case 31: |
1287 |
#line 352 "./getdate.y" |
#line 352 "./getdate.y" |
1288 |
{ |
{ |
1292 |
PC.rel_day = -PC.rel_day; |
PC.rel_day = -PC.rel_day; |
1293 |
PC.rel_month = -PC.rel_month; |
PC.rel_month = -PC.rel_month; |
1294 |
PC.rel_year = -PC.rel_year; |
PC.rel_year = -PC.rel_year; |
1295 |
; |
} |
1296 |
break;} |
break; |
1297 |
case 33: |
case 33: |
1298 |
#line 365 "./getdate.y" |
#line 365 "./getdate.y" |
1299 |
{ PC.rel_year += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_year += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1300 |
break;} |
break; |
1301 |
case 34: |
case 34: |
1302 |
#line 367 "./getdate.y" |
#line 367 "./getdate.y" |
1303 |
{ PC.rel_year += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_year += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1304 |
break;} |
break; |
1305 |
case 35: |
case 35: |
1306 |
#line 369 "./getdate.y" |
#line 369 "./getdate.y" |
1307 |
{ PC.rel_year += yyvsp[0].intval; ; |
{ PC.rel_year += yyvsp[0].intval; } |
1308 |
break;} |
break; |
1309 |
case 36: |
case 36: |
1310 |
#line 371 "./getdate.y" |
#line 371 "./getdate.y" |
1311 |
{ PC.rel_month += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_month += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1312 |
break;} |
break; |
1313 |
case 37: |
case 37: |
1314 |
#line 373 "./getdate.y" |
#line 373 "./getdate.y" |
1315 |
{ PC.rel_month += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_month += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1316 |
break;} |
break; |
1317 |
case 38: |
case 38: |
1318 |
#line 375 "./getdate.y" |
#line 375 "./getdate.y" |
1319 |
{ PC.rel_month += yyvsp[0].intval; ; |
{ PC.rel_month += yyvsp[0].intval; } |
1320 |
break;} |
break; |
1321 |
case 39: |
case 39: |
1322 |
#line 377 "./getdate.y" |
#line 377 "./getdate.y" |
1323 |
{ PC.rel_day += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_day += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1324 |
break;} |
break; |
1325 |
case 40: |
case 40: |
1326 |
#line 379 "./getdate.y" |
#line 379 "./getdate.y" |
1327 |
{ PC.rel_day += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_day += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1328 |
break;} |
break; |
1329 |
case 41: |
case 41: |
1330 |
#line 381 "./getdate.y" |
#line 381 "./getdate.y" |
1331 |
{ PC.rel_day += yyvsp[0].intval ; |
{ PC.rel_day += yyvsp[0].intval; } |
1332 |
break;} |
break; |
1333 |
case 42: |
case 42: |
1334 |
#line 383 "./getdate.y" |
#line 383 "./getdate.y" |
1335 |
{ PC.rel_hour += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_hour += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1336 |
break;} |
break; |
1337 |
case 43: |
case 43: |
1338 |
#line 385 "./getdate.y" |
#line 385 "./getdate.y" |
1339 |
{ PC.rel_hour += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_hour += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1340 |
break;} |
break; |
1341 |
case 44: |
case 44: |
1342 |
#line 387 "./getdate.y" |
#line 387 "./getdate.y" |
1343 |
{ PC.rel_hour += yyvsp[0].intval ; |
{ PC.rel_hour += yyvsp[0].intval; } |
1344 |
break;} |
break; |
1345 |
case 45: |
case 45: |
1346 |
#line 389 "./getdate.y" |
#line 389 "./getdate.y" |
1347 |
{ PC.rel_minutes += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_minutes += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1348 |
break;} |
break; |
1349 |
case 46: |
case 46: |
1350 |
#line 391 "./getdate.y" |
#line 391 "./getdate.y" |
1351 |
{ PC.rel_minutes += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_minutes += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1352 |
break;} |
break; |
1353 |
case 47: |
case 47: |
1354 |
#line 393 "./getdate.y" |
#line 393 "./getdate.y" |
1355 |
{ PC.rel_minutes += yyvsp[0].intval ; |
{ PC.rel_minutes += yyvsp[0].intval; } |
1356 |
break;} |
break; |
1357 |
case 48: |
case 48: |
1358 |
#line 395 "./getdate.y" |
#line 395 "./getdate.y" |
1359 |
{ PC.rel_seconds += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_seconds += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1360 |
break;} |
break; |
1361 |
case 49: |
case 49: |
1362 |
#line 397 "./getdate.y" |
#line 397 "./getdate.y" |
1363 |
{ PC.rel_seconds += yyvsp[-1].textintval.value * yyvsp[0].intval; ; |
{ PC.rel_seconds += yyvsp[-1].textintval.value * yyvsp[0].intval; } |
1364 |
break;} |
break; |
1365 |
case 50: |
case 50: |
1366 |
#line 399 "./getdate.y" |
#line 399 "./getdate.y" |
1367 |
{ PC.rel_seconds += yyvsp[0].intval; ; |
{ PC.rel_seconds += yyvsp[0].intval; } |
1368 |
break;} |
break; |
1369 |
case 51: |
case 51: |
1370 |
#line 404 "./getdate.y" |
#line 404 "./getdate.y" |
1371 |
{ |
{ |
1399 |
PC.meridian = MER24; |
PC.meridian = MER24; |
1400 |
} |
} |
1401 |
} |
} |
1402 |
; |
} |
1403 |
break;} |
break; |
1404 |
case 52: |
case 52: |
1405 |
#line 440 "./getdate.y" |
#line 440 "./getdate.y" |
1406 |
{ yyval.intval = MER24; ; |
{ yyval.intval = MER24; } |
1407 |
break;} |
break; |
1408 |
case 53: |
case 53: |
1409 |
#line 442 "./getdate.y" |
#line 442 "./getdate.y" |
1410 |
{ yyval.intval = yyvsp[0].intval; ; |
{ yyval.intval = yyvsp[0].intval; } |
1411 |
break;} |
break; |
1412 |
} |
} |
1413 |
/* the action file gets copied in in place of this dollarsign */ |
|
1414 |
#line 543 "/usr/share/bison/bison.simple" |
#line 706 "/usr/share/bison/bison.simple" |
1415 |
|
|
1416 |
|
|
1417 |
yyvsp -= yylen; |
yyvsp -= yylen; |
1418 |
yyssp -= yylen; |
yyssp -= yylen; |
1419 |
#ifdef YYLSP_NEEDED |
#if YYLSP_NEEDED |
1420 |
yylsp -= yylen; |
yylsp -= yylen; |
1421 |
#endif |
#endif |
1422 |
|
|
1423 |
#if YYDEBUG != 0 |
#if YYDEBUG |
1424 |
if (yydebug) |
if (yydebug) |
1425 |
{ |
{ |
1426 |
short *ssp1 = yyss - 1; |
short *yyssp1 = yyss - 1; |
1427 |
fprintf (stderr, "state stack now"); |
YYFPRINTF (stderr, "state stack now"); |
1428 |
while (ssp1 != yyssp) |
while (yyssp1 != yyssp) |
1429 |
fprintf (stderr, " %d", *++ssp1); |
YYFPRINTF (stderr, " %d", *++yyssp1); |
1430 |
fprintf (stderr, "\n"); |
YYFPRINTF (stderr, "\n"); |
1431 |
} |
} |
1432 |
#endif |
#endif |
1433 |
|
|
1434 |
*++yyvsp = yyval; |
*++yyvsp = yyval; |
1435 |
|
#if YYLSP_NEEDED |
1436 |
#ifdef YYLSP_NEEDED |
*++yylsp = yyloc; |
|
yylsp++; |
|
|
if (yylen == 0) |
|
|
{ |
|
|
yylsp->first_line = yylloc.first_line; |
|
|
yylsp->first_column = yylloc.first_column; |
|
|
yylsp->last_line = (yylsp-1)->last_line; |
|
|
yylsp->last_column = (yylsp-1)->last_column; |
|
|
yylsp->text = 0; |
|
|
} |
|
|
else |
|
|
{ |
|
|
yylsp->last_line = (yylsp+yylen-1)->last_line; |
|
|
yylsp->last_column = (yylsp+yylen-1)->last_column; |
|
|
} |
|
1437 |
#endif |
#endif |
1438 |
|
|
1439 |
/* Now "shift" the result of the reduction. |
/* Now `shift' the result of the reduction. Determine what state |
1440 |
Determine what state that goes to, |
that goes to, based on the state we popped back to and the rule |
1441 |
based on the state we popped back to |
number reduced by. */ |
|
and the rule number reduced by. */ |
|
1442 |
|
|
1443 |
yyn = yyr1[yyn]; |
yyn = yyr1[yyn]; |
1444 |
|
|
1450 |
|
|
1451 |
goto yynewstate; |
goto yynewstate; |
1452 |
|
|
|
yyerrlab: /* here on detecting error */ |
|
1453 |
|
|
1454 |
if (! yyerrstatus) |
/*------------------------------------. |
1455 |
/* If not already recovering from an error, report this error. */ |
| yyerrlab -- here on detecting error | |
1456 |
|
`------------------------------------*/ |
1457 |
|
yyerrlab: |
1458 |
|
/* If not already recovering from an error, report this error. */ |
1459 |
|
if (!yyerrstatus) |
1460 |
{ |
{ |
1461 |
++yynerrs; |
++yynerrs; |
1462 |
|
|
1465 |
|
|
1466 |
if (yyn > YYFLAG && yyn < YYLAST) |
if (yyn > YYFLAG && yyn < YYLAST) |
1467 |
{ |
{ |
1468 |
int size = 0; |
YYSIZE_T yysize = 0; |
1469 |
char *msg; |
char *yymsg; |
1470 |
int x, count; |
int yyx, yycount; |
1471 |
|
|
1472 |
count = 0; |
yycount = 0; |
1473 |
/* Start X at -yyn if nec to avoid negative indexes in yycheck. */ |
/* Start YYX at -YYN if negative to avoid negative indexes in |
1474 |
for (x = (yyn < 0 ? -yyn : 0); |
YYCHECK. */ |
1475 |
x < (sizeof(yytname) / sizeof(char *)); x++) |
for (yyx = yyn < 0 ? -yyn : 0; |
1476 |
if (yycheck[x + yyn] == x) |
yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) |
1477 |
size += strlen(yytname[x]) + 15, count++; |
if (yycheck[yyx + yyn] == yyx) |
1478 |
msg = (char *) malloc(size + 15); |
yysize += yystrlen (yytname[yyx]) + 15, yycount++; |
1479 |
if (msg != 0) |
yysize += yystrlen ("parse error, unexpected ") + 1; |
1480 |
|
yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); |
1481 |
|
yymsg = (char *) YYSTACK_ALLOC (yysize); |
1482 |
|
if (yymsg != 0) |
1483 |
{ |
{ |
1484 |
strcpy(msg, "parse error"); |
char *yyp = yystpcpy (yymsg, "parse error, unexpected "); |
1485 |
|
yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); |
1486 |
|
|
1487 |
if (count < 5) |
if (yycount < 5) |
1488 |
{ |
{ |
1489 |
count = 0; |
yycount = 0; |
1490 |
for (x = (yyn < 0 ? -yyn : 0); |
for (yyx = yyn < 0 ? -yyn : 0; |
1491 |
x < (sizeof(yytname) / sizeof(char *)); x++) |
yyx < (int) (sizeof (yytname) / sizeof (char *)); |
1492 |
if (yycheck[x + yyn] == x) |
yyx++) |
1493 |
|
if (yycheck[yyx + yyn] == yyx) |
1494 |
{ |
{ |
1495 |
strcat(msg, count == 0 ? ", expecting `" : " or `"); |
const char *yyq = ! yycount ? ", expecting " : " or "; |
1496 |
strcat(msg, yytname[x]); |
yyp = yystpcpy (yyp, yyq); |
1497 |
strcat(msg, "'"); |
yyp = yystpcpy (yyp, yytname[yyx]); |
1498 |
count++; |
yycount++; |
1499 |
} |
} |
1500 |
} |
} |
1501 |
yyerror(msg); |
yyerror (yymsg); |
1502 |
free(msg); |
YYSTACK_FREE (yymsg); |
1503 |
} |
} |
1504 |
else |
else |
1505 |
yyerror ("parse error; also virtual memory exceeded"); |
yyerror ("parse error; also virtual memory exhausted"); |
1506 |
} |
} |
1507 |
else |
else |
1508 |
#endif /* YYERROR_VERBOSE */ |
#endif /* defined (YYERROR_VERBOSE) */ |
1509 |
yyerror("parse error"); |
yyerror ("parse error"); |
1510 |
} |
} |
|
|
|
1511 |
goto yyerrlab1; |
goto yyerrlab1; |
|
yyerrlab1: /* here on error raised explicitly by an action */ |
|
1512 |
|
|
1513 |
|
|
1514 |
|
/*--------------------------------------------------. |
1515 |
|
| yyerrlab1 -- error raised explicitly by an action | |
1516 |
|
`--------------------------------------------------*/ |
1517 |
|
yyerrlab1: |
1518 |
if (yyerrstatus == 3) |
if (yyerrstatus == 3) |
1519 |
{ |
{ |
1520 |
/* if just tried and failed to reuse lookahead token after an error, discard it. */ |
/* If just tried and failed to reuse lookahead token after an |
1521 |
|
error, discard it. */ |
1522 |
|
|
1523 |
/* return failure if at end of input */ |
/* return failure if at end of input */ |
1524 |
if (yychar == YYEOF) |
if (yychar == YYEOF) |
1525 |
YYABORT; |
YYABORT; |
1526 |
|
YYDPRINTF ((stderr, "Discarding token %d (%s).\n", |
1527 |
#if YYDEBUG != 0 |
yychar, yytname[yychar1])); |
|
if (yydebug) |
|
|
fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]); |
|
|
#endif |
|
|
|
|
1528 |
yychar = YYEMPTY; |
yychar = YYEMPTY; |
1529 |
} |
} |
1530 |
|
|
1531 |
/* Else will try to reuse lookahead token |
/* Else will try to reuse lookahead token after shifting the error |
1532 |
after shifting the error token. */ |
token. */ |
1533 |
|
|
1534 |
yyerrstatus = 3; /* Each real token shifted decrements this */ |
yyerrstatus = 3; /* Each real token shifted decrements this */ |
1535 |
|
|
1536 |
goto yyerrhandle; |
goto yyerrhandle; |
1537 |
|
|
|
yyerrdefault: /* current state does not do anything special for the error token. */ |
|
1538 |
|
|
1539 |
|
/*-------------------------------------------------------------------. |
1540 |
|
| yyerrdefault -- current state does not do anything special for the | |
1541 |
|
| error token. | |
1542 |
|
`-------------------------------------------------------------------*/ |
1543 |
|
yyerrdefault: |
1544 |
#if 0 |
#if 0 |
1545 |
/* This is wrong; only states that explicitly want error tokens |
/* This is wrong; only states that explicitly want error tokens |
1546 |
should shift them. */ |
should shift them. */ |
1547 |
yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/ |
|
1548 |
if (yyn) goto yydefault; |
/* If its default is to accept any token, ok. Otherwise pop it. */ |
1549 |
|
yyn = yydefact[yystate]; |
1550 |
|
if (yyn) |
1551 |
|
goto yydefault; |
1552 |
#endif |
#endif |
1553 |
|
|
|
yyerrpop: /* pop the current state because it cannot handle the error token */ |
|
1554 |
|
|
1555 |
if (yyssp == yyss) YYABORT; |
/*---------------------------------------------------------------. |
1556 |
|
| yyerrpop -- pop the current state because it cannot handle the | |
1557 |
|
| error token | |
1558 |
|
`---------------------------------------------------------------*/ |
1559 |
|
yyerrpop: |
1560 |
|
if (yyssp == yyss) |
1561 |
|
YYABORT; |
1562 |
yyvsp--; |
yyvsp--; |
1563 |
yystate = *--yyssp; |
yystate = *--yyssp; |
1564 |
#ifdef YYLSP_NEEDED |
#if YYLSP_NEEDED |
1565 |
yylsp--; |
yylsp--; |
1566 |
#endif |
#endif |
1567 |
|
|
1568 |
#if YYDEBUG != 0 |
#if YYDEBUG |
1569 |
if (yydebug) |
if (yydebug) |
1570 |
{ |
{ |
1571 |
short *ssp1 = yyss - 1; |
short *yyssp1 = yyss - 1; |
1572 |
fprintf (stderr, "Error: state stack now"); |
YYFPRINTF (stderr, "Error: state stack now"); |
1573 |
while (ssp1 != yyssp) |
while (yyssp1 != yyssp) |
1574 |
fprintf (stderr, " %d", *++ssp1); |
YYFPRINTF (stderr, " %d", *++yyssp1); |
1575 |
fprintf (stderr, "\n"); |
YYFPRINTF (stderr, "\n"); |
1576 |
} |
} |
1577 |
#endif |
#endif |
1578 |
|
|
1579 |
|
/*--------------. |
1580 |
|
| yyerrhandle. | |
1581 |
|
`--------------*/ |
1582 |
yyerrhandle: |
yyerrhandle: |
|
|
|
1583 |
yyn = yypact[yystate]; |
yyn = yypact[yystate]; |
1584 |
if (yyn == YYFLAG) |
if (yyn == YYFLAG) |
1585 |
goto yyerrdefault; |
goto yyerrdefault; |
1602 |
if (yyn == YYFINAL) |
if (yyn == YYFINAL) |
1603 |
YYACCEPT; |
YYACCEPT; |
1604 |
|
|
1605 |
#if YYDEBUG != 0 |
YYDPRINTF ((stderr, "Shifting error token, ")); |
|
if (yydebug) |
|
|
fprintf(stderr, "Shifting error token, "); |
|
|
#endif |
|
1606 |
|
|
1607 |
*++yyvsp = yylval; |
*++yyvsp = yylval; |
1608 |
#ifdef YYLSP_NEEDED |
#if YYLSP_NEEDED |
1609 |
*++yylsp = yylloc; |
*++yylsp = yylloc; |
1610 |
#endif |
#endif |
1611 |
|
|
1612 |
yystate = yyn; |
yystate = yyn; |
1613 |
goto yynewstate; |
goto yynewstate; |
1614 |
|
|
|
yyacceptlab: |
|
|
/* YYACCEPT comes here. */ |
|
|
if (yyfree_stacks) |
|
|
{ |
|
|
free (yyss); |
|
|
free (yyvs); |
|
|
#ifdef YYLSP_NEEDED |
|
|
free (yyls); |
|
|
#endif |
|
|
} |
|
|
return 0; |
|
1615 |
|
|
1616 |
yyabortlab: |
/*-------------------------------------. |
1617 |
/* YYABORT comes here. */ |
| yyacceptlab -- YYACCEPT comes here. | |
1618 |
if (yyfree_stacks) |
`-------------------------------------*/ |
1619 |
{ |
yyacceptlab: |
1620 |
free (yyss); |
yyresult = 0; |
1621 |
free (yyvs); |
goto yyreturn; |
1622 |
#ifdef YYLSP_NEEDED |
|
1623 |
free (yyls); |
/*-----------------------------------. |
1624 |
|
| yyabortlab -- YYABORT comes here. | |
1625 |
|
`-----------------------------------*/ |
1626 |
|
yyabortlab: |
1627 |
|
yyresult = 1; |
1628 |
|
goto yyreturn; |
1629 |
|
|
1630 |
|
/*---------------------------------------------. |
1631 |
|
| yyoverflowab -- parser overflow comes here. | |
1632 |
|
`---------------------------------------------*/ |
1633 |
|
yyoverflowlab: |
1634 |
|
yyerror ("parser stack overflow"); |
1635 |
|
yyresult = 2; |
1636 |
|
/* Fall through. */ |
1637 |
|
|
1638 |
|
yyreturn: |
1639 |
|
#ifndef yyoverflow |
1640 |
|
if (yyss != yyssa) |
1641 |
|
YYSTACK_FREE (yyss); |
1642 |
#endif |
#endif |
1643 |
} |
return yyresult; |
|
return 1; |
|
1644 |
} |
} |
1645 |
#line 445 "./getdate.y" |
#line 445 "./getdate.y" |
1646 |
|
|