1 /* A Bison parser, made from dateyacc.y
4 #define YYBISON 1 /* Identify Bison output. */
7 # define MONTH_NAME 258
14 # define NUM235959 265
15 # define NUM991231 266
16 # define NUM99991231 267
20 # define DST_SUFFIX 271
25 static char rcsident[] = "$Header: /cvsroot/lib/AXE/src/Attic/dateyacc.c,v 1.1 2002-07-25 08:01:26 arjen Exp $";
29 #include "parsedate.h"
30 struct parseddate yyans;
32 /* No error routine is needed here. */
40 # define YYSTYPE yystype
41 # define YYSTYPE_IS_TRIVIAL 1
53 /* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
54 #define YYTRANSLATE(x) ((unsigned)(x) <= 271 ? yytranslate[x] : 42)
56 /* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
57 static const char yytranslate[] =
59 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
60 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
61 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
62 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
63 2, 2, 2, 22, 2, 19, 18, 20, 2, 2,
64 2, 2, 2, 2, 2, 2, 2, 2, 21, 2,
65 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
66 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
67 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
68 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
69 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
70 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
71 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
72 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
73 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
74 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
75 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
76 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
77 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
78 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
79 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
80 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
81 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
82 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
83 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
84 2, 2, 2, 2, 2, 2, 1, 3, 4, 5,
85 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
90 static const short yyprhs[] =
92 0, 0, 2, 4, 6, 8, 10, 13, 17, 22,
93 26, 31, 34, 38, 43, 47, 52, 54, 57, 61,
94 64, 68, 71, 75, 80, 83, 87, 91, 95, 99,
95 102, 106, 111, 113, 116, 120, 125, 128, 132, 136,
96 140, 144, 147, 151, 156, 158, 161, 165, 168, 172,
97 176, 181, 186, 190, 195, 200, 202, 204, 208, 212,
98 217, 219, 221, 224, 227, 231, 237, 241, 244, 248,
99 254, 258, 260, 262, 264, 267, 270, 273, 277, 281,
100 285, 289, 293, 295, 297, 299, 301, 303, 305, 308,
101 310, 313, 316, 320, 322, 324, 328, 332, 338, 344,
102 348, 352, 358, 364, 368, 372, 374, 376, 378, 381,
103 384, 388, 390, 393, 396, 400, 403, 407, 409, 413,
104 417, 419, 423, 427, 429
106 static const short yyrhs[] =
108 6, 0, 7, 0, 5, 0, 23, 0, 30, 0,
109 30, 26, 0, 30, 26, 35, 0, 30, 26, 35,
110 33, 0, 30, 26, 33, 0, 30, 26, 33, 35,
111 0, 30, 35, 0, 30, 35, 26, 0, 30, 35,
112 26, 33, 0, 30, 35, 33, 0, 30, 35, 33,
113 26, 0, 27, 0, 27, 26, 0, 27, 26, 35,
114 0, 27, 35, 0, 27, 35, 26, 0, 26, 30,
115 0, 26, 30, 35, 0, 26, 30, 35, 33, 0,
116 26, 27, 0, 26, 27, 35, 0, 26, 35, 30,
117 0, 26, 35, 27, 0, 26, 35, 28, 0, 26,
118 28, 0, 26, 28, 35, 0, 26, 33, 35, 30,
119 0, 35, 0, 35, 30, 0, 35, 30, 26, 0,
120 35, 30, 26, 33, 0, 35, 27, 0, 35, 27,
121 26, 0, 35, 26, 30, 0, 35, 26, 27, 0,
122 35, 26, 28, 0, 35, 28, 0, 35, 28, 26,
123 0, 35, 33, 26, 30, 0, 28, 0, 28, 26,
124 0, 28, 26, 35, 0, 28, 35, 0, 28, 35,
125 26, 0, 33, 26, 30, 0, 33, 26, 30, 35,
126 0, 33, 26, 35, 30, 0, 33, 35, 30, 0,
127 33, 35, 30, 26, 0, 33, 35, 26, 30, 0,
128 9, 0, 26, 0, 29, 18, 41, 0, 29, 18,
129 35, 0, 29, 18, 35, 26, 0, 1, 0, 3,
130 0, 3, 18, 0, 30, 33, 0, 31, 19, 33,
131 0, 24, 19, 24, 19, 33, 0, 32, 20, 33,
132 0, 33, 30, 0, 33, 19, 31, 0, 33, 19,
133 24, 19, 24, 0, 33, 20, 32, 0, 29, 0,
134 12, 0, 13, 0, 24, 34, 0, 34, 24, 0,
135 24, 24, 0, 24, 19, 34, 0, 34, 19, 24,
136 0, 24, 20, 34, 0, 34, 20, 24, 0, 24,
137 20, 24, 0, 7, 0, 6, 0, 8, 0, 9,
138 0, 10, 0, 4, 0, 4, 18, 0, 37, 0,
139 36, 38, 0, 36, 39, 0, 36, 38, 39, 0,
140 9, 0, 37, 0, 5, 21, 23, 0, 5, 18,
141 23, 0, 5, 21, 23, 21, 23, 0, 5, 18,
142 23, 18, 23, 0, 6, 21, 23, 0, 6, 18,
143 23, 0, 6, 21, 23, 21, 23, 0, 6, 18,
144 23, 18, 23, 0, 9, 21, 23, 0, 9, 18,
145 23, 0, 11, 0, 14, 0, 15, 0, 15, 17,
146 0, 19, 15, 0, 19, 15, 17, 0, 16, 0,
147 19, 16, 0, 22, 40, 0, 19, 22, 40, 0,
148 19, 40, 0, 19, 19, 40, 0, 5, 0, 5,
149 21, 23, 0, 5, 18, 23, 0, 6, 0, 6,
150 21, 23, 0, 6, 18, 23, 0, 9, 0, 9,
157 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
158 static const short yyrline[] =
160 0, 72, 74, 77, 79, 82, 84, 85, 86, 87,
161 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
162 98, 99, 100, 101, 102, 103, 104, 105, 106, 107,
163 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
164 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
165 128, 129, 130, 131, 132, 133, 138, 139, 140, 141,
166 142, 148, 151, 155, 157, 158, 160, 163, 165, 166,
167 168, 169, 172, 179, 186, 189, 191, 195, 198, 202,
168 205, 207, 211, 214, 216, 218, 220, 224, 227, 231,
169 233, 234, 235, 238, 244, 247, 253, 258, 263, 268,
170 273, 278, 283, 288, 293, 298, 305, 315, 318, 320,
171 322, 324, 326, 328, 330, 332, 334, 338, 341, 343,
172 345, 347, 349, 351, 355
177 #if (YYDEBUG) || defined YYERROR_VERBOSE
179 /* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
180 static const char *const yytname[] =
182 "$", "error", "$undefined.", "DAY_NAME", "MONTH_NAME", "NUM9", "NUM23",
183 "NUM59", "NUM99", "NUM2359", "NUM9999", "NUM235959", "NUM991231",
184 "NUM99991231", "AMPM", "STD_ZONE", "DST_ZONE", "DST_SUFFIX", "'.'",
185 "'-'", "'/'", "':'", "'+'", "num59", "num", "goal", "dayname",
186 "date.year", "year.date", "yymmdd", "date", "hyphen.date", "slash.date",
187 "year", "month.name", "time", "hour", "hour.alone", "am.pm", "zone",
188 "zone.offset", "time2359", 0
192 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
193 static const short yyr1[] =
195 0, 23, 23, 24, 24, 25, 25, 25, 25, 25,
196 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
197 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
198 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
199 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
200 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
201 25, 26, 26, 27, 27, 27, 27, 28, 28, 28,
202 28, 28, 29, 29, 30, 30, 30, 31, 31, 32,
203 32, 32, 33, 33, 33, 33, 33, 34, 34, 35,
204 35, 35, 35, 36, 36, 37, 37, 37, 37, 37,
205 37, 37, 37, 37, 37, 37, 38, 39, 39, 39,
206 39, 39, 39, 39, 39, 39, 39, 40, 40, 40,
210 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
211 static const short yyr2[] =
213 0, 1, 1, 1, 1, 1, 2, 3, 4, 3,
214 4, 2, 3, 4, 3, 4, 1, 2, 3, 2,
215 3, 2, 3, 4, 2, 3, 3, 3, 3, 2,
216 3, 4, 1, 2, 3, 4, 2, 3, 3, 3,
217 3, 2, 3, 4, 1, 2, 3, 2, 3, 3,
218 4, 4, 3, 4, 4, 1, 1, 3, 3, 4,
219 1, 1, 2, 2, 3, 5, 3, 2, 3, 5,
220 3, 1, 1, 1, 2, 2, 2, 3, 3, 3,
221 3, 3, 1, 1, 1, 1, 1, 1, 2, 1,
222 2, 2, 3, 1, 1, 3, 3, 5, 5, 3,
223 3, 5, 5, 3, 3, 1, 1, 1, 2, 2,
224 3, 1, 2, 2, 3, 2, 3, 1, 3, 3,
228 /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
229 doesn't specify something else to do. Zero means the default is an
231 static const short yydefact[] =
233 0, 60, 61, 87, 3, 1, 2, 84, 85, 86,
234 105, 72, 73, 4, 0, 56, 16, 44, 71, 5,
235 0, 0, 0, 0, 32, 0, 89, 62, 88, 0,
236 0, 0, 0, 0, 0, 3, 1, 2, 0, 0,
237 76, 74, 85, 24, 29, 71, 21, 0, 0, 0,
238 0, 93, 17, 19, 45, 47, 0, 83, 82, 6,
239 63, 11, 0, 0, 1, 0, 0, 0, 0, 67,
240 0, 0, 0, 0, 75, 1, 85, 0, 36, 41,
241 33, 0, 106, 107, 111, 0, 0, 90, 91, 96,
242 95, 100, 99, 104, 103, 0, 77, 81, 79, 25,
243 30, 22, 0, 27, 28, 26, 0, 18, 20, 46,
244 48, 93, 58, 57, 9, 7, 83, 12, 14, 64,
245 66, 0, 68, 0, 0, 70, 0, 49, 0, 0,
246 52, 78, 80, 39, 40, 38, 37, 42, 34, 0,
247 108, 117, 120, 123, 109, 112, 0, 0, 115, 113,
248 92, 0, 0, 0, 0, 0, 23, 31, 59, 10,
249 8, 13, 15, 0, 50, 51, 54, 53, 35, 43,
250 0, 0, 0, 0, 110, 116, 114, 98, 97, 102,
251 101, 65, 69, 119, 118, 122, 121, 0, 0, 0
254 static const short yydefgoto[] =
256 13, 67, 187, 15, 16, 17, 45, 69, 20, 21,
257 60, 70, 24, 25, 26, 87, 88, 148, 113
260 static const short yypact[] =
262 255,-32768, -6, 16, 14, 22, 46,-32768, 84,-32768,
263 -32768,-32768,-32768,-32768, 231, 276, 307, 307, 18, 298,
264 -3, 36, 148, -2, 266, 305, 314,-32768,-32768, 40,
265 40, 40, 40, 40, 40,-32768,-32768,-32768, 370, 370,
266 -32768,-32768, 102, 238, 238,-32768, 345, 207, 287, 14,
267 24, 83, 238, 55, 238, 55, 352, 24,-32768, 345,
268 -32768, 331, 358, 358, 24, 370, 370, 370, 338,-32768,
269 218, 366, 218, 218,-32768, 57,-32768, 287, 55, 55,
270 331, 90,-32768, 47,-32768, 183, 156, 92,-32768, 51,
271 50, 58, 54,-32768,-32768, 62,-32768,-32768,-32768,-32768,
272 -32768, 358, 370,-32768,-32768, 358, 235,-32768,-32768,-32768,
273 -32768, 1, 55,-32768, 238, 358,-32768, 358, 55,-32768,
274 -32768, 67,-32768, 72, 93,-32768, 105, 238, 370, 370,
275 55,-32768,-32768,-32768,-32768, 358,-32768,-32768, 358, 370,
276 -32768, 101, 118,-32768, 109,-32768, 156, 156,-32768,-32768,
277 -32768, 40, 40, 40, 40, 358,-32768,-32768,-32768,-32768,
278 -32768,-32768,-32768, 370,-32768,-32768,-32768,-32768,-32768,-32768,
279 40, 40, 40, 40,-32768,-32768,-32768,-32768,-32768,-32768,
280 -32768,-32768,-32768,-32768,-32768,-32768,-32768, 134, 137,-32768
283 static const short yypgoto[] =
285 -23, 0,-32768, 116, 5, 6, 142, 44, 79, 94,
286 26, 13, 163,-32768,-32768,-32768, 69, -84,-32768
293 static const short yytable[] =
295 14, -124, 149, 35, 36, 37, 89, 90, 91, 92,
296 93, 94, 27, 23, 40, 14, 62, 72, 73, 33,
297 43, 44, 34, 74, 14, -83, 22, 41, 23, 78,
298 79, -83, 29, -83, 28, 30, 56, 23, 95, 97,
299 31, 47, 31, 32, 19, 32, 36, 37, 14, -82,
300 81, 96, 98, 103, 104, -82, 63, -82, 2, 46,
301 -83, 23, 175, 176, 140, 121, 124, 40, 80, 151,
302 74, 152, 131, 132, 106, 154, 153, 14, 123, 126,
303 41, 155, 133, 134, -55, 114, 163, 118, 119, 120,
304 23, 72, 105, 2, 3, 35, 36, 37, -93, -93,
305 -93, 33, 33, 106, 34, 34, -93, 83, 84, 65,
306 66, 85, 127, 39, 86, 130, -93, -93, -93, 170,
307 33, 135, 171, 34, -93, 73, 174, 156, 177, 178,
308 179, 180, 52, 54, 188, 59, 172, 189, 68, 173,
309 77, 160, 18, 161, 122, 0, 157, 183, 184, 185,
310 186, 2, 3, 4, 64, 37, 150, 51, 0, 10,
311 125, 141, 142, 182, 168, 143, 0, 65, 66, 108,
312 0, 110, 165, 166, 0, 0, 96, 117, 48, 53,
313 55, 181, 61, 169, 0, 71, 0, 129, 141, 142,
314 0, 0, 143, 0, 136, 137, 138, 139, 144, 145,
315 0, 0, 146, 0, 0, 147, 99, 100, 0, 101,
316 102, 3, 4, 64, 37, 107, 51, 109, 10, 112,
317 0, 0, 115, 35, 36, 37, 65, 66, 158, 0,
318 0, 128, 0, 0, 162, 3, 35, 36, 37, 3,
319 35, 36, 37, 49, 50, 0, 167, 51, 0, 10,
320 38, 39, 0, 0, 65, 66, 1, 0, 2, 3,
321 4, 5, 6, 7, 8, 9, 10, 11, 12, 2,
322 3, 35, 75, 6, 7, 76, 9, 159, 11, 12,
323 3, 4, 5, 6, 7, 42, 9, 10, 11, 12,
324 164, 3, 35, 75, 6, 7, 76, 9, 0, 11,
325 12, 2, 0, 49, 57, 58, 7, 42, 9, 10,
326 2, 0, 49, 50, 0, 0, 51, 0, 10, 82,
327 83, 84, 0, 0, 85, 0, 0, 86, -94, -94,
328 -94, 0, 0, -94, 2, 0, -94, 116, 58, 7,
329 76, 9, 3, 4, 64, 37, 0, 51, 0, 10,
330 49, 57, 58, 7, 42, 9, 10, 49, 50, 0,
331 0, 111, 0, 10, 116, 58, 7, 76, 9, 2,
332 3, 35, 36, 37, 3, 35, 36, 37
335 static const short yycheck[] =
337 0, 0, 86, 5, 6, 7, 29, 30, 31, 32,
338 33, 34, 18, 0, 14, 15, 19, 19, 20, 18,
339 15, 15, 21, 23, 24, 3, 0, 14, 15, 24,
340 24, 9, 18, 11, 18, 21, 18, 24, 38, 39,
341 18, 15, 18, 21, 0, 21, 6, 7, 48, 3,
342 24, 38, 39, 48, 48, 9, 20, 11, 3, 15,
343 3, 48, 146, 147, 17, 65, 66, 67, 24, 18,
344 70, 21, 72, 73, 48, 21, 18, 77, 65, 66,
345 67, 19, 77, 77, 0, 59, 19, 61, 62, 63,
346 77, 19, 48, 3, 4, 5, 6, 7, 14, 15,
347 16, 18, 18, 77, 21, 21, 22, 15, 16, 19,
348 20, 19, 68, 20, 22, 71, 14, 15, 16, 18,
349 18, 77, 21, 21, 22, 20, 17, 101, 151, 152,
350 153, 154, 16, 17, 0, 19, 18, 0, 22, 21,
351 24, 115, 0, 117, 65, -1, 102, 170, 171, 172,
352 173, 3, 4, 5, 6, 7, 87, 9, -1, 11,
353 66, 5, 6, 163, 138, 9, -1, 19, 20, 53,
354 -1, 55, 128, 129, -1, -1, 163, 61, 15, 16,
355 17, 155, 19, 139, -1, 22, -1, 71, 5, 6,
356 -1, -1, 9, -1, 78, 79, 80, 81, 15, 16,
357 -1, -1, 19, -1, -1, 22, 43, 44, -1, 46,
358 47, 4, 5, 6, 7, 52, 9, 54, 11, 56,
359 -1, -1, 59, 5, 6, 7, 19, 20, 112, -1,
360 -1, 68, -1, -1, 118, 4, 5, 6, 7, 4,
361 5, 6, 7, 5, 6, -1, 130, 9, -1, 11,
362 19, 20, -1, -1, 19, 20, 1, -1, 3, 4,
363 5, 6, 7, 8, 9, 10, 11, 12, 13, 3,
364 4, 5, 6, 7, 8, 9, 10, 114, 12, 13,
365 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
366 127, 4, 5, 6, 7, 8, 9, 10, -1, 12,
367 13, 3, -1, 5, 6, 7, 8, 9, 10, 11,
368 3, -1, 5, 6, -1, -1, 9, -1, 11, 14,
369 15, 16, -1, -1, 19, -1, -1, 22, 14, 15,
370 16, -1, -1, 19, 3, -1, 22, 6, 7, 8,
371 9, 10, 4, 5, 6, 7, -1, 9, -1, 11,
372 5, 6, 7, 8, 9, 10, 11, 5, 6, -1,
373 -1, 9, -1, 11, 6, 7, 8, 9, 10, 3,
374 4, 5, 6, 7, 4, 5, 6, 7
376 /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
377 #line 3 "/usr/share/bison/bison.simple"
379 /* Skeleton output parser for bison,
381 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
384 This program is free software; you can redistribute it and/or modify
385 it under the terms of the GNU General Public License as published by
386 the Free Software Foundation; either version 2, or (at your option)
389 This program is distributed in the hope that it will be useful,
390 but WITHOUT ANY WARRANTY; without even the implied warranty of
391 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
392 GNU General Public License for more details.
394 You should have received a copy of the GNU General Public License
395 along with this program; if not, write to the Free Software
396 Foundation, Inc., 59 Temple Place - Suite 330,
397 Boston, MA 02111-1307, USA. */
399 /* As a special exception, when this file is copied by Bison into a
400 Bison output file, you may use that output file without restriction.
401 This special exception was added by the Free Software Foundation
402 in version 1.24 of Bison. */
404 /* This is the parser code that is written into each bison parser when
405 the %semantic_parser declaration is not specified in the grammar.
406 It was written by Richard Stallman by simplifying the hairy parser
407 used when %semantic_parser is specified. */
409 /* All symbols defined below should begin with yy or YY, to avoid
410 infringing on user name space. This should be done even for local
411 variables, as they might otherwise be expanded by user macros.
412 There are some unavoidable exceptions within include files to
413 define necessary library symbols; they are noted "INFRINGES ON
414 USER NAME SPACE" below. */
416 #if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
418 /* The parser invokes alloca or malloc; define the necessary symbols. */
420 # if YYSTACK_USE_ALLOCA
421 # define YYSTACK_ALLOC alloca
423 # ifndef YYSTACK_USE_ALLOCA
424 # if defined (alloca) || defined (_ALLOCA_H)
425 # define YYSTACK_ALLOC alloca
428 # define YYSTACK_ALLOC __builtin_alloca
434 # ifdef YYSTACK_ALLOC
435 /* Pacify GCC's `empty if-body' warning. */
436 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
438 # if defined (__STDC__) || defined (__cplusplus)
439 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
440 # define YYSIZE_T size_t
442 # define YYSTACK_ALLOC malloc
443 # define YYSTACK_FREE free
445 #endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
448 #if (! defined (yyoverflow) \
449 && (! defined (__cplusplus) \
450 || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
452 /* A type that is properly aligned for any stack member. */
462 /* The size of the maximum gap between one aligned stack and the next. */
463 # define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
465 /* The size of an array large to enough to hold all stacks, each with
468 # define YYSTACK_BYTES(N) \
469 ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
470 + 2 * YYSTACK_GAP_MAX)
472 # define YYSTACK_BYTES(N) \
473 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
477 /* Copy COUNT objects from FROM to TO. The source and destination do
481 # define YYCOPY(To, From, Count) \
482 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
484 # define YYCOPY(To, From, Count) \
487 register YYSIZE_T yyi; \
488 for (yyi = 0; yyi < (Count); yyi++) \
489 (To)[yyi] = (From)[yyi]; \
495 /* Relocate STACK from its old location to the new one. The
496 local variables YYSIZE and YYSTACKSIZE give the old and new number of
497 elements in the stack, and YYPTR gives the new location of the
498 stack. Advance YYPTR to a properly aligned location for the next
500 # define YYSTACK_RELOCATE(Stack) \
503 YYSIZE_T yynewbytes; \
504 YYCOPY (&yyptr->Stack, Stack, yysize); \
505 Stack = &yyptr->Stack; \
506 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
507 yyptr += yynewbytes / sizeof (*yyptr); \
514 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
515 # define YYSIZE_T __SIZE_TYPE__
517 #if ! defined (YYSIZE_T) && defined (size_t)
518 # define YYSIZE_T size_t
520 #if ! defined (YYSIZE_T)
521 # if defined (__STDC__) || defined (__cplusplus)
522 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
523 # define YYSIZE_T size_t
526 #if ! defined (YYSIZE_T)
527 # define YYSIZE_T unsigned int
530 #define yyerrok (yyerrstatus = 0)
531 #define yyclearin (yychar = YYEMPTY)
534 #define YYACCEPT goto yyacceptlab
535 #define YYABORT goto yyabortlab
536 #define YYERROR goto yyerrlab1
537 /* Like YYERROR except do call yyerror. This remains here temporarily
538 to ease the transition to the new meaning of YYERROR, for GCC.
539 Once GCC version 2 has supplanted version 1, this can go. */
540 #define YYFAIL goto yyerrlab
541 #define YYRECOVERING() (!!yyerrstatus)
542 #define YYBACKUP(Token, Value) \
544 if (yychar == YYEMPTY && yylen == 1) \
548 yychar1 = YYTRANSLATE (yychar); \
554 yyerror ("syntax error: cannot back up"); \
560 #define YYERRCODE 256
563 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
566 When YYLLOC_DEFAULT is run, CURRENT is set the location of the
567 first token. By default, to implement support for ranges, extend
568 its range to the last symbol. */
570 #ifndef YYLLOC_DEFAULT
571 # define YYLLOC_DEFAULT(Current, Rhs, N) \
572 Current.last_line = Rhs[N].last_line; \
573 Current.last_column = Rhs[N].last_column;
577 /* YYLEX -- calling `yylex' with the right arguments. */
582 # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
584 # define YYLEX yylex (&yylval, &yylloc)
586 # else /* !YYLSP_NEEDED */
588 # define YYLEX yylex (&yylval, YYLEX_PARAM)
590 # define YYLEX yylex (&yylval)
592 # endif /* !YYLSP_NEEDED */
594 # define YYLEX yylex ()
598 /* Enable debugging if requested. */
602 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
603 # define YYFPRINTF fprintf
606 # define YYDPRINTF(Args) \
611 /* Nonzero means print parse trace. It is left uninitialized so that
612 multiple parsers can coexist. */
615 # define YYDPRINTF(Args)
616 #endif /* !YYDEBUG */
618 /* YYINITDEPTH -- initial size of the parser's stacks. */
620 # define YYINITDEPTH 200
623 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
624 if the built-in stack extension method is used).
626 Do not make this value too large; the results are undefined if
627 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
628 evaluated with infinite-precision integer arithmetic. */
635 # define YYMAXDEPTH 10000
638 #ifdef YYERROR_VERBOSE
641 # if defined (__GLIBC__) && defined (_STRING_H)
642 # define yystrlen strlen
644 /* Return the length of YYSTR. */
646 # if defined (__STDC__) || defined (__cplusplus)
647 yystrlen (const char *yystr)
653 register const char *yys = yystr;
655 while (*yys++ != '\0')
658 return yys - yystr - 1;
664 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
665 # define yystpcpy stpcpy
667 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
670 # if defined (__STDC__) || defined (__cplusplus)
671 yystpcpy (char *yydest, const char *yysrc)
673 yystpcpy (yydest, yysrc)
678 register char *yyd = yydest;
679 register const char *yys = yysrc;
681 while ((*yyd++ = *yys++) != '\0')
690 #line 315 "/usr/share/bison/bison.simple"
693 /* The user can define YYPARSE_PARAM as the name of an argument to be passed
694 into yyparse. The argument should have type void *.
695 It should actually point to an object.
696 Grammar actions can access the variable by casting it
697 to the proper pointer type. */
700 # if defined (__STDC__) || defined (__cplusplus)
701 # define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
702 # define YYPARSE_PARAM_DECL
704 # define YYPARSE_PARAM_ARG YYPARSE_PARAM
705 # define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
707 #else /* !YYPARSE_PARAM */
708 # define YYPARSE_PARAM_ARG
709 # define YYPARSE_PARAM_DECL
710 #endif /* !YYPARSE_PARAM */
712 /* Prevent warning if -Wstrict-prototypes. */
714 # ifdef YYPARSE_PARAM
715 int yyparse (void *);
721 /* YY_DECL_VARIABLES -- depending whether we use a pure parser,
722 variables are global, or local to YYPARSE. */
724 #define YY_DECL_NON_LSP_VARIABLES \
725 /* The lookahead symbol. */ \
728 /* The semantic value of the lookahead symbol. */ \
731 /* Number of parse errors so far. */ \
735 # define YY_DECL_VARIABLES \
736 YY_DECL_NON_LSP_VARIABLES \
738 /* Location data for the lookahead symbol. */ \
741 # define YY_DECL_VARIABLES \
742 YY_DECL_NON_LSP_VARIABLES
746 /* If nonreentrant, generate the variables here. */
753 yyparse (YYPARSE_PARAM_ARG)
756 /* If reentrant, generate the variables here. */
761 register int yystate;
764 /* Number of tokens to shift before error messages enabled. */
766 /* Lookahead token as an internal (translated) token number. */
769 /* Three stacks and their tools:
770 `yyss': related to states,
771 `yyvs': related to semantic values,
772 `yyls': related to locations.
774 Refer to the stacks thru separate pointers, to allow yyoverflow
775 to reallocate them elsewhere. */
777 /* The state stack. */
778 short yyssa[YYINITDEPTH];
780 register short *yyssp;
782 /* The semantic value stack. */
783 YYSTYPE yyvsa[YYINITDEPTH];
784 YYSTYPE *yyvs = yyvsa;
785 register YYSTYPE *yyvsp;
788 /* The location stack. */
789 YYLTYPE yylsa[YYINITDEPTH];
790 YYLTYPE *yyls = yylsa;
795 # define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
797 # define YYPOPSTACK (yyvsp--, yyssp--)
800 YYSIZE_T yystacksize = YYINITDEPTH;
803 /* The variables used to return semantic value and location from the
810 /* When reducing, the number of symbols on the RHS of the reduced
814 YYDPRINTF ((stderr, "Starting parse\n"));
819 yychar = YYEMPTY; /* Cause a token to be read. */
821 /* Initialize stack pointers.
822 Waste one element of value and location stack
823 so that they stay on the same level as the state stack.
824 The wasted elements are never initialized. */
833 /*------------------------------------------------------------.
834 | yynewstate -- Push a new state, which is found in yystate. |
835 `------------------------------------------------------------*/
837 /* In all cases, when you get here, the value and location stacks
838 have just been pushed. so pushing a state here evens the stacks.
845 if (yyssp >= yyss + yystacksize - 1)
847 /* Get the current used size of the three stacks, in elements. */
848 YYSIZE_T yysize = yyssp - yyss + 1;
852 /* Give user a chance to reallocate the stack. Use copies of
853 these so that the &'s don't force the real ones into
855 YYSTYPE *yyvs1 = yyvs;
858 /* Each stack pointer address is followed by the size of the
859 data in use in that stack, in bytes. */
861 YYLTYPE *yyls1 = yyls;
862 /* This used to be a conditional around just the two extra args,
863 but that might be undefined if yyoverflow is a macro. */
864 yyoverflow ("parser stack overflow",
865 &yyss1, yysize * sizeof (*yyssp),
866 &yyvs1, yysize * sizeof (*yyvsp),
867 &yyls1, yysize * sizeof (*yylsp),
871 yyoverflow ("parser stack overflow",
872 &yyss1, yysize * sizeof (*yyssp),
873 &yyvs1, yysize * sizeof (*yyvsp),
879 #else /* no yyoverflow */
880 # ifndef YYSTACK_RELOCATE
883 /* Extend the stack our own way. */
884 if (yystacksize >= YYMAXDEPTH)
887 if (yystacksize > YYMAXDEPTH)
888 yystacksize = YYMAXDEPTH;
892 union yyalloc *yyptr =
893 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
896 YYSTACK_RELOCATE (yyss);
897 YYSTACK_RELOCATE (yyvs);
899 YYSTACK_RELOCATE (yyls);
901 # undef YYSTACK_RELOCATE
903 YYSTACK_FREE (yyss1);
906 #endif /* no yyoverflow */
908 yyssp = yyss + yysize - 1;
909 yyvsp = yyvs + yysize - 1;
911 yylsp = yyls + yysize - 1;
914 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
915 (unsigned long int) yystacksize));
917 if (yyssp >= yyss + yystacksize - 1)
921 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
931 /* Do appropriate processing given the current state. */
932 /* Read a lookahead token if we need one and don't already have one. */
935 /* First try to decide what to do without reference to lookahead token. */
937 yyn = yypact[yystate];
941 /* Not known => get a lookahead token if don't already have one. */
943 /* yychar is either YYEMPTY or YYEOF
944 or a valid token in external form. */
946 if (yychar == YYEMPTY)
948 YYDPRINTF ((stderr, "Reading a token: "));
952 /* Convert token to internal form (in yychar1) for indexing tables with */
954 if (yychar <= 0) /* This means end of input. */
957 yychar = YYEOF; /* Don't call YYLEX any more */
959 YYDPRINTF ((stderr, "Now at end of input.\n"));
963 yychar1 = YYTRANSLATE (yychar);
966 /* We have to keep this `#if YYDEBUG', since we use variables
967 which are defined only if `YYDEBUG' is set. */
970 YYFPRINTF (stderr, "Next token is %d (%s",
971 yychar, yytname[yychar1]);
972 /* Give the individual parser a way to print the precise
973 meaning of a token, for further debugging info. */
975 YYPRINT (stderr, yychar, yylval);
977 YYFPRINTF (stderr, ")\n");
983 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
988 /* yyn is what to do for this token type in this state.
989 Negative => reduce, -yyn is rule number.
990 Positive => shift, yyn is new state.
991 New state is final state => don't bother to shift,
993 0, or most negative number => error. */
1008 /* Shift the lookahead token. */
1009 YYDPRINTF ((stderr, "Shifting token %d (%s), ",
1010 yychar, yytname[yychar1]));
1012 /* Discard the token being shifted unless it is eof. */
1013 if (yychar != YYEOF)
1021 /* Count tokens shifted since error; after three, turn off error
1030 /*-----------------------------------------------------------.
1031 | yydefault -- do the default action for the current state. |
1032 `-----------------------------------------------------------*/
1034 yyn = yydefact[yystate];
1040 /*-----------------------------.
1041 | yyreduce -- Do a reduction. |
1042 `-----------------------------*/
1044 /* yyn is the number of a rule to reduce with. */
1047 /* If YYLEN is nonzero, implement the default value of the action:
1050 Otherwise, the following line sets YYVAL to the semantic value of
1051 the lookahead token. This behavior is undocumented and Bison
1052 users should not rely upon it. Assigning to YYVAL
1053 unconditionally makes the parser a bit smaller, and it avoids a
1054 GCC warning that YYVAL may be used uninitialized. */
1055 yyval = yyvsp[1-yylen];
1058 /* Similarly for the default location. Let the user run additional
1059 commands if for instance locations are ranges. */
1060 yyloc = yylsp[1-yylen];
1061 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1065 /* We have to keep this `#if YYDEBUG', since we use variables which
1066 are defined only if `YYDEBUG' is set. */
1071 YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
1074 /* Print the symbols being reduced, and their result. */
1075 for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
1076 YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
1077 YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
1084 #line 134 "dateyacc.y"
1085 { yyans.hour = yyvsp[0].IntVal / 100;
1086 yyans.minute = yyvsp[0].IntVal % 100;
1087 yyans.second = -1; /* unspecified */
1091 #line 143 "dateyacc.y"
1092 { extern char *yyinbuf;
1093 if (yyans.error == NULL) yyans.error = yyinbuf;
1097 #line 150 "dateyacc.y"
1098 { yyans.c_weekday = yyvsp[0].IntVal; ;
1101 #line 152 "dateyacc.y"
1102 { yyans.c_weekday = yyvsp[-1].IntVal; ;
1105 #line 159 "dateyacc.y"
1106 { yyans.day = yyvsp[-4].IntVal; yyans.month = yyvsp[-2].IntVal; ;
1109 #line 167 "dateyacc.y"
1110 { yyans.day = yyvsp[0].IntVal; yyans.month = yyvsp[-2].IntVal; ;
1113 #line 174 "dateyacc.y"
1114 { yyans.year = (yyvsp[0].IntVal / 10000) + 1900; /* ajs */
1115 yyans.month = (yyvsp[0].IntVal % 10000) / 100; /* ajs */
1116 yyans.day = (yyvsp[0].IntVal % 100); /* ajs */
1120 #line 180 "dateyacc.y"
1121 { yyans.year = (yyvsp[0].IntVal / 10000); /* ajs */
1122 yyans.month = (yyvsp[0].IntVal % 10000) / 100; /* ajs */
1123 yyans.day = (yyvsp[0].IntVal % 100); /* ajs */
1127 #line 188 "dateyacc.y"
1128 { yyans.day = yyvsp[-1].IntVal; ;
1131 #line 190 "dateyacc.y"
1132 { yyans.day = yyvsp[0].IntVal; ;
1135 #line 192 "dateyacc.y"
1136 { yyans.month = yyvsp[-1].IntVal; yyans.day = yyvsp[0].IntVal; ;
1139 #line 197 "dateyacc.y"
1140 { yyans.day = yyvsp[-2].IntVal; ;
1143 #line 199 "dateyacc.y"
1144 { yyans.day = yyvsp[0].IntVal; ;
1147 #line 204 "dateyacc.y"
1148 { yyans.day = yyvsp[-2].IntVal; ;
1151 #line 206 "dateyacc.y"
1152 { yyans.day = yyvsp[0].IntVal; ;
1155 #line 208 "dateyacc.y"
1156 { yyans.month = yyvsp[-2].IntVal; yyans.day = yyvsp[0].IntVal; ;
1159 #line 213 "dateyacc.y"
1160 { yyans.year = 2000 + yyvsp[0].IntVal; ;
1163 #line 215 "dateyacc.y"
1164 { yyans.year = 2000 + yyvsp[0].IntVal; ;
1167 #line 217 "dateyacc.y"
1168 { yyans.year = 1900 + yyvsp[0].IntVal; ;
1171 #line 219 "dateyacc.y"
1172 { yyans.year = yyvsp[0].IntVal; ;
1175 #line 221 "dateyacc.y"
1176 { yyans.year = yyvsp[0].IntVal; ;
1179 #line 226 "dateyacc.y"
1180 { yyans.month = yyvsp[0].IntVal; ;
1183 #line 228 "dateyacc.y"
1184 { yyans.month = yyvsp[-1].IntVal; ;
1187 #line 240 "dateyacc.y"
1188 { yyans.hour = yyvsp[0].IntVal / 100;
1189 yyans.minute = yyvsp[0].IntVal % 100;
1190 yyans.second = -1; /* unspecified */
1194 #line 249 "dateyacc.y"
1195 { yyans.hour = yyvsp[-2].IntVal;
1196 yyans.minute = yyvsp[0].IntVal;
1197 yyans.second = -1; /* unspecified */
1201 #line 254 "dateyacc.y"
1202 { yyans.hour = yyvsp[-2].IntVal;
1203 yyans.minute = yyvsp[0].IntVal;
1204 yyans.second = -1; /* unspecified */
1208 #line 259 "dateyacc.y"
1209 { yyans.hour = yyvsp[-4].IntVal;
1210 yyans.minute = yyvsp[-2].IntVal;
1211 yyans.second = yyvsp[0].IntVal;
1215 #line 264 "dateyacc.y"
1216 { yyans.hour = yyvsp[-4].IntVal;
1217 yyans.minute = yyvsp[-2].IntVal;
1218 yyans.second = yyvsp[0].IntVal;
1222 #line 269 "dateyacc.y"
1223 { yyans.hour = yyvsp[-2].IntVal;
1224 yyans.minute = yyvsp[0].IntVal;
1225 yyans.second = -1; /* unspecified */
1229 #line 274 "dateyacc.y"
1230 { yyans.hour = yyvsp[-2].IntVal;
1231 yyans.minute = yyvsp[0].IntVal;
1232 yyans.second = -1; /* unspecified */
1236 #line 279 "dateyacc.y"
1237 { yyans.hour = yyvsp[-4].IntVal;
1238 yyans.minute = yyvsp[-2].IntVal;
1239 yyans.second = yyvsp[0].IntVal;
1243 #line 284 "dateyacc.y"
1244 { yyans.hour = yyvsp[-4].IntVal;
1245 yyans.minute = yyvsp[-2].IntVal;
1246 yyans.second = yyvsp[0].IntVal;
1250 #line 289 "dateyacc.y"
1251 { yyans.hour = yyvsp[-2].IntVal / 100;
1252 yyans.minute = yyvsp[-2].IntVal % 100;
1253 yyans.second = yyvsp[0].IntVal;
1257 #line 294 "dateyacc.y"
1258 { yyans.hour = yyvsp[-2].IntVal / 100;
1259 yyans.minute = yyvsp[-2].IntVal % 100;
1260 yyans.second = yyvsp[0].IntVal;
1264 #line 299 "dateyacc.y"
1265 { yyans.hour = yyvsp[0].IntVal / 10000;
1266 yyans.minute = (yyvsp[0].IntVal % 10000) / 100;
1267 yyans.second = yyvsp[0].IntVal % 100;
1271 #line 307 "dateyacc.y"
1272 { if (yyans.hour < 1 || yyans.hour > 12)
1273 yyans.hour = -1; /* invalid */
1275 { if (yyans.hour == 12) yyans.hour = 0;
1276 yyans.hour += yyvsp[0].IntVal; /* 0 for AM, 12 for PM */
1280 #line 317 "dateyacc.y"
1281 { yyans.zone = yyvsp[0].IntVal; yyans.dst = 0; ;
1284 #line 319 "dateyacc.y"
1285 { yyans.zone = yyvsp[-1].IntVal + 60; yyans.dst = 1; ;
1288 #line 321 "dateyacc.y"
1289 { yyans.zone = yyvsp[0].IntVal; yyans.dst = 0; ;
1292 #line 323 "dateyacc.y"
1293 { yyans.zone = yyvsp[-1].IntVal + 60; yyans.dst = 1; ;
1296 #line 325 "dateyacc.y"
1297 { yyans.zone = yyvsp[0].IntVal; yyans.dst = 1; ;
1300 #line 327 "dateyacc.y"
1301 { yyans.zone = yyvsp[0].IntVal; yyans.dst = 1; ;
1304 #line 329 "dateyacc.y"
1305 { yyans.zone = yyvsp[0].IntVal; yyans.dst = 0; ;
1308 #line 331 "dateyacc.y"
1309 { yyans.zone = yyvsp[0].IntVal; yyans.dst = 0; ;
1312 #line 333 "dateyacc.y"
1313 { yyans.zone = - yyvsp[0].IntVal; yyans.dst = 0; ;
1316 #line 335 "dateyacc.y"
1317 { yyans.zone = - yyvsp[0].IntVal; yyans.dst = 0; ;
1320 #line 340 "dateyacc.y"
1321 { yyval.IntVal = 60 * yyvsp[0].IntVal; ;
1324 #line 342 "dateyacc.y"
1325 { yyval.IntVal = 60 * yyvsp[-2].IntVal + yyvsp[0].IntVal; ;
1328 #line 344 "dateyacc.y"
1329 { yyval.IntVal = 60 * yyvsp[-2].IntVal + yyvsp[0].IntVal; ;
1332 #line 346 "dateyacc.y"
1333 { yyval.IntVal = 60 * yyvsp[0].IntVal; ;
1336 #line 348 "dateyacc.y"
1337 { yyval.IntVal = 60 * yyvsp[-2].IntVal + yyvsp[0].IntVal; ;
1340 #line 350 "dateyacc.y"
1341 { yyval.IntVal = 60 * yyvsp[-2].IntVal + yyvsp[0].IntVal; ;
1344 #line 352 "dateyacc.y"
1345 { yyval.IntVal = 60 * (yyvsp[0].IntVal / 100) | (yyvsp[0].IntVal % 100); ;
1348 #line 357 "dateyacc.y"
1349 { yyans.hour = yyvsp[0].IntVal / 100; /* ajs */
1350 yyans.minute = yyvsp[0].IntVal % 100; /* ajs */
1351 yyans.second = -1; /* ajs */
1356 #line 705 "/usr/share/bison/bison.simple"
1368 short *yyssp1 = yyss - 1;
1369 YYFPRINTF (stderr, "state stack now");
1370 while (yyssp1 != yyssp)
1371 YYFPRINTF (stderr, " %d", *++yyssp1);
1372 YYFPRINTF (stderr, "\n");
1381 /* Now `shift' the result of the reduction. Determine what state
1382 that goes to, based on the state we popped back to and the rule
1383 number reduced by. */
1387 yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
1388 if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1389 yystate = yytable[yystate];
1391 yystate = yydefgoto[yyn - YYNTBASE];
1396 /*------------------------------------.
1397 | yyerrlab -- here on detecting error |
1398 `------------------------------------*/
1400 /* If not already recovering from an error, report this error. */
1405 #ifdef YYERROR_VERBOSE
1406 yyn = yypact[yystate];
1408 if (yyn > YYFLAG && yyn < YYLAST)
1410 YYSIZE_T yysize = 0;
1415 /* Start YYX at -YYN if negative to avoid negative indexes in
1417 for (yyx = yyn < 0 ? -yyn : 0;
1418 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1419 if (yycheck[yyx + yyn] == yyx)
1420 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1421 yysize += yystrlen ("parse error, unexpected ") + 1;
1422 yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
1423 yymsg = (char *) YYSTACK_ALLOC (yysize);
1426 char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
1427 yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
1432 for (yyx = yyn < 0 ? -yyn : 0;
1433 yyx < (int) (sizeof (yytname) / sizeof (char *));
1435 if (yycheck[yyx + yyn] == yyx)
1437 const char *yyq = ! yycount ? ", expecting " : " or ";
1438 yyp = yystpcpy (yyp, yyq);
1439 yyp = yystpcpy (yyp, yytname[yyx]);
1444 YYSTACK_FREE (yymsg);
1447 yyerror ("parse error; also virtual memory exhausted");
1450 #endif /* defined (YYERROR_VERBOSE) */
1451 yyerror ("parse error");
1456 /*--------------------------------------------------.
1457 | yyerrlab1 -- error raised explicitly by an action |
1458 `--------------------------------------------------*/
1460 if (yyerrstatus == 3)
1462 /* If just tried and failed to reuse lookahead token after an
1463 error, discard it. */
1465 /* return failure if at end of input */
1466 if (yychar == YYEOF)
1468 YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
1469 yychar, yytname[yychar1]));
1473 /* Else will try to reuse lookahead token after shifting the error
1476 yyerrstatus = 3; /* Each real token shifted decrements this */
1481 /*-------------------------------------------------------------------.
1482 | yyerrdefault -- current state does not do anything special for the |
1484 `-------------------------------------------------------------------*/
1487 /* This is wrong; only states that explicitly want error tokens
1488 should shift them. */
1490 /* If its default is to accept any token, ok. Otherwise pop it. */
1491 yyn = yydefact[yystate];
1497 /*---------------------------------------------------------------.
1498 | yyerrpop -- pop the current state because it cannot handle the |
1500 `---------------------------------------------------------------*/
1513 short *yyssp1 = yyss - 1;
1514 YYFPRINTF (stderr, "Error: state stack now");
1515 while (yyssp1 != yyssp)
1516 YYFPRINTF (stderr, " %d", *++yyssp1);
1517 YYFPRINTF (stderr, "\n");
1525 yyn = yypact[yystate];
1530 if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
1547 YYDPRINTF ((stderr, "Shifting error token, "));
1558 /*-------------------------------------.
1559 | yyacceptlab -- YYACCEPT comes here. |
1560 `-------------------------------------*/
1565 /*-----------------------------------.
1566 | yyabortlab -- YYABORT comes here. |
1567 `-----------------------------------*/
1572 /*---------------------------------------------.
1573 | yyoverflowab -- parser overflow comes here. |
1574 `---------------------------------------------*/
1576 yyerror ("parser stack overflow");
1583 YYSTACK_FREE (yyss);
1587 #line 363 "dateyacc.y"