26ebc79c295d6aabc455a65474078d397e81b794
[libacl.git] / src / dateyacc.c
1
2 /* A Bison parser, made by GNU Bison 2.4.1.  */
3
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
5    
6       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7    Free Software Foundation, Inc.
8    
9    This program is free software: you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13    
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18    
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
21
22 /* As a special exception, you may create a larger work that contains
23    part or all of the Bison parser skeleton and distribute that work
24    under terms of your choice, so long as that work isn't itself a
25    parser generator using the skeleton or a modified version thereof
26    as a parser skeleton.  Alternatively, if you modify or redistribute
27    the parser skeleton itself, you may (at your option) remove this
28    special exception, which will cause the skeleton and the resulting
29    Bison output files to be licensed under the GNU General Public
30    License without this special exception.
31    
32    This special exception was added by the Free Software Foundation in
33    version 2.2 of Bison.  */
34
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36    simplifying the original so-called "semantic" parser.  */
37
38 /* All symbols defined below should begin with yy or YY, to avoid
39    infringing on user name space.  This should be done even for local
40    variables, as they might otherwise be expanded by user macros.
41    There are some unavoidable exceptions within include files to
42    define necessary library symbols; they are noted "INFRINGES ON
43    USER NAME SPACE" below.  */
44
45 /* Identify Bison output.  */
46 #define YYBISON 1
47
48 /* Bison version.  */
49 #define YYBISON_VERSION "2.4.1"
50
51 /* Skeleton name.  */
52 #define YYSKELETON_NAME "yacc.c"
53
54 /* Pure parsers.  */
55 #define YYPURE 0
56
57 /* Push parsers.  */
58 #define YYPUSH 0
59
60 /* Pull parsers.  */
61 #define YYPULL 1
62
63 /* Using locations.  */
64 #define YYLSP_NEEDED 0
65
66
67
68 /* Copy the first part of user declarations.  */
69
70 /* Line 189 of yacc.c  */
71 #line 51 "dateyacc.y"
72
73 #ifdef RCSIDENT
74 static char rcsident[] = "$Header: /cvsroot/lib/AXE/src/dateyacc.y,v 1.2 2002-09-28 06:58:45 arjen Exp $";
75 #endif /*RCSIDENT*/
76
77 #include <stdio.h>
78 #include "parsedate.h"
79 struct parseddate yyans;
80
81 /* No error routine is needed here. */
82 #define yyerror(s)
83
84
85 /* Line 189 of yacc.c  */
86 #line 87 "dateyacc.c"
87
88 /* Enabling traces.  */
89 #ifndef YYDEBUG
90 # define YYDEBUG 0
91 #endif
92
93 /* Enabling verbose error messages.  */
94 #ifdef YYERROR_VERBOSE
95 # undef YYERROR_VERBOSE
96 # define YYERROR_VERBOSE 1
97 #else
98 # define YYERROR_VERBOSE 0
99 #endif
100
101 /* Enabling the token table.  */
102 #ifndef YYTOKEN_TABLE
103 # define YYTOKEN_TABLE 0
104 #endif
105
106
107 /* Tokens.  */
108 #ifndef YYTOKENTYPE
109 # define YYTOKENTYPE
110    /* Put the tokens into the symbol table, so that GDB and other debuggers
111       know about them.  */
112    enum yytokentype {
113      DAY_NAME = 258,
114      MONTH_NAME = 259,
115      NUM9 = 260,
116      NUM23 = 261,
117      NUM59 = 262,
118      NUM99 = 263,
119      NUM2359 = 264,
120      NUM9999 = 265,
121      NUM235959 = 266,
122      NUM991231 = 267,
123      NUM99991231 = 268,
124      AMPM = 269,
125      STD_ZONE = 270,
126      DST_ZONE = 271,
127      DST_SUFFIX = 272
128    };
129 #endif
130
131
132
133 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
134 typedef union YYSTYPE
135 {
136
137 /* Line 214 of yacc.c  */
138 #line 64 "dateyacc.y"
139
140     int IntVal;
141
142
143
144 /* Line 214 of yacc.c  */
145 #line 146 "dateyacc.c"
146 } YYSTYPE;
147 # define YYSTYPE_IS_TRIVIAL 1
148 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
149 # define YYSTYPE_IS_DECLARED 1
150 #endif
151
152
153 /* Copy the second part of user declarations.  */
154
155
156 /* Line 264 of yacc.c  */
157 #line 158 "dateyacc.c"
158
159 #ifdef short
160 # undef short
161 #endif
162
163 #ifdef YYTYPE_UINT8
164 typedef YYTYPE_UINT8 yytype_uint8;
165 #else
166 typedef unsigned char yytype_uint8;
167 #endif
168
169 #ifdef YYTYPE_INT8
170 typedef YYTYPE_INT8 yytype_int8;
171 #elif (defined __STDC__ || defined __C99__FUNC__ \
172      || defined __cplusplus || defined _MSC_VER)
173 typedef signed char yytype_int8;
174 #else
175 typedef short int yytype_int8;
176 #endif
177
178 #ifdef YYTYPE_UINT16
179 typedef YYTYPE_UINT16 yytype_uint16;
180 #else
181 typedef unsigned short int yytype_uint16;
182 #endif
183
184 #ifdef YYTYPE_INT16
185 typedef YYTYPE_INT16 yytype_int16;
186 #else
187 typedef short int yytype_int16;
188 #endif
189
190 #ifndef YYSIZE_T
191 # ifdef __SIZE_TYPE__
192 #  define YYSIZE_T __SIZE_TYPE__
193 # elif defined size_t
194 #  define YYSIZE_T size_t
195 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
196      || defined __cplusplus || defined _MSC_VER)
197 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
198 #  define YYSIZE_T size_t
199 # else
200 #  define YYSIZE_T unsigned int
201 # endif
202 #endif
203
204 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
205
206 #ifndef YY_
207 # if YYENABLE_NLS
208 #  if ENABLE_NLS
209 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
210 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
211 #  endif
212 # endif
213 # ifndef YY_
214 #  define YY_(msgid) msgid
215 # endif
216 #endif
217
218 /* Suppress unused-variable warnings by "using" E.  */
219 #if ! defined lint || defined __GNUC__
220 # define YYUSE(e) ((void) (e))
221 #else
222 # define YYUSE(e) /* empty */
223 #endif
224
225 /* Identity function, used to suppress warnings about constant conditions.  */
226 #ifndef lint
227 # define YYID(n) (n)
228 #else
229 #if (defined __STDC__ || defined __C99__FUNC__ \
230      || defined __cplusplus || defined _MSC_VER)
231 static int
232 YYID (int yyi)
233 #else
234 static int
235 YYID (yyi)
236     int yyi;
237 #endif
238 {
239   return yyi;
240 }
241 #endif
242
243 #if ! defined yyoverflow || YYERROR_VERBOSE
244
245 /* The parser invokes alloca or malloc; define the necessary symbols.  */
246
247 # ifdef YYSTACK_USE_ALLOCA
248 #  if YYSTACK_USE_ALLOCA
249 #   ifdef __GNUC__
250 #    define YYSTACK_ALLOC __builtin_alloca
251 #   elif defined __BUILTIN_VA_ARG_INCR
252 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
253 #   elif defined _AIX
254 #    define YYSTACK_ALLOC __alloca
255 #   elif defined _MSC_VER
256 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
257 #    define alloca _alloca
258 #   else
259 #    define YYSTACK_ALLOC alloca
260 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
261      || defined __cplusplus || defined _MSC_VER)
262 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
263 #     ifndef _STDLIB_H
264 #      define _STDLIB_H 1
265 #     endif
266 #    endif
267 #   endif
268 #  endif
269 # endif
270
271 # ifdef YYSTACK_ALLOC
272    /* Pacify GCC's `empty if-body' warning.  */
273 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
274 #  ifndef YYSTACK_ALLOC_MAXIMUM
275     /* The OS might guarantee only one guard page at the bottom of the stack,
276        and a page size can be as small as 4096 bytes.  So we cannot safely
277        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
278        to allow for a few compiler-allocated temporary stack slots.  */
279 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
280 #  endif
281 # else
282 #  define YYSTACK_ALLOC YYMALLOC
283 #  define YYSTACK_FREE YYFREE
284 #  ifndef YYSTACK_ALLOC_MAXIMUM
285 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
286 #  endif
287 #  if (defined __cplusplus && ! defined _STDLIB_H \
288        && ! ((defined YYMALLOC || defined malloc) \
289              && (defined YYFREE || defined free)))
290 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
291 #   ifndef _STDLIB_H
292 #    define _STDLIB_H 1
293 #   endif
294 #  endif
295 #  ifndef YYMALLOC
296 #   define YYMALLOC malloc
297 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
298      || defined __cplusplus || defined _MSC_VER)
299 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
300 #   endif
301 #  endif
302 #  ifndef YYFREE
303 #   define YYFREE free
304 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
305      || defined __cplusplus || defined _MSC_VER)
306 void free (void *); /* INFRINGES ON USER NAME SPACE */
307 #   endif
308 #  endif
309 # endif
310 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
311
312
313 #if (! defined yyoverflow \
314      && (! defined __cplusplus \
315          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
316
317 /* A type that is properly aligned for any stack member.  */
318 union yyalloc
319 {
320   yytype_int16 yyss_alloc;
321   YYSTYPE yyvs_alloc;
322 };
323
324 /* The size of the maximum gap between one aligned stack and the next.  */
325 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
326
327 /* The size of an array large to enough to hold all stacks, each with
328    N elements.  */
329 # define YYSTACK_BYTES(N) \
330      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
331       + YYSTACK_GAP_MAXIMUM)
332
333 /* Copy COUNT objects from FROM to TO.  The source and destination do
334    not overlap.  */
335 # ifndef YYCOPY
336 #  if defined __GNUC__ && 1 < __GNUC__
337 #   define YYCOPY(To, From, Count) \
338       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
339 #  else
340 #   define YYCOPY(To, From, Count)              \
341       do                                        \
342         {                                       \
343           YYSIZE_T yyi;                         \
344           for (yyi = 0; yyi < (Count); yyi++)   \
345             (To)[yyi] = (From)[yyi];            \
346         }                                       \
347       while (YYID (0))
348 #  endif
349 # endif
350
351 /* Relocate STACK from its old location to the new one.  The
352    local variables YYSIZE and YYSTACKSIZE give the old and new number of
353    elements in the stack, and YYPTR gives the new location of the
354    stack.  Advance YYPTR to a properly aligned location for the next
355    stack.  */
356 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
357     do                                                                  \
358       {                                                                 \
359         YYSIZE_T yynewbytes;                                            \
360         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
361         Stack = &yyptr->Stack_alloc;                                    \
362         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
363         yyptr += yynewbytes / sizeof (*yyptr);                          \
364       }                                                                 \
365     while (YYID (0))
366
367 #endif
368
369 /* YYFINAL -- State number of the termination state.  */
370 #define YYFINAL  43
371 /* YYLAST -- Last index in YYTABLE.  */
372 #define YYLAST   366
373
374 /* YYNTOKENS -- Number of terminals.  */
375 #define YYNTOKENS  23
376 /* YYNNTS -- Number of nonterminals.  */
377 #define YYNNTS  20
378 /* YYNRULES -- Number of rules.  */
379 #define YYNRULES  125
380 /* YYNRULES -- Number of states.  */
381 #define YYNSTATES  189
382
383 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
384 #define YYUNDEFTOK  2
385 #define YYMAXUTOK   272
386
387 #define YYTRANSLATE(YYX)                                                \
388   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
389
390 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
391 static const yytype_uint8 yytranslate[] =
392 {
393        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
394        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
395        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
396        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
397        2,     2,     2,    22,     2,    19,    18,    20,     2,     2,
398        2,     2,     2,     2,     2,     2,     2,     2,    21,     2,
399        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
400        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
401        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
402        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
403        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
404        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
405        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
406        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
407        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
408        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
409        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
410        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
411        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
412        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
413        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
414        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
415        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
416        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
417        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
418        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
419        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
420       15,    16,    17
421 };
422
423 #if YYDEBUG
424 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
425    YYRHS.  */
426 static const yytype_uint16 yyprhs[] =
427 {
428        0,     0,     3,     5,     7,     9,    11,    13,    16,    20,
429       25,    29,    34,    37,    41,    46,    50,    55,    57,    60,
430       64,    67,    71,    74,    78,    83,    86,    90,    94,    98,
431      102,   105,   109,   114,   116,   119,   123,   128,   131,   135,
432      139,   143,   147,   150,   154,   159,   161,   164,   168,   171,
433      175,   179,   184,   189,   193,   198,   203,   205,   207,   211,
434      215,   220,   222,   224,   227,   230,   234,   240,   244,   247,
435      251,   257,   261,   263,   265,   267,   270,   273,   276,   280,
436      284,   288,   292,   296,   298,   300,   302,   304,   306,   308,
437      311,   313,   316,   319,   323,   325,   327,   331,   335,   341,
438      347,   351,   355,   361,   367,   371,   375,   377,   379,   381,
439      384,   387,   391,   393,   396,   399,   403,   406,   410,   412,
440      416,   420,   422,   426,   430,   432
441 };
442
443 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
444 static const yytype_int8 yyrhs[] =
445 {
446       26,     0,    -1,     6,    -1,     7,    -1,     5,    -1,    24,
447       -1,    31,    -1,    31,    27,    -1,    31,    27,    36,    -1,
448       31,    27,    36,    34,    -1,    31,    27,    34,    -1,    31,
449       27,    34,    36,    -1,    31,    36,    -1,    31,    36,    27,
450       -1,    31,    36,    27,    34,    -1,    31,    36,    34,    -1,
451       31,    36,    34,    27,    -1,    28,    -1,    28,    27,    -1,
452       28,    27,    36,    -1,    28,    36,    -1,    28,    36,    27,
453       -1,    27,    31,    -1,    27,    31,    36,    -1,    27,    31,
454       36,    34,    -1,    27,    28,    -1,    27,    28,    36,    -1,
455       27,    36,    31,    -1,    27,    36,    28,    -1,    27,    36,
456       29,    -1,    27,    29,    -1,    27,    29,    36,    -1,    27,
457       34,    36,    31,    -1,    36,    -1,    36,    31,    -1,    36,
458       31,    27,    -1,    36,    31,    27,    34,    -1,    36,    28,
459       -1,    36,    28,    27,    -1,    36,    27,    31,    -1,    36,
460       27,    28,    -1,    36,    27,    29,    -1,    36,    29,    -1,
461       36,    29,    27,    -1,    36,    34,    27,    31,    -1,    29,
462       -1,    29,    27,    -1,    29,    27,    36,    -1,    29,    36,
463       -1,    29,    36,    27,    -1,    34,    27,    31,    -1,    34,
464       27,    31,    36,    -1,    34,    27,    36,    31,    -1,    34,
465       36,    31,    -1,    34,    36,    31,    27,    -1,    34,    36,
466       27,    31,    -1,     9,    -1,    27,    -1,    30,    18,    42,
467       -1,    30,    18,    36,    -1,    30,    18,    36,    27,    -1,
468        1,    -1,     3,    -1,     3,    18,    -1,    31,    34,    -1,
469       32,    19,    34,    -1,    25,    19,    25,    19,    34,    -1,
470       33,    20,    34,    -1,    34,    31,    -1,    34,    19,    32,
471       -1,    34,    19,    25,    19,    25,    -1,    34,    20,    33,
472       -1,    30,    -1,    12,    -1,    13,    -1,    25,    35,    -1,
473       35,    25,    -1,    25,    25,    -1,    25,    19,    35,    -1,
474       35,    19,    25,    -1,    25,    20,    35,    -1,    35,    20,
475       25,    -1,    25,    20,    25,    -1,     7,    -1,     6,    -1,
476        8,    -1,     9,    -1,    10,    -1,     4,    -1,     4,    18,
477       -1,    38,    -1,    37,    39,    -1,    37,    40,    -1,    37,
478       39,    40,    -1,     9,    -1,    38,    -1,     5,    21,    24,
479       -1,     5,    18,    24,    -1,     5,    21,    24,    21,    24,
480       -1,     5,    18,    24,    18,    24,    -1,     6,    21,    24,
481       -1,     6,    18,    24,    -1,     6,    21,    24,    21,    24,
482       -1,     6,    18,    24,    18,    24,    -1,     9,    21,    24,
483       -1,     9,    18,    24,    -1,    11,    -1,    14,    -1,    15,
484       -1,    15,    17,    -1,    19,    15,    -1,    19,    15,    17,
485       -1,    16,    -1,    19,    16,    -1,    22,    41,    -1,    19,
486       22,    41,    -1,    19,    41,    -1,    19,    19,    41,    -1,
487        5,    -1,     5,    21,    24,    -1,     5,    18,    24,    -1,
488        6,    -1,     6,    21,    24,    -1,     6,    18,    24,    -1,
489        9,    -1,     9,    -1
490 };
491
492 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
493 static const yytype_uint16 yyrline[] =
494 {
495        0,    87,    87,    88,    92,    93,    97,    98,    99,   100,
496      101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
497      111,   112,   113,   114,   115,   116,   117,   118,   119,   120,
498      121,   122,   123,   124,   125,   126,   127,   128,   129,   130,
499      131,   132,   133,   134,   135,   136,   137,   138,   139,   140,
500      141,   142,   143,   144,   145,   146,   147,   152,   153,   154,
501      155,   156,   163,   165,   170,   171,   172,   174,   178,   179,
502      180,   182,   183,   187,   193,   201,   203,   205,   210,   212,
503      217,   219,   221,   226,   228,   230,   232,   234,   239,   241,
504      246,   247,   248,   249,   253,   258,   262,   267,   272,   277,
505      282,   287,   292,   297,   302,   307,   312,   320,   330,   332,
506      334,   336,   338,   340,   342,   344,   346,   348,   353,   355,
507      357,   359,   361,   363,   365,   370
508 };
509 #endif
510
511 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
512 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
513    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
514 static const char *const yytname[] =
515 {
516   "$end", "error", "$undefined", "DAY_NAME", "MONTH_NAME", "NUM9",
517   "NUM23", "NUM59", "NUM99", "NUM2359", "NUM9999", "NUM235959",
518   "NUM991231", "NUM99991231", "AMPM", "STD_ZONE", "DST_ZONE", "DST_SUFFIX",
519   "'.'", "'-'", "'/'", "':'", "'+'", "$accept", "num59", "num", "goal",
520   "dayname", "date.year", "year.date", "yymmdd", "date", "hyphen.date",
521   "slash.date", "year", "month.name", "time", "hour", "hour.alone",
522   "am.pm", "zone", "zone.offset", "time2359", 0
523 };
524 #endif
525
526 # ifdef YYPRINT
527 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
528    token YYLEX-NUM.  */
529 static const yytype_uint16 yytoknum[] =
530 {
531        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
532      265,   266,   267,   268,   269,   270,   271,   272,    46,    45,
533       47,    58,    43
534 };
535 # endif
536
537 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
538 static const yytype_uint8 yyr1[] =
539 {
540        0,    23,    24,    24,    25,    25,    26,    26,    26,    26,
541       26,    26,    26,    26,    26,    26,    26,    26,    26,    26,
542       26,    26,    26,    26,    26,    26,    26,    26,    26,    26,
543       26,    26,    26,    26,    26,    26,    26,    26,    26,    26,
544       26,    26,    26,    26,    26,    26,    26,    26,    26,    26,
545       26,    26,    26,    26,    26,    26,    26,    26,    26,    26,
546       26,    26,    27,    27,    28,    28,    28,    28,    29,    29,
547       29,    29,    29,    30,    30,    31,    31,    31,    32,    32,
548       33,    33,    33,    34,    34,    34,    34,    34,    35,    35,
549       36,    36,    36,    36,    37,    37,    38,    38,    38,    38,
550       38,    38,    38,    38,    38,    38,    38,    39,    40,    40,
551       40,    40,    40,    40,    40,    40,    40,    40,    41,    41,
552       41,    41,    41,    41,    41,    42
553 };
554
555 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
556 static const yytype_uint8 yyr2[] =
557 {
558        0,     2,     1,     1,     1,     1,     1,     2,     3,     4,
559        3,     4,     2,     3,     4,     3,     4,     1,     2,     3,
560        2,     3,     2,     3,     4,     2,     3,     3,     3,     3,
561        2,     3,     4,     1,     2,     3,     4,     2,     3,     3,
562        3,     3,     2,     3,     4,     1,     2,     3,     2,     3,
563        3,     4,     4,     3,     4,     4,     1,     1,     3,     3,
564        4,     1,     1,     2,     2,     3,     5,     3,     2,     3,
565        5,     3,     1,     1,     1,     2,     2,     2,     3,     3,
566        3,     3,     3,     1,     1,     1,     1,     1,     1,     2,
567        1,     2,     2,     3,     1,     1,     3,     3,     5,     5,
568        3,     3,     5,     5,     3,     3,     1,     1,     1,     2,
569        2,     3,     1,     2,     2,     3,     2,     3,     1,     3,
570        3,     1,     3,     3,     1,     1
571 };
572
573 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
574    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
575    means the default is an error.  */
576 static const yytype_uint8 yydefact[] =
577 {
578        0,    61,    62,    88,     4,     2,     3,    85,    86,    87,
579      106,    73,    74,     5,     0,     0,    57,    17,    45,    72,
580        6,     0,     0,     0,     0,    33,     0,    90,    63,    89,
581        0,     0,     0,     0,     0,     0,     4,     2,     3,     0,
582        0,    77,    75,     1,    86,    25,    30,    72,    22,     0,
583        0,     0,     0,    94,    18,    20,    46,    48,     0,    84,
584       83,     7,    64,    12,     0,     0,     2,     0,     0,     0,
585        0,    68,     0,     0,     0,     0,    76,     2,    86,     0,
586       37,    42,    34,     0,   107,   108,   112,     0,     0,    91,
587       92,    97,    96,   101,   100,   105,   104,     0,    78,    82,
588       80,    26,    31,    23,     0,    28,    29,    27,     0,    19,
589       21,    47,    49,    94,    59,    58,    10,     8,    84,    13,
590       15,    65,    67,     0,    69,     0,     0,    71,     0,    50,
591        0,     0,    53,    79,    81,    40,    41,    39,    38,    43,
592       35,     0,   109,   118,   121,   124,   110,   113,     0,     0,
593      116,   114,    93,     0,     0,     0,     0,     0,    24,    32,
594       60,    11,     9,    14,    16,     0,    51,    52,    55,    54,
595       36,    44,     0,     0,     0,     0,   111,   117,   115,    99,
596       98,   103,   102,    66,    70,   120,   119,   123,   122
597 };
598
599 /* YYDEFGOTO[NTERM-NUM].  */
600 static const yytype_int16 yydefgoto[] =
601 {
602       -1,    13,    69,    15,    16,    17,    18,    47,    71,    21,
603       22,    62,    72,    25,    26,    27,    89,    90,   150,   115
604 };
605
606 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
607    STATE-NUM.  */
608 #define YYPACT_NINF -88
609 static const yytype_int16 yypact[] =
610 {
611      250,   -88,    -3,    19,    14,    25,    62,   -88,    86,   -88,
612      -88,   -88,   -88,   -88,    -1,    17,   279,   133,   133,    23,
613      237,    28,    44,   184,   141,   267,   299,   308,   -88,   -88,
614       53,    53,    53,    53,    53,    53,   -88,   -88,   -88,   359,
615      359,   -88,   -88,   -88,   290,   109,   109,   -88,   339,   230,
616      289,    14,    36,   137,   109,    63,   109,    63,   346,    36,
617      -88,   339,   -88,   325,   258,   258,    36,   359,   359,   359,
618      332,   -88,   179,   355,   179,   179,   -88,    67,   -88,   289,
619       63,    63,   325,    90,   -88,    60,   -88,   211,    39,   206,
620      -88,    70,    57,    80,    78,   -88,   -88,    92,   -88,   -88,
621      -88,   -88,   -88,   258,   359,   -88,   -88,   258,   121,   -88,
622      -88,   -88,   -88,     2,    63,   -88,   109,   258,   -88,   258,
623       63,   -88,   -88,    94,   -88,   102,   103,   -88,   114,   109,
624      359,   359,    63,   -88,   -88,   -88,   -88,   258,   -88,   -88,
625      258,   359,   -88,   176,   187,   -88,   118,   -88,    39,    39,
626      -88,   -88,   -88,    53,    53,    53,    53,   258,   -88,   -88,
627      -88,   -88,   -88,   -88,   -88,   359,   -88,   -88,   -88,   -88,
628      -88,   -88,    53,    53,    53,    53,   -88,   -88,   -88,   -88,
629      -88,   -88,   -88,   -88,   -88,   -88,   -88,   -88,   -88
630 };
631
632 /* YYPGOTO[NTERM-NUM].  */
633 static const yytype_int16 yypgoto[] =
634 {
635      -88,   -23,     0,   -88,    99,     5,     6,   157,    33,   100,
636       85,    26,    13,   153,   -88,   -88,   -88,    79,   -87,   -88
637 };
638
639 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
640    positive, shift that token.  If negative, reduce the rule which
641    number is the opposite.  If zero, do what YYDEFACT says.
642    If YYTABLE_NINF, syntax error.  */
643 #define YYTABLE_NINF -126
644 static const yytype_int16 yytable[] =
645 {
646       14,   151,  -125,     3,    36,    37,    38,    91,    92,    93,
647       94,    95,    96,    24,    41,    28,    14,    43,    39,    40,
648       34,    45,    46,    35,    76,    14,    23,    42,   -84,    24,
649       80,    81,    30,    20,   -84,    31,   -84,    29,    24,    97,
650       99,    58,    49,    32,   143,   144,    33,    64,   145,    48,
651       14,    83,    98,   100,    32,   105,   106,    33,    82,    37,
652       38,   177,   178,    24,    65,   -83,     2,   123,   126,    41,
653      -84,   -83,    76,   -83,   133,   134,   108,   142,   154,    14,
654      125,   128,    42,   107,   135,   136,   -56,   116,   153,   120,
655      121,   122,    24,     2,     3,    36,    37,    38,   155,   156,
656      -94,   -94,   -94,   129,    34,   108,   132,    35,   -94,    67,
657       68,   157,   137,   165,    51,    52,    54,    56,    53,    61,
658       10,    74,    70,    40,    79,     3,    36,    37,    38,   158,
659      179,   180,   181,   182,    75,   176,     2,   159,    51,    52,
660       67,    68,    53,   162,    10,   163,    36,    37,    38,   185,
661      186,   187,   188,   127,   110,    34,   112,    19,    35,     0,
662       74,    75,   119,   167,   168,   184,   170,   124,   152,    50,
663       55,    57,   131,    63,   171,     0,    73,     0,    98,   138,
664      139,   140,   141,   183,    36,    37,    38,     2,     3,     4,
665       66,    38,     0,    53,   172,    10,     0,   173,   101,   102,
666        0,   103,   104,    67,    68,   174,     0,   109,   175,   111,
667        0,   114,     0,   160,   117,     0,   143,   144,     0,   164,
668      145,    85,    86,   130,     0,    87,   146,   147,    88,     0,
669      148,   169,     0,   149,     3,     4,    66,    38,     0,    53,
670        2,    10,    51,    59,    60,     7,    44,     9,    10,    67,
671       68,     1,     0,     2,     3,     4,     5,     6,     7,     8,
672        9,    10,    11,    12,   118,    60,     7,    78,     9,   161,
673        2,     3,    36,    77,     6,     7,    78,     9,     0,    11,
674       12,     0,   166,     3,     4,     5,     6,     7,    44,     9,
675       10,    11,    12,     3,    36,    77,     6,     7,    78,     9,
676        0,    11,    12,     0,   -94,   -94,   -94,     0,    34,     0,
677        0,    35,   -94,    84,    85,    86,     0,     0,    87,     0,
678        0,    88,   -95,   -95,   -95,     0,     0,   -95,     2,     0,
679      -95,   118,    60,     7,    78,     9,     3,     4,    66,    38,
680        0,    53,     0,    10,    51,    59,    60,     7,    44,     9,
681       10,    51,    52,     0,     0,   113,     0,    10,     2,     3,
682       36,    37,    38,     3,    36,    37,    38
683 };
684
685 static const yytype_int16 yycheck[] =
686 {
687        0,    88,     0,     4,     5,     6,     7,    30,    31,    32,
688       33,    34,    35,     0,    14,    18,    16,     0,    19,    20,
689       18,    16,    16,    21,    24,    25,     0,    14,     3,    16,
690       25,    25,    18,     0,     9,    21,    11,    18,    25,    39,
691       40,    18,    16,    18,     5,     6,    21,    19,     9,    16,
692       50,    25,    39,    40,    18,    50,    50,    21,    25,     6,
693        7,   148,   149,    50,    20,     3,     3,    67,    68,    69,
694        3,     9,    72,    11,    74,    75,    50,    17,    21,    79,
695       67,    68,    69,    50,    79,    79,     0,    61,    18,    63,
696       64,    65,    79,     3,     4,     5,     6,     7,    18,    21,
697       14,    15,    16,    70,    18,    79,    73,    21,    22,    19,
698       20,    19,    79,    19,     5,     6,    17,    18,     9,    20,
699       11,    19,    23,    20,    25,     4,     5,     6,     7,   103,
700      153,   154,   155,   156,    20,    17,     3,   104,     5,     6,
701       19,    20,     9,   117,    11,   119,     5,     6,     7,   172,
702      173,   174,   175,    68,    55,    18,    57,     0,    21,    -1,
703       19,    20,    63,   130,   131,   165,   140,    67,    89,    16,
704       17,    18,    73,    20,   141,    -1,    23,    -1,   165,    80,
705       81,    82,    83,   157,     5,     6,     7,     3,     4,     5,
706        6,     7,    -1,     9,    18,    11,    -1,    21,    45,    46,
707       -1,    48,    49,    19,    20,    18,    -1,    54,    21,    56,
708       -1,    58,    -1,   114,    61,    -1,     5,     6,    -1,   120,
709        9,    15,    16,    70,    -1,    19,    15,    16,    22,    -1,
710       19,   132,    -1,    22,     4,     5,     6,     7,    -1,     9,
711        3,    11,     5,     6,     7,     8,     9,    10,    11,    19,
712       20,     1,    -1,     3,     4,     5,     6,     7,     8,     9,
713       10,    11,    12,    13,     6,     7,     8,     9,    10,   116,
714        3,     4,     5,     6,     7,     8,     9,    10,    -1,    12,
715       13,    -1,   129,     4,     5,     6,     7,     8,     9,    10,
716       11,    12,    13,     4,     5,     6,     7,     8,     9,    10,
717       -1,    12,    13,    -1,    14,    15,    16,    -1,    18,    -1,
718       -1,    21,    22,    14,    15,    16,    -1,    -1,    19,    -1,
719       -1,    22,    14,    15,    16,    -1,    -1,    19,     3,    -1,
720       22,     6,     7,     8,     9,    10,     4,     5,     6,     7,
721       -1,     9,    -1,    11,     5,     6,     7,     8,     9,    10,
722       11,     5,     6,    -1,    -1,     9,    -1,    11,     3,     4,
723        5,     6,     7,     4,     5,     6,     7
724 };
725
726 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
727    symbol of state STATE-NUM.  */
728 static const yytype_uint8 yystos[] =
729 {
730        0,     1,     3,     4,     5,     6,     7,     8,     9,    10,
731       11,    12,    13,    24,    25,    26,    27,    28,    29,    30,
732       31,    32,    33,    34,    35,    36,    37,    38,    18,    18,
733       18,    21,    18,    21,    18,    21,     5,     6,     7,    19,
734       20,    25,    35,     0,     9,    28,    29,    30,    31,    34,
735       36,     5,     6,     9,    27,    36,    27,    36,    18,     6,
736        7,    27,    34,    36,    19,    20,     6,    19,    20,    25,
737       27,    31,    35,    36,    19,    20,    25,     6,     9,    27,
738       28,    29,    31,    34,    14,    15,    16,    19,    22,    39,
739       40,    24,    24,    24,    24,    24,    24,    25,    35,    25,
740       35,    36,    36,    36,    36,    28,    29,    31,    34,    36,
741       27,    36,    27,     9,    36,    42,    34,    36,     6,    27,
742       34,    34,    34,    25,    32,    35,    25,    33,    35,    31,
743       36,    27,    31,    25,    25,    28,    29,    31,    27,    27,
744       27,    27,    17,     5,     6,     9,    15,    16,    19,    22,
745       41,    41,    40,    18,    21,    18,    21,    19,    34,    31,
746       27,    36,    34,    34,    27,    19,    36,    31,    31,    27,
747       34,    31,    18,    21,    18,    21,    17,    41,    41,    24,
748       24,    24,    24,    34,    25,    24,    24,    24,    24
749 };
750
751 #define yyerrok         (yyerrstatus = 0)
752 #define yyclearin       (yychar = YYEMPTY)
753 #define YYEMPTY         (-2)
754 #define YYEOF           0
755
756 #define YYACCEPT        goto yyacceptlab
757 #define YYABORT         goto yyabortlab
758 #define YYERROR         goto yyerrorlab
759
760
761 /* Like YYERROR except do call yyerror.  This remains here temporarily
762    to ease the transition to the new meaning of YYERROR, for GCC.
763    Once GCC version 2 has supplanted version 1, this can go.  */
764
765 #define YYFAIL          goto yyerrlab
766
767 #define YYRECOVERING()  (!!yyerrstatus)
768
769 #define YYBACKUP(Token, Value)                                  \
770 do                                                              \
771   if (yychar == YYEMPTY && yylen == 1)                          \
772     {                                                           \
773       yychar = (Token);                                         \
774       yylval = (Value);                                         \
775       yytoken = YYTRANSLATE (yychar);                           \
776       YYPOPSTACK (1);                                           \
777       goto yybackup;                                            \
778     }                                                           \
779   else                                                          \
780     {                                                           \
781       yyerror (YY_("syntax error: cannot back up")); \
782       YYERROR;                                                  \
783     }                                                           \
784 while (YYID (0))
785
786
787 #define YYTERROR        1
788 #define YYERRCODE       256
789
790
791 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
792    If N is 0, then set CURRENT to the empty location which ends
793    the previous symbol: RHS[0] (always defined).  */
794
795 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
796 #ifndef YYLLOC_DEFAULT
797 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
798     do                                                                  \
799       if (YYID (N))                                                    \
800         {                                                               \
801           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
802           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
803           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
804           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
805         }                                                               \
806       else                                                              \
807         {                                                               \
808           (Current).first_line   = (Current).last_line   =              \
809             YYRHSLOC (Rhs, 0).last_line;                                \
810           (Current).first_column = (Current).last_column =              \
811             YYRHSLOC (Rhs, 0).last_column;                              \
812         }                                                               \
813     while (YYID (0))
814 #endif
815
816
817 /* YY_LOCATION_PRINT -- Print the location on the stream.
818    This macro was not mandated originally: define only if we know
819    we won't break user code: when these are the locations we know.  */
820
821 #ifndef YY_LOCATION_PRINT
822 # if YYLTYPE_IS_TRIVIAL
823 #  define YY_LOCATION_PRINT(File, Loc)                  \
824      fprintf (File, "%d.%d-%d.%d",                      \
825               (Loc).first_line, (Loc).first_column,     \
826               (Loc).last_line,  (Loc).last_column)
827 # else
828 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
829 # endif
830 #endif
831
832
833 /* YYLEX -- calling `yylex' with the right arguments.  */
834
835 #ifdef YYLEX_PARAM
836 # define YYLEX yylex (YYLEX_PARAM)
837 #else
838 # define YYLEX yylex ()
839 #endif
840
841 /* Enable debugging if requested.  */
842 #if YYDEBUG
843
844 # ifndef YYFPRINTF
845 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
846 #  define YYFPRINTF fprintf
847 # endif
848
849 # define YYDPRINTF(Args)                        \
850 do {                                            \
851   if (yydebug)                                  \
852     YYFPRINTF Args;                             \
853 } while (YYID (0))
854
855 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
856 do {                                                                      \
857   if (yydebug)                                                            \
858     {                                                                     \
859       YYFPRINTF (stderr, "%s ", Title);                                   \
860       yy_symbol_print (stderr,                                            \
861                   Type, Value); \
862       YYFPRINTF (stderr, "\n");                                           \
863     }                                                                     \
864 } while (YYID (0))
865
866
867 /*--------------------------------.
868 | Print this symbol on YYOUTPUT.  |
869 `--------------------------------*/
870
871 /*ARGSUSED*/
872 #if (defined __STDC__ || defined __C99__FUNC__ \
873      || defined __cplusplus || defined _MSC_VER)
874 static void
875 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
876 #else
877 static void
878 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
879     FILE *yyoutput;
880     int yytype;
881     YYSTYPE const * const yyvaluep;
882 #endif
883 {
884   if (!yyvaluep)
885     return;
886 # ifdef YYPRINT
887   if (yytype < YYNTOKENS)
888     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
889 # else
890   YYUSE (yyoutput);
891 # endif
892   switch (yytype)
893     {
894       default:
895         break;
896     }
897 }
898
899
900 /*--------------------------------.
901 | Print this symbol on YYOUTPUT.  |
902 `--------------------------------*/
903
904 #if (defined __STDC__ || defined __C99__FUNC__ \
905      || defined __cplusplus || defined _MSC_VER)
906 static void
907 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
908 #else
909 static void
910 yy_symbol_print (yyoutput, yytype, yyvaluep)
911     FILE *yyoutput;
912     int yytype;
913     YYSTYPE const * const yyvaluep;
914 #endif
915 {
916   if (yytype < YYNTOKENS)
917     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
918   else
919     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
920
921   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
922   YYFPRINTF (yyoutput, ")");
923 }
924
925 /*------------------------------------------------------------------.
926 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
927 | TOP (included).                                                   |
928 `------------------------------------------------------------------*/
929
930 #if (defined __STDC__ || defined __C99__FUNC__ \
931      || defined __cplusplus || defined _MSC_VER)
932 static void
933 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
934 #else
935 static void
936 yy_stack_print (yybottom, yytop)
937     yytype_int16 *yybottom;
938     yytype_int16 *yytop;
939 #endif
940 {
941   YYFPRINTF (stderr, "Stack now");
942   for (; yybottom <= yytop; yybottom++)
943     {
944       int yybot = *yybottom;
945       YYFPRINTF (stderr, " %d", yybot);
946     }
947   YYFPRINTF (stderr, "\n");
948 }
949
950 # define YY_STACK_PRINT(Bottom, Top)                            \
951 do {                                                            \
952   if (yydebug)                                                  \
953     yy_stack_print ((Bottom), (Top));                           \
954 } while (YYID (0))
955
956
957 /*------------------------------------------------.
958 | Report that the YYRULE is going to be reduced.  |
959 `------------------------------------------------*/
960
961 #if (defined __STDC__ || defined __C99__FUNC__ \
962      || defined __cplusplus || defined _MSC_VER)
963 static void
964 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
965 #else
966 static void
967 yy_reduce_print (yyvsp, yyrule)
968     YYSTYPE *yyvsp;
969     int yyrule;
970 #endif
971 {
972   int yynrhs = yyr2[yyrule];
973   int yyi;
974   unsigned long int yylno = yyrline[yyrule];
975   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
976              yyrule - 1, yylno);
977   /* The symbols being reduced.  */
978   for (yyi = 0; yyi < yynrhs; yyi++)
979     {
980       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
981       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
982                        &(yyvsp[(yyi + 1) - (yynrhs)])
983                                        );
984       YYFPRINTF (stderr, "\n");
985     }
986 }
987
988 # define YY_REDUCE_PRINT(Rule)          \
989 do {                                    \
990   if (yydebug)                          \
991     yy_reduce_print (yyvsp, Rule); \
992 } while (YYID (0))
993
994 /* Nonzero means print parse trace.  It is left uninitialized so that
995    multiple parsers can coexist.  */
996 int yydebug;
997 #else /* !YYDEBUG */
998 # define YYDPRINTF(Args)
999 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1000 # define YY_STACK_PRINT(Bottom, Top)
1001 # define YY_REDUCE_PRINT(Rule)
1002 #endif /* !YYDEBUG */
1003
1004
1005 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1006 #ifndef YYINITDEPTH
1007 # define YYINITDEPTH 200
1008 #endif
1009
1010 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1011    if the built-in stack extension method is used).
1012
1013    Do not make this value too large; the results are undefined if
1014    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1015    evaluated with infinite-precision integer arithmetic.  */
1016
1017 #ifndef YYMAXDEPTH
1018 # define YYMAXDEPTH 10000
1019 #endif
1020
1021 \f
1022
1023 #if YYERROR_VERBOSE
1024
1025 # ifndef yystrlen
1026 #  if defined __GLIBC__ && defined _STRING_H
1027 #   define yystrlen strlen
1028 #  else
1029 /* Return the length of YYSTR.  */
1030 #if (defined __STDC__ || defined __C99__FUNC__ \
1031      || defined __cplusplus || defined _MSC_VER)
1032 static YYSIZE_T
1033 yystrlen (const char *yystr)
1034 #else
1035 static YYSIZE_T
1036 yystrlen (yystr)
1037     const char *yystr;
1038 #endif
1039 {
1040   YYSIZE_T yylen;
1041   for (yylen = 0; yystr[yylen]; yylen++)
1042     continue;
1043   return yylen;
1044 }
1045 #  endif
1046 # endif
1047
1048 # ifndef yystpcpy
1049 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1050 #   define yystpcpy stpcpy
1051 #  else
1052 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1053    YYDEST.  */
1054 #if (defined __STDC__ || defined __C99__FUNC__ \
1055      || defined __cplusplus || defined _MSC_VER)
1056 static char *
1057 yystpcpy (char *yydest, const char *yysrc)
1058 #else
1059 static char *
1060 yystpcpy (yydest, yysrc)
1061     char *yydest;
1062     const char *yysrc;
1063 #endif
1064 {
1065   char *yyd = yydest;
1066   const char *yys = yysrc;
1067
1068   while ((*yyd++ = *yys++) != '\0')
1069     continue;
1070
1071   return yyd - 1;
1072 }
1073 #  endif
1074 # endif
1075
1076 # ifndef yytnamerr
1077 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1078    quotes and backslashes, so that it's suitable for yyerror.  The
1079    heuristic is that double-quoting is unnecessary unless the string
1080    contains an apostrophe, a comma, or backslash (other than
1081    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1082    null, do not copy; instead, return the length of what the result
1083    would have been.  */
1084 static YYSIZE_T
1085 yytnamerr (char *yyres, const char *yystr)
1086 {
1087   if (*yystr == '"')
1088     {
1089       YYSIZE_T yyn = 0;
1090       char const *yyp = yystr;
1091
1092       for (;;)
1093         switch (*++yyp)
1094           {
1095           case '\'':
1096           case ',':
1097             goto do_not_strip_quotes;
1098
1099           case '\\':
1100             if (*++yyp != '\\')
1101               goto do_not_strip_quotes;
1102             /* Fall through.  */
1103           default:
1104             if (yyres)
1105               yyres[yyn] = *yyp;
1106             yyn++;
1107             break;
1108
1109           case '"':
1110             if (yyres)
1111               yyres[yyn] = '\0';
1112             return yyn;
1113           }
1114     do_not_strip_quotes: ;
1115     }
1116
1117   if (! yyres)
1118     return yystrlen (yystr);
1119
1120   return yystpcpy (yyres, yystr) - yyres;
1121 }
1122 # endif
1123
1124 /* Copy into YYRESULT an error message about the unexpected token
1125    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
1126    including the terminating null byte.  If YYRESULT is null, do not
1127    copy anything; just return the number of bytes that would be
1128    copied.  As a special case, return 0 if an ordinary "syntax error"
1129    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
1130    size calculation.  */
1131 static YYSIZE_T
1132 yysyntax_error (char *yyresult, int yystate, int yychar)
1133 {
1134   int yyn = yypact[yystate];
1135
1136   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1137     return 0;
1138   else
1139     {
1140       int yytype = YYTRANSLATE (yychar);
1141       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1142       YYSIZE_T yysize = yysize0;
1143       YYSIZE_T yysize1;
1144       int yysize_overflow = 0;
1145       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1146       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1147       int yyx;
1148
1149 # if 0
1150       /* This is so xgettext sees the translatable formats that are
1151          constructed on the fly.  */
1152       YY_("syntax error, unexpected %s");
1153       YY_("syntax error, unexpected %s, expecting %s");
1154       YY_("syntax error, unexpected %s, expecting %s or %s");
1155       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1156       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1157 # endif
1158       char *yyfmt;
1159       char const *yyf;
1160       static char const yyunexpected[] = "syntax error, unexpected %s";
1161       static char const yyexpecting[] = ", expecting %s";
1162       static char const yyor[] = " or %s";
1163       char yyformat[sizeof yyunexpected
1164                     + sizeof yyexpecting - 1
1165                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1166                        * (sizeof yyor - 1))];
1167       char const *yyprefix = yyexpecting;
1168
1169       /* Start YYX at -YYN if negative to avoid negative indexes in
1170          YYCHECK.  */
1171       int yyxbegin = yyn < 0 ? -yyn : 0;
1172
1173       /* Stay within bounds of both yycheck and yytname.  */
1174       int yychecklim = YYLAST - yyn + 1;
1175       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1176       int yycount = 1;
1177
1178       yyarg[0] = yytname[yytype];
1179       yyfmt = yystpcpy (yyformat, yyunexpected);
1180
1181       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1182         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1183           {
1184             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1185               {
1186                 yycount = 1;
1187                 yysize = yysize0;
1188                 yyformat[sizeof yyunexpected - 1] = '\0';
1189                 break;
1190               }
1191             yyarg[yycount++] = yytname[yyx];
1192             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1193             yysize_overflow |= (yysize1 < yysize);
1194             yysize = yysize1;
1195             yyfmt = yystpcpy (yyfmt, yyprefix);
1196             yyprefix = yyor;
1197           }
1198
1199       yyf = YY_(yyformat);
1200       yysize1 = yysize + yystrlen (yyf);
1201       yysize_overflow |= (yysize1 < yysize);
1202       yysize = yysize1;
1203
1204       if (yysize_overflow)
1205         return YYSIZE_MAXIMUM;
1206
1207       if (yyresult)
1208         {
1209           /* Avoid sprintf, as that infringes on the user's name space.
1210              Don't have undefined behavior even if the translation
1211              produced a string with the wrong number of "%s"s.  */
1212           char *yyp = yyresult;
1213           int yyi = 0;
1214           while ((*yyp = *yyf) != '\0')
1215             {
1216               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1217                 {
1218                   yyp += yytnamerr (yyp, yyarg[yyi++]);
1219                   yyf += 2;
1220                 }
1221               else
1222                 {
1223                   yyp++;
1224                   yyf++;
1225                 }
1226             }
1227         }
1228       return yysize;
1229     }
1230 }
1231 #endif /* YYERROR_VERBOSE */
1232 \f
1233
1234 /*-----------------------------------------------.
1235 | Release the memory associated to this symbol.  |
1236 `-----------------------------------------------*/
1237
1238 /*ARGSUSED*/
1239 #if (defined __STDC__ || defined __C99__FUNC__ \
1240      || defined __cplusplus || defined _MSC_VER)
1241 static void
1242 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1243 #else
1244 static void
1245 yydestruct (yymsg, yytype, yyvaluep)
1246     const char *yymsg;
1247     int yytype;
1248     YYSTYPE *yyvaluep;
1249 #endif
1250 {
1251   YYUSE (yyvaluep);
1252
1253   if (!yymsg)
1254     yymsg = "Deleting";
1255   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1256
1257   switch (yytype)
1258     {
1259
1260       default:
1261         break;
1262     }
1263 }
1264
1265 /* Prevent warnings from -Wmissing-prototypes.  */
1266 #ifdef YYPARSE_PARAM
1267 #if defined __STDC__ || defined __cplusplus
1268 int yyparse (void *YYPARSE_PARAM);
1269 #else
1270 int yyparse ();
1271 #endif
1272 #else /* ! YYPARSE_PARAM */
1273 #if defined __STDC__ || defined __cplusplus
1274 int yyparse (void);
1275 #else
1276 int yyparse ();
1277 #endif
1278 #endif /* ! YYPARSE_PARAM */
1279
1280
1281 /* The lookahead symbol.  */
1282 int yychar;
1283
1284 /* The semantic value of the lookahead symbol.  */
1285 YYSTYPE yylval;
1286
1287 /* Number of syntax errors so far.  */
1288 int yynerrs;
1289
1290
1291
1292 /*-------------------------.
1293 | yyparse or yypush_parse.  |
1294 `-------------------------*/
1295
1296 #ifdef YYPARSE_PARAM
1297 #if (defined __STDC__ || defined __C99__FUNC__ \
1298      || defined __cplusplus || defined _MSC_VER)
1299 int
1300 yyparse (void *YYPARSE_PARAM)
1301 #else
1302 int
1303 yyparse (YYPARSE_PARAM)
1304     void *YYPARSE_PARAM;
1305 #endif
1306 #else /* ! YYPARSE_PARAM */
1307 #if (defined __STDC__ || defined __C99__FUNC__ \
1308      || defined __cplusplus || defined _MSC_VER)
1309 int
1310 yyparse (void)
1311 #else
1312 int
1313 yyparse ()
1314
1315 #endif
1316 #endif
1317 {
1318
1319
1320     int yystate;
1321     /* Number of tokens to shift before error messages enabled.  */
1322     int yyerrstatus;
1323
1324     /* The stacks and their tools:
1325        `yyss': related to states.
1326        `yyvs': related to semantic values.
1327
1328        Refer to the stacks thru separate pointers, to allow yyoverflow
1329        to reallocate them elsewhere.  */
1330
1331     /* The state stack.  */
1332     yytype_int16 yyssa[YYINITDEPTH];
1333     yytype_int16 *yyss;
1334     yytype_int16 *yyssp;
1335
1336     /* The semantic value stack.  */
1337     YYSTYPE yyvsa[YYINITDEPTH];
1338     YYSTYPE *yyvs;
1339     YYSTYPE *yyvsp;
1340
1341     YYSIZE_T yystacksize;
1342
1343   int yyn;
1344   int yyresult;
1345   /* Lookahead token as an internal (translated) token number.  */
1346   int yytoken;
1347   /* The variables used to return semantic value and location from the
1348      action routines.  */
1349   YYSTYPE yyval;
1350
1351 #if YYERROR_VERBOSE
1352   /* Buffer for error messages, and its allocated size.  */
1353   char yymsgbuf[128];
1354   char *yymsg = yymsgbuf;
1355   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1356 #endif
1357
1358 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1359
1360   /* The number of symbols on the RHS of the reduced rule.
1361      Keep to zero when no symbol should be popped.  */
1362   int yylen = 0;
1363
1364   yytoken = 0;
1365   yyss = yyssa;
1366   yyvs = yyvsa;
1367   yystacksize = YYINITDEPTH;
1368
1369   YYDPRINTF ((stderr, "Starting parse\n"));
1370
1371   yystate = 0;
1372   yyerrstatus = 0;
1373   yynerrs = 0;
1374   yychar = YYEMPTY; /* Cause a token to be read.  */
1375
1376   /* Initialize stack pointers.
1377      Waste one element of value and location stack
1378      so that they stay on the same level as the state stack.
1379      The wasted elements are never initialized.  */
1380   yyssp = yyss;
1381   yyvsp = yyvs;
1382
1383   goto yysetstate;
1384
1385 /*------------------------------------------------------------.
1386 | yynewstate -- Push a new state, which is found in yystate.  |
1387 `------------------------------------------------------------*/
1388  yynewstate:
1389   /* In all cases, when you get here, the value and location stacks
1390      have just been pushed.  So pushing a state here evens the stacks.  */
1391   yyssp++;
1392
1393  yysetstate:
1394   *yyssp = yystate;
1395
1396   if (yyss + yystacksize - 1 <= yyssp)
1397     {
1398       /* Get the current used size of the three stacks, in elements.  */
1399       YYSIZE_T yysize = yyssp - yyss + 1;
1400
1401 #ifdef yyoverflow
1402       {
1403         /* Give user a chance to reallocate the stack.  Use copies of
1404            these so that the &'s don't force the real ones into
1405            memory.  */
1406         YYSTYPE *yyvs1 = yyvs;
1407         yytype_int16 *yyss1 = yyss;
1408
1409         /* Each stack pointer address is followed by the size of the
1410            data in use in that stack, in bytes.  This used to be a
1411            conditional around just the two extra args, but that might
1412            be undefined if yyoverflow is a macro.  */
1413         yyoverflow (YY_("memory exhausted"),
1414                     &yyss1, yysize * sizeof (*yyssp),
1415                     &yyvs1, yysize * sizeof (*yyvsp),
1416                     &yystacksize);
1417
1418         yyss = yyss1;
1419         yyvs = yyvs1;
1420       }
1421 #else /* no yyoverflow */
1422 # ifndef YYSTACK_RELOCATE
1423       goto yyexhaustedlab;
1424 # else
1425       /* Extend the stack our own way.  */
1426       if (YYMAXDEPTH <= yystacksize)
1427         goto yyexhaustedlab;
1428       yystacksize *= 2;
1429       if (YYMAXDEPTH < yystacksize)
1430         yystacksize = YYMAXDEPTH;
1431
1432       {
1433         yytype_int16 *yyss1 = yyss;
1434         union yyalloc *yyptr =
1435           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1436         if (! yyptr)
1437           goto yyexhaustedlab;
1438         YYSTACK_RELOCATE (yyss_alloc, yyss);
1439         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1440 #  undef YYSTACK_RELOCATE
1441         if (yyss1 != yyssa)
1442           YYSTACK_FREE (yyss1);
1443       }
1444 # endif
1445 #endif /* no yyoverflow */
1446
1447       yyssp = yyss + yysize - 1;
1448       yyvsp = yyvs + yysize - 1;
1449
1450       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1451                   (unsigned long int) yystacksize));
1452
1453       if (yyss + yystacksize - 1 <= yyssp)
1454         YYABORT;
1455     }
1456
1457   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1458
1459   if (yystate == YYFINAL)
1460     YYACCEPT;
1461
1462   goto yybackup;
1463
1464 /*-----------.
1465 | yybackup.  |
1466 `-----------*/
1467 yybackup:
1468
1469   /* Do appropriate processing given the current state.  Read a
1470      lookahead token if we need one and don't already have one.  */
1471
1472   /* First try to decide what to do without reference to lookahead token.  */
1473   yyn = yypact[yystate];
1474   if (yyn == YYPACT_NINF)
1475     goto yydefault;
1476
1477   /* Not known => get a lookahead token if don't already have one.  */
1478
1479   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1480   if (yychar == YYEMPTY)
1481     {
1482       YYDPRINTF ((stderr, "Reading a token: "));
1483       yychar = YYLEX;
1484     }
1485
1486   if (yychar <= YYEOF)
1487     {
1488       yychar = yytoken = YYEOF;
1489       YYDPRINTF ((stderr, "Now at end of input.\n"));
1490     }
1491   else
1492     {
1493       yytoken = YYTRANSLATE (yychar);
1494       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1495     }
1496
1497   /* If the proper action on seeing token YYTOKEN is to reduce or to
1498      detect an error, take that action.  */
1499   yyn += yytoken;
1500   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1501     goto yydefault;
1502   yyn = yytable[yyn];
1503   if (yyn <= 0)
1504     {
1505       if (yyn == 0 || yyn == YYTABLE_NINF)
1506         goto yyerrlab;
1507       yyn = -yyn;
1508       goto yyreduce;
1509     }
1510
1511   /* Count tokens shifted since error; after three, turn off error
1512      status.  */
1513   if (yyerrstatus)
1514     yyerrstatus--;
1515
1516   /* Shift the lookahead token.  */
1517   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1518
1519   /* Discard the shifted token.  */
1520   yychar = YYEMPTY;
1521
1522   yystate = yyn;
1523   *++yyvsp = yylval;
1524
1525   goto yynewstate;
1526
1527
1528 /*-----------------------------------------------------------.
1529 | yydefault -- do the default action for the current state.  |
1530 `-----------------------------------------------------------*/
1531 yydefault:
1532   yyn = yydefact[yystate];
1533   if (yyn == 0)
1534     goto yyerrlab;
1535   goto yyreduce;
1536
1537
1538 /*-----------------------------.
1539 | yyreduce -- Do a reduction.  |
1540 `-----------------------------*/
1541 yyreduce:
1542   /* yyn is the number of a rule to reduce with.  */
1543   yylen = yyr2[yyn];
1544
1545   /* If YYLEN is nonzero, implement the default value of the action:
1546      `$$ = $1'.
1547
1548      Otherwise, the following line sets YYVAL to garbage.
1549      This behavior is undocumented and Bison
1550      users should not rely upon it.  Assigning to YYVAL
1551      unconditionally makes the parser a bit smaller, and it avoids a
1552      GCC warning that YYVAL may be used uninitialized.  */
1553   yyval = yyvsp[1-yylen];
1554
1555
1556   YY_REDUCE_PRINT (yyn);
1557   switch (yyn)
1558     {
1559         case 56:
1560
1561 /* Line 1455 of yacc.c  */
1562 #line 148 "dateyacc.y"
1563     { yyans.hour   = (yyvsp[(1) - (1)].IntVal) / 100;
1564           yyans.minute = (yyvsp[(1) - (1)].IntVal) % 100;
1565           yyans.second = -1;            /* unspecified */
1566         ;}
1567     break;
1568
1569   case 61:
1570
1571 /* Line 1455 of yacc.c  */
1572 #line 157 "dateyacc.y"
1573     { extern char *yyinbuf;
1574           if (yyans.error == NULL) yyans.error = yyinbuf;
1575         ;}
1576     break;
1577
1578   case 62:
1579
1580 /* Line 1455 of yacc.c  */
1581 #line 164 "dateyacc.y"
1582     { yyans.c_weekday = (yyvsp[(1) - (1)].IntVal); ;}
1583     break;
1584
1585   case 63:
1586
1587 /* Line 1455 of yacc.c  */
1588 #line 166 "dateyacc.y"
1589     { yyans.c_weekday = (yyvsp[(1) - (2)].IntVal); ;}
1590     break;
1591
1592   case 66:
1593
1594 /* Line 1455 of yacc.c  */
1595 #line 173 "dateyacc.y"
1596     { yyans.day = (yyvsp[(1) - (5)].IntVal); yyans.month = (yyvsp[(3) - (5)].IntVal); ;}
1597     break;
1598
1599   case 70:
1600
1601 /* Line 1455 of yacc.c  */
1602 #line 181 "dateyacc.y"
1603     { yyans.day = (yyvsp[(5) - (5)].IntVal); yyans.month = (yyvsp[(3) - (5)].IntVal); ;}
1604     break;
1605
1606   case 73:
1607
1608 /* Line 1455 of yacc.c  */
1609 #line 188 "dateyacc.y"
1610     { yyans.year  = ((yyvsp[(1) - (1)].IntVal) / 10000) + 1900; /* ajs */
1611           yyans.month = ((yyvsp[(1) - (1)].IntVal) % 10000) / 100;      /* ajs */
1612           yyans.day   = ((yyvsp[(1) - (1)].IntVal) % 100);              /* ajs */
1613         ;}
1614     break;
1615
1616   case 74:
1617
1618 /* Line 1455 of yacc.c  */
1619 #line 194 "dateyacc.y"
1620     { yyans.year  = ((yyvsp[(1) - (1)].IntVal) / 10000);                /* ajs */
1621           yyans.month = ((yyvsp[(1) - (1)].IntVal) % 10000) / 100;      /* ajs */
1622           yyans.day   = ((yyvsp[(1) - (1)].IntVal) % 100);              /* ajs */
1623         ;}
1624     break;
1625
1626   case 75:
1627
1628 /* Line 1455 of yacc.c  */
1629 #line 202 "dateyacc.y"
1630     { yyans.day = (yyvsp[(1) - (2)].IntVal); ;}
1631     break;
1632
1633   case 76:
1634
1635 /* Line 1455 of yacc.c  */
1636 #line 204 "dateyacc.y"
1637     { yyans.day = (yyvsp[(2) - (2)].IntVal); ;}
1638     break;
1639
1640   case 77:
1641
1642 /* Line 1455 of yacc.c  */
1643 #line 206 "dateyacc.y"
1644     { yyans.month = (yyvsp[(1) - (2)].IntVal); yyans.day = (yyvsp[(2) - (2)].IntVal); ;}
1645     break;
1646
1647   case 78:
1648
1649 /* Line 1455 of yacc.c  */
1650 #line 211 "dateyacc.y"
1651     { yyans.day = (yyvsp[(1) - (3)].IntVal); ;}
1652     break;
1653
1654   case 79:
1655
1656 /* Line 1455 of yacc.c  */
1657 #line 213 "dateyacc.y"
1658     { yyans.day = (yyvsp[(3) - (3)].IntVal); ;}
1659     break;
1660
1661   case 80:
1662
1663 /* Line 1455 of yacc.c  */
1664 #line 218 "dateyacc.y"
1665     { yyans.day = (yyvsp[(1) - (3)].IntVal); ;}
1666     break;
1667
1668   case 81:
1669
1670 /* Line 1455 of yacc.c  */
1671 #line 220 "dateyacc.y"
1672     { yyans.day = (yyvsp[(3) - (3)].IntVal); ;}
1673     break;
1674
1675   case 82:
1676
1677 /* Line 1455 of yacc.c  */
1678 #line 222 "dateyacc.y"
1679     { yyans.month = (yyvsp[(1) - (3)].IntVal); yyans.day = (yyvsp[(3) - (3)].IntVal); ;}
1680     break;
1681
1682   case 83:
1683
1684 /* Line 1455 of yacc.c  */
1685 #line 227 "dateyacc.y"
1686     { yyans.year = 2000 + (yyvsp[(1) - (1)].IntVal); ;}
1687     break;
1688
1689   case 84:
1690
1691 /* Line 1455 of yacc.c  */
1692 #line 229 "dateyacc.y"
1693     { yyans.year = 2000 + (yyvsp[(1) - (1)].IntVal); ;}
1694     break;
1695
1696   case 85:
1697
1698 /* Line 1455 of yacc.c  */
1699 #line 231 "dateyacc.y"
1700     { yyans.year = 1900 + (yyvsp[(1) - (1)].IntVal); ;}
1701     break;
1702
1703   case 86:
1704
1705 /* Line 1455 of yacc.c  */
1706 #line 233 "dateyacc.y"
1707     { yyans.year = (yyvsp[(1) - (1)].IntVal); ;}
1708     break;
1709
1710   case 87:
1711
1712 /* Line 1455 of yacc.c  */
1713 #line 235 "dateyacc.y"
1714     { yyans.year = (yyvsp[(1) - (1)].IntVal); ;}
1715     break;
1716
1717   case 88:
1718
1719 /* Line 1455 of yacc.c  */
1720 #line 240 "dateyacc.y"
1721     { yyans.month = (yyvsp[(1) - (1)].IntVal); ;}
1722     break;
1723
1724   case 89:
1725
1726 /* Line 1455 of yacc.c  */
1727 #line 242 "dateyacc.y"
1728     { yyans.month = (yyvsp[(1) - (2)].IntVal); ;}
1729     break;
1730
1731   case 94:
1732
1733 /* Line 1455 of yacc.c  */
1734 #line 254 "dateyacc.y"
1735     { yyans.hour   = (yyvsp[(1) - (1)].IntVal) / 100;
1736           yyans.minute = (yyvsp[(1) - (1)].IntVal) % 100;
1737           yyans.second = -1;            /* unspecified */
1738         ;}
1739     break;
1740
1741   case 96:
1742
1743 /* Line 1455 of yacc.c  */
1744 #line 263 "dateyacc.y"
1745     { yyans.hour   = (yyvsp[(1) - (3)].IntVal);
1746           yyans.minute = (yyvsp[(3) - (3)].IntVal);
1747           yyans.second = -1;            /* unspecified */
1748         ;}
1749     break;
1750
1751   case 97:
1752
1753 /* Line 1455 of yacc.c  */
1754 #line 268 "dateyacc.y"
1755     { yyans.hour   = (yyvsp[(1) - (3)].IntVal);
1756           yyans.minute = (yyvsp[(3) - (3)].IntVal);
1757           yyans.second = -1;            /* unspecified */
1758         ;}
1759     break;
1760
1761   case 98:
1762
1763 /* Line 1455 of yacc.c  */
1764 #line 273 "dateyacc.y"
1765     { yyans.hour   = (yyvsp[(1) - (5)].IntVal);
1766           yyans.minute = (yyvsp[(3) - (5)].IntVal);
1767           yyans.second = (yyvsp[(5) - (5)].IntVal);
1768         ;}
1769     break;
1770
1771   case 99:
1772
1773 /* Line 1455 of yacc.c  */
1774 #line 278 "dateyacc.y"
1775     { yyans.hour   = (yyvsp[(1) - (5)].IntVal);
1776           yyans.minute = (yyvsp[(3) - (5)].IntVal);
1777           yyans.second = (yyvsp[(5) - (5)].IntVal);
1778         ;}
1779     break;
1780
1781   case 100:
1782
1783 /* Line 1455 of yacc.c  */
1784 #line 283 "dateyacc.y"
1785     { yyans.hour   = (yyvsp[(1) - (3)].IntVal);
1786           yyans.minute = (yyvsp[(3) - (3)].IntVal);
1787           yyans.second = -1;            /* unspecified */
1788         ;}
1789     break;
1790
1791   case 101:
1792
1793 /* Line 1455 of yacc.c  */
1794 #line 288 "dateyacc.y"
1795     { yyans.hour   = (yyvsp[(1) - (3)].IntVal);
1796           yyans.minute = (yyvsp[(3) - (3)].IntVal);
1797           yyans.second = -1;            /* unspecified */
1798         ;}
1799     break;
1800
1801   case 102:
1802
1803 /* Line 1455 of yacc.c  */
1804 #line 293 "dateyacc.y"
1805     { yyans.hour   = (yyvsp[(1) - (5)].IntVal);
1806           yyans.minute = (yyvsp[(3) - (5)].IntVal);
1807           yyans.second = (yyvsp[(5) - (5)].IntVal);
1808         ;}
1809     break;
1810
1811   case 103:
1812
1813 /* Line 1455 of yacc.c  */
1814 #line 298 "dateyacc.y"
1815     { yyans.hour   = (yyvsp[(1) - (5)].IntVal);
1816           yyans.minute = (yyvsp[(3) - (5)].IntVal);
1817           yyans.second = (yyvsp[(5) - (5)].IntVal);
1818         ;}
1819     break;
1820
1821   case 104:
1822
1823 /* Line 1455 of yacc.c  */
1824 #line 303 "dateyacc.y"
1825     { yyans.hour   = (yyvsp[(1) - (3)].IntVal) / 100;
1826           yyans.minute = (yyvsp[(1) - (3)].IntVal) % 100;
1827           yyans.second = (yyvsp[(3) - (3)].IntVal);
1828         ;}
1829     break;
1830
1831   case 105:
1832
1833 /* Line 1455 of yacc.c  */
1834 #line 308 "dateyacc.y"
1835     { yyans.hour   = (yyvsp[(1) - (3)].IntVal) / 100;
1836           yyans.minute = (yyvsp[(1) - (3)].IntVal) % 100;
1837           yyans.second = (yyvsp[(3) - (3)].IntVal);
1838         ;}
1839     break;
1840
1841   case 106:
1842
1843 /* Line 1455 of yacc.c  */
1844 #line 313 "dateyacc.y"
1845     { yyans.hour   = (yyvsp[(1) - (1)].IntVal) / 10000;
1846           yyans.minute = ((yyvsp[(1) - (1)].IntVal) % 10000) / 100;
1847           yyans.second = (yyvsp[(1) - (1)].IntVal) % 100;
1848         ;}
1849     break;
1850
1851   case 107:
1852
1853 /* Line 1455 of yacc.c  */
1854 #line 321 "dateyacc.y"
1855     { if (yyans.hour < 1 || yyans.hour > 12)
1856             yyans.hour = -1;            /* invalid */
1857           else
1858           { if (yyans.hour == 12) yyans.hour = 0;
1859             yyans.hour += (yyvsp[(1) - (1)].IntVal);            /* 0 for AM, 12 for PM */
1860         } ;}
1861     break;
1862
1863   case 108:
1864
1865 /* Line 1455 of yacc.c  */
1866 #line 331 "dateyacc.y"
1867     { yyans.zone = (yyvsp[(1) - (1)].IntVal); yyans.dst = 0; ;}
1868     break;
1869
1870   case 109:
1871
1872 /* Line 1455 of yacc.c  */
1873 #line 333 "dateyacc.y"
1874     { yyans.zone = (yyvsp[(1) - (2)].IntVal) + 60; yyans.dst = 1; ;}
1875     break;
1876
1877   case 110:
1878
1879 /* Line 1455 of yacc.c  */
1880 #line 335 "dateyacc.y"
1881     { yyans.zone = (yyvsp[(2) - (2)].IntVal); yyans.dst = 0; ;}
1882     break;
1883
1884   case 111:
1885
1886 /* Line 1455 of yacc.c  */
1887 #line 337 "dateyacc.y"
1888     { yyans.zone = (yyvsp[(2) - (3)].IntVal) + 60; yyans.dst = 1; ;}
1889     break;
1890
1891   case 112:
1892
1893 /* Line 1455 of yacc.c  */
1894 #line 339 "dateyacc.y"
1895     { yyans.zone = (yyvsp[(1) - (1)].IntVal); yyans.dst = 1; ;}
1896     break;
1897
1898   case 113:
1899
1900 /* Line 1455 of yacc.c  */
1901 #line 341 "dateyacc.y"
1902     { yyans.zone = (yyvsp[(2) - (2)].IntVal); yyans.dst = 1; ;}
1903     break;
1904
1905   case 114:
1906
1907 /* Line 1455 of yacc.c  */
1908 #line 343 "dateyacc.y"
1909     { yyans.zone = (yyvsp[(2) - (2)].IntVal); yyans.dst = 0; ;}
1910     break;
1911
1912   case 115:
1913
1914 /* Line 1455 of yacc.c  */
1915 #line 345 "dateyacc.y"
1916     { yyans.zone = (yyvsp[(3) - (3)].IntVal); yyans.dst = 0; ;}
1917     break;
1918
1919   case 116:
1920
1921 /* Line 1455 of yacc.c  */
1922 #line 347 "dateyacc.y"
1923     { yyans.zone = - (yyvsp[(2) - (2)].IntVal); yyans.dst = 0; ;}
1924     break;
1925
1926   case 117:
1927
1928 /* Line 1455 of yacc.c  */
1929 #line 349 "dateyacc.y"
1930     { yyans.zone = - (yyvsp[(3) - (3)].IntVal); yyans.dst = 0; ;}
1931     break;
1932
1933   case 118:
1934
1935 /* Line 1455 of yacc.c  */
1936 #line 354 "dateyacc.y"
1937     { (yyval.IntVal) = 60 * (yyvsp[(1) - (1)].IntVal); ;}
1938     break;
1939
1940   case 119:
1941
1942 /* Line 1455 of yacc.c  */
1943 #line 356 "dateyacc.y"
1944     { (yyval.IntVal) = 60 * (yyvsp[(1) - (3)].IntVal) + (yyvsp[(3) - (3)].IntVal); ;}
1945     break;
1946
1947   case 120:
1948
1949 /* Line 1455 of yacc.c  */
1950 #line 358 "dateyacc.y"
1951     { (yyval.IntVal) = 60 * (yyvsp[(1) - (3)].IntVal) + (yyvsp[(3) - (3)].IntVal); ;}
1952     break;
1953
1954   case 121:
1955
1956 /* Line 1455 of yacc.c  */
1957 #line 360 "dateyacc.y"
1958     { (yyval.IntVal) = 60 * (yyvsp[(1) - (1)].IntVal); ;}
1959     break;
1960
1961   case 122:
1962
1963 /* Line 1455 of yacc.c  */
1964 #line 362 "dateyacc.y"
1965     { (yyval.IntVal) = 60 * (yyvsp[(1) - (3)].IntVal) + (yyvsp[(3) - (3)].IntVal); ;}
1966     break;
1967
1968   case 123:
1969
1970 /* Line 1455 of yacc.c  */
1971 #line 364 "dateyacc.y"
1972     { (yyval.IntVal) = 60 * (yyvsp[(1) - (3)].IntVal) + (yyvsp[(3) - (3)].IntVal); ;}
1973     break;
1974
1975   case 124:
1976
1977 /* Line 1455 of yacc.c  */
1978 #line 366 "dateyacc.y"
1979     { (yyval.IntVal) = 60 * ((yyvsp[(1) - (1)].IntVal) / 100) | ((yyvsp[(1) - (1)].IntVal) % 100); ;}
1980     break;
1981
1982   case 125:
1983
1984 /* Line 1455 of yacc.c  */
1985 #line 371 "dateyacc.y"
1986     { yyans.hour   = (yyvsp[(1) - (1)].IntVal) / 100;   /* ajs */
1987           yyans.minute = (yyvsp[(1) - (1)].IntVal) % 100;       /* ajs */
1988           yyans.second = -1;            /* ajs */
1989         ;}
1990     break;
1991
1992
1993
1994 /* Line 1455 of yacc.c  */
1995 #line 1996 "dateyacc.c"
1996       default: break;
1997     }
1998   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1999
2000   YYPOPSTACK (yylen);
2001   yylen = 0;
2002   YY_STACK_PRINT (yyss, yyssp);
2003
2004   *++yyvsp = yyval;
2005
2006   /* Now `shift' the result of the reduction.  Determine what state
2007      that goes to, based on the state we popped back to and the rule
2008      number reduced by.  */
2009
2010   yyn = yyr1[yyn];
2011
2012   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2013   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2014     yystate = yytable[yystate];
2015   else
2016     yystate = yydefgoto[yyn - YYNTOKENS];
2017
2018   goto yynewstate;
2019
2020
2021 /*------------------------------------.
2022 | yyerrlab -- here on detecting error |
2023 `------------------------------------*/
2024 yyerrlab:
2025   /* If not already recovering from an error, report this error.  */
2026   if (!yyerrstatus)
2027     {
2028       ++yynerrs;
2029 #if ! YYERROR_VERBOSE
2030       yyerror (YY_("syntax error"));
2031 #else
2032       {
2033         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2034         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2035           {
2036             YYSIZE_T yyalloc = 2 * yysize;
2037             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2038               yyalloc = YYSTACK_ALLOC_MAXIMUM;
2039             if (yymsg != yymsgbuf)
2040               YYSTACK_FREE (yymsg);
2041             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2042             if (yymsg)
2043               yymsg_alloc = yyalloc;
2044             else
2045               {
2046                 yymsg = yymsgbuf;
2047                 yymsg_alloc = sizeof yymsgbuf;
2048               }
2049           }
2050
2051         if (0 < yysize && yysize <= yymsg_alloc)
2052           {
2053             (void) yysyntax_error (yymsg, yystate, yychar);
2054             yyerror (yymsg);
2055           }
2056         else
2057           {
2058             yyerror (YY_("syntax error"));
2059             if (yysize != 0)
2060               goto yyexhaustedlab;
2061           }
2062       }
2063 #endif
2064     }
2065
2066
2067
2068   if (yyerrstatus == 3)
2069     {
2070       /* If just tried and failed to reuse lookahead token after an
2071          error, discard it.  */
2072
2073       if (yychar <= YYEOF)
2074         {
2075           /* Return failure if at end of input.  */
2076           if (yychar == YYEOF)
2077             YYABORT;
2078         }
2079       else
2080         {
2081           yydestruct ("Error: discarding",
2082                       yytoken, &yylval);
2083           yychar = YYEMPTY;
2084         }
2085     }
2086
2087   /* Else will try to reuse lookahead token after shifting the error
2088      token.  */
2089   goto yyerrlab1;
2090
2091
2092 /*---------------------------------------------------.
2093 | yyerrorlab -- error raised explicitly by YYERROR.  |
2094 `---------------------------------------------------*/
2095 yyerrorlab:
2096
2097   /* Pacify compilers like GCC when the user code never invokes
2098      YYERROR and the label yyerrorlab therefore never appears in user
2099      code.  */
2100   if (/*CONSTCOND*/ 0)
2101      goto yyerrorlab;
2102
2103   /* Do not reclaim the symbols of the rule which action triggered
2104      this YYERROR.  */
2105   YYPOPSTACK (yylen);
2106   yylen = 0;
2107   YY_STACK_PRINT (yyss, yyssp);
2108   yystate = *yyssp;
2109   goto yyerrlab1;
2110
2111
2112 /*-------------------------------------------------------------.
2113 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
2114 `-------------------------------------------------------------*/
2115 yyerrlab1:
2116   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
2117
2118   for (;;)
2119     {
2120       yyn = yypact[yystate];
2121       if (yyn != YYPACT_NINF)
2122         {
2123           yyn += YYTERROR;
2124           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2125             {
2126               yyn = yytable[yyn];
2127               if (0 < yyn)
2128                 break;
2129             }
2130         }
2131
2132       /* Pop the current state because it cannot handle the error token.  */
2133       if (yyssp == yyss)
2134         YYABORT;
2135
2136
2137       yydestruct ("Error: popping",
2138                   yystos[yystate], yyvsp);
2139       YYPOPSTACK (1);
2140       yystate = *yyssp;
2141       YY_STACK_PRINT (yyss, yyssp);
2142     }
2143
2144   *++yyvsp = yylval;
2145
2146
2147   /* Shift the error token.  */
2148   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2149
2150   yystate = yyn;
2151   goto yynewstate;
2152
2153
2154 /*-------------------------------------.
2155 | yyacceptlab -- YYACCEPT comes here.  |
2156 `-------------------------------------*/
2157 yyacceptlab:
2158   yyresult = 0;
2159   goto yyreturn;
2160
2161 /*-----------------------------------.
2162 | yyabortlab -- YYABORT comes here.  |
2163 `-----------------------------------*/
2164 yyabortlab:
2165   yyresult = 1;
2166   goto yyreturn;
2167
2168 #if !defined(yyoverflow) || YYERROR_VERBOSE
2169 /*-------------------------------------------------.
2170 | yyexhaustedlab -- memory exhaustion comes here.  |
2171 `-------------------------------------------------*/
2172 yyexhaustedlab:
2173   yyerror (YY_("memory exhausted"));
2174   yyresult = 2;
2175   /* Fall through.  */
2176 #endif
2177
2178 yyreturn:
2179   if (yychar != YYEMPTY)
2180      yydestruct ("Cleanup: discarding lookahead",
2181                  yytoken, &yylval);
2182   /* Do not reclaim the symbols of the rule which action triggered
2183      this YYABORT or YYACCEPT.  */
2184   YYPOPSTACK (yylen);
2185   YY_STACK_PRINT (yyss, yyssp);
2186   while (yyssp != yyss)
2187     {
2188       yydestruct ("Cleanup: popping",
2189                   yystos[*yyssp], yyvsp);
2190       YYPOPSTACK (1);
2191     }
2192 #ifndef yyoverflow
2193   if (yyss != yyssa)
2194     YYSTACK_FREE (yyss);
2195 #endif
2196 #if YYERROR_VERBOSE
2197   if (yymsg != yymsgbuf)
2198     YYSTACK_FREE (yymsg);
2199 #endif
2200   /* Make sure YYID is used.  */
2201   return YYID (yyresult);
2202 }
2203
2204
2205
2206 /* Line 1675 of yacc.c  */
2207 #line 377 "dateyacc.y"
2208
2209