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