Initial packaging for Tizen
[profile/ivi/gobject-introspection.git] / scannerparser.c
1 /* A Bison parser, made by GNU Bison 2.5.  */
2
3 /* Bison implementation for Yacc-like parsers in C
4    
5       Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
6    
7    This program is free software: you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation, either version 3 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19
20 /* As a special exception, you may create a larger work that contains
21    part or all of the Bison parser skeleton and distribute that work
22    under terms of your choice, so long as that work isn't itself a
23    parser generator using the skeleton or a modified version thereof
24    as a parser skeleton.  Alternatively, if you modify or redistribute
25    the parser skeleton itself, you may (at your option) remove this
26    special exception, which will cause the skeleton and the resulting
27    Bison output files to be licensed under the GNU General Public
28    License without this special exception.
29    
30    This special exception was added by the Free Software Foundation in
31    version 2.2 of Bison.  */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34    simplifying the original so-called "semantic" parser.  */
35
36 /* All symbols defined below should begin with yy or YY, to avoid
37    infringing on user name space.  This should be done even for local
38    variables, as they might otherwise be expanded by user macros.
39    There are some unavoidable exceptions within include files to
40    define necessary library symbols; they are noted "INFRINGES ON
41    USER NAME SPACE" below.  */
42
43 /* Identify Bison output.  */
44 #define YYBISON 1
45
46 /* Bison version.  */
47 #define YYBISON_VERSION "2.5"
48
49 /* Skeleton name.  */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers.  */
53 #define YYPURE 0
54
55 /* Push parsers.  */
56 #define YYPUSH 0
57
58 /* Pull parsers.  */
59 #define YYPULL 1
60
61 /* Using locations.  */
62 #define YYLSP_NEEDED 0
63
64
65
66 /* Copy the first part of user declarations.  */
67
68 /* Line 268 of yacc.c  */
69 #line 29 "scannerparser.y"
70
71 #include <stdio.h>
72 #include <stdlib.h>
73 #include <string.h>
74 #include <errno.h>
75 #include <glib.h>
76 #include <glib/gstdio.h>
77 #include "sourcescanner.h"
78 #include "scannerparser.h"
79
80 extern FILE *yyin;
81 extern int lineno;
82 extern char linebuf[2000];
83 extern char *yytext;
84
85 extern int yylex (GISourceScanner *scanner);
86 static void yyerror (GISourceScanner *scanner, const char *str);
87
88 extern void ctype_free (GISourceType * type);
89
90 static int last_enum_value = -1;
91 static gboolean is_bitfield;
92 static GHashTable *const_table = NULL;
93
94 /**
95  * parse_c_string_literal:
96  * @str: A string containing a C string literal
97  *
98  * Based on g_strcompress(), but also handles
99  * hexadecimal escapes.
100  */
101 static char *
102 parse_c_string_literal (const char *str)
103 {
104   const gchar *p = str, *num;
105   gchar *dest = g_malloc (strlen (str) + 1);
106   gchar *q = dest;
107
108   while (*p)
109     {
110       if (*p == '\\')
111         {
112           p++;
113           switch (*p)
114             {
115             case '\0':
116               g_warning ("parse_c_string_literal: trailing \\");
117               goto out;
118             case '0':  case '1':  case '2':  case '3':  case '4':
119             case '5':  case '6':  case '7':
120               *q = 0;
121               num = p;
122               while ((p < num + 3) && (*p >= '0') && (*p <= '7'))
123                 {
124                   *q = (*q * 8) + (*p - '0');
125                   p++;
126                 }
127               q++;
128               p--;
129               break;
130             case 'x':
131               *q = 0;
132               p++;
133               num = p;
134               while ((p < num + 2) && (g_ascii_isxdigit(*p)))
135                 {
136                   *q = (*q * 16) + g_ascii_xdigit_value(*p);
137                   p++;
138                 }
139               q++;
140               p--;
141               break;
142             case 'b':
143               *q++ = '\b';
144               break;
145             case 'f':
146               *q++ = '\f';
147               break;
148             case 'n':
149               *q++ = '\n';
150               break;
151             case 'r':
152               *q++ = '\r';
153               break;
154             case 't':
155               *q++ = '\t';
156               break;
157             default:            /* Also handles \" and \\ */
158               *q++ = *p;
159               break;
160             }
161         }
162       else
163         *q++ = *p;
164       p++;
165     }
166 out:
167   *q = 0;
168
169   return dest;
170 }
171
172
173
174 /* Line 268 of yacc.c  */
175 #line 176 "scannerparser.c"
176
177 /* Enabling traces.  */
178 #ifndef YYDEBUG
179 # define YYDEBUG 1
180 #endif
181
182 /* Enabling verbose error messages.  */
183 #ifdef YYERROR_VERBOSE
184 # undef YYERROR_VERBOSE
185 # define YYERROR_VERBOSE 1
186 #else
187 # define YYERROR_VERBOSE 1
188 #endif
189
190 /* Enabling the token table.  */
191 #ifndef YYTOKEN_TABLE
192 # define YYTOKEN_TABLE 0
193 #endif
194
195
196 /* Tokens.  */
197 #ifndef YYTOKENTYPE
198 # define YYTOKENTYPE
199    /* Put the tokens into the symbol table, so that GDB and other debuggers
200       know about them.  */
201    enum yytokentype {
202      IDENTIFIER = 258,
203      TYPEDEF_NAME = 259,
204      INTEGER = 260,
205      FLOATING = 261,
206      CHARACTER = 262,
207      STRING = 263,
208      ELLIPSIS = 264,
209      ADDEQ = 265,
210      SUBEQ = 266,
211      MULEQ = 267,
212      DIVEQ = 268,
213      MODEQ = 269,
214      XOREQ = 270,
215      ANDEQ = 271,
216      OREQ = 272,
217      SL = 273,
218      SR = 274,
219      SLEQ = 275,
220      SREQ = 276,
221      EQ = 277,
222      NOTEQ = 278,
223      LTEQ = 279,
224      GTEQ = 280,
225      ANDAND = 281,
226      OROR = 282,
227      PLUSPLUS = 283,
228      MINUSMINUS = 284,
229      ARROW = 285,
230      AUTO = 286,
231      BOOL = 287,
232      BREAK = 288,
233      CASE = 289,
234      CHAR = 290,
235      CONST = 291,
236      CONTINUE = 292,
237      DEFAULT = 293,
238      DO = 294,
239      DOUBLE = 295,
240      ELSE = 296,
241      ENUM = 297,
242      EXTENSION = 298,
243      EXTERN = 299,
244      FLOAT = 300,
245      FOR = 301,
246      GOTO = 302,
247      IF = 303,
248      INLINE = 304,
249      INT = 305,
250      LONG = 306,
251      REGISTER = 307,
252      RESTRICT = 308,
253      RETURN = 309,
254      SHORT = 310,
255      SIGNED = 311,
256      SIZEOF = 312,
257      STATIC = 313,
258      STRUCT = 314,
259      SWITCH = 315,
260      TYPEDEF = 316,
261      UNION = 317,
262      UNSIGNED = 318,
263      VOID = 319,
264      VOLATILE = 320,
265      WHILE = 321,
266      FUNCTION_MACRO = 322,
267      OBJECT_MACRO = 323
268    };
269 #endif
270 /* Tokens.  */
271 #define IDENTIFIER 258
272 #define TYPEDEF_NAME 259
273 #define INTEGER 260
274 #define FLOATING 261
275 #define CHARACTER 262
276 #define STRING 263
277 #define ELLIPSIS 264
278 #define ADDEQ 265
279 #define SUBEQ 266
280 #define MULEQ 267
281 #define DIVEQ 268
282 #define MODEQ 269
283 #define XOREQ 270
284 #define ANDEQ 271
285 #define OREQ 272
286 #define SL 273
287 #define SR 274
288 #define SLEQ 275
289 #define SREQ 276
290 #define EQ 277
291 #define NOTEQ 278
292 #define LTEQ 279
293 #define GTEQ 280
294 #define ANDAND 281
295 #define OROR 282
296 #define PLUSPLUS 283
297 #define MINUSMINUS 284
298 #define ARROW 285
299 #define AUTO 286
300 #define BOOL 287
301 #define BREAK 288
302 #define CASE 289
303 #define CHAR 290
304 #define CONST 291
305 #define CONTINUE 292
306 #define DEFAULT 293
307 #define DO 294
308 #define DOUBLE 295
309 #define ELSE 296
310 #define ENUM 297
311 #define EXTENSION 298
312 #define EXTERN 299
313 #define FLOAT 300
314 #define FOR 301
315 #define GOTO 302
316 #define IF 303
317 #define INLINE 304
318 #define INT 305
319 #define LONG 306
320 #define REGISTER 307
321 #define RESTRICT 308
322 #define RETURN 309
323 #define SHORT 310
324 #define SIGNED 311
325 #define SIZEOF 312
326 #define STATIC 313
327 #define STRUCT 314
328 #define SWITCH 315
329 #define TYPEDEF 316
330 #define UNION 317
331 #define UNSIGNED 318
332 #define VOID 319
333 #define VOLATILE 320
334 #define WHILE 321
335 #define FUNCTION_MACRO 322
336 #define OBJECT_MACRO 323
337
338
339
340
341 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
342 typedef union YYSTYPE
343 {
344
345 /* Line 293 of yacc.c  */
346 #line 134 "scannerparser.y"
347
348   char *str;
349   GList *list;
350   GISourceSymbol *symbol;
351   GISourceType *ctype;
352   StorageClassSpecifier storage_class_specifier;
353   TypeQualifier type_qualifier;
354   FunctionSpecifier function_specifier;
355   UnaryOperator unary_operator;
356
357
358
359 /* Line 293 of yacc.c  */
360 #line 361 "scannerparser.c"
361 } YYSTYPE;
362 # define YYSTYPE_IS_TRIVIAL 1
363 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
364 # define YYSTYPE_IS_DECLARED 1
365 #endif
366
367
368 /* Copy the second part of user declarations.  */
369
370
371 /* Line 343 of yacc.c  */
372 #line 373 "scannerparser.c"
373
374 #ifdef short
375 # undef short
376 #endif
377
378 #ifdef YYTYPE_UINT8
379 typedef YYTYPE_UINT8 yytype_uint8;
380 #else
381 typedef unsigned char yytype_uint8;
382 #endif
383
384 #ifdef YYTYPE_INT8
385 typedef YYTYPE_INT8 yytype_int8;
386 #elif (defined __STDC__ || defined __C99__FUNC__ \
387      || defined __cplusplus || defined _MSC_VER)
388 typedef signed char yytype_int8;
389 #else
390 typedef short int yytype_int8;
391 #endif
392
393 #ifdef YYTYPE_UINT16
394 typedef YYTYPE_UINT16 yytype_uint16;
395 #else
396 typedef unsigned short int yytype_uint16;
397 #endif
398
399 #ifdef YYTYPE_INT16
400 typedef YYTYPE_INT16 yytype_int16;
401 #else
402 typedef short int yytype_int16;
403 #endif
404
405 #ifndef YYSIZE_T
406 # ifdef __SIZE_TYPE__
407 #  define YYSIZE_T __SIZE_TYPE__
408 # elif defined size_t
409 #  define YYSIZE_T size_t
410 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
411      || defined __cplusplus || defined _MSC_VER)
412 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
413 #  define YYSIZE_T size_t
414 # else
415 #  define YYSIZE_T unsigned int
416 # endif
417 #endif
418
419 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
420
421 #ifndef YY_
422 # if defined YYENABLE_NLS && YYENABLE_NLS
423 #  if ENABLE_NLS
424 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
425 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
426 #  endif
427 # endif
428 # ifndef YY_
429 #  define YY_(msgid) msgid
430 # endif
431 #endif
432
433 /* Suppress unused-variable warnings by "using" E.  */
434 #if ! defined lint || defined __GNUC__
435 # define YYUSE(e) ((void) (e))
436 #else
437 # define YYUSE(e) /* empty */
438 #endif
439
440 /* Identity function, used to suppress warnings about constant conditions.  */
441 #ifndef lint
442 # define YYID(n) (n)
443 #else
444 #if (defined __STDC__ || defined __C99__FUNC__ \
445      || defined __cplusplus || defined _MSC_VER)
446 static int
447 YYID (int yyi)
448 #else
449 static int
450 YYID (yyi)
451     int yyi;
452 #endif
453 {
454   return yyi;
455 }
456 #endif
457
458 #if ! defined yyoverflow || YYERROR_VERBOSE
459
460 /* The parser invokes alloca or malloc; define the necessary symbols.  */
461
462 # ifdef YYSTACK_USE_ALLOCA
463 #  if YYSTACK_USE_ALLOCA
464 #   ifdef __GNUC__
465 #    define YYSTACK_ALLOC __builtin_alloca
466 #   elif defined __BUILTIN_VA_ARG_INCR
467 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
468 #   elif defined _AIX
469 #    define YYSTACK_ALLOC __alloca
470 #   elif defined _MSC_VER
471 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
472 #    define alloca _alloca
473 #   else
474 #    define YYSTACK_ALLOC alloca
475 #    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
476      || defined __cplusplus || defined _MSC_VER)
477 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
478 #     ifndef EXIT_SUCCESS
479 #      define EXIT_SUCCESS 0
480 #     endif
481 #    endif
482 #   endif
483 #  endif
484 # endif
485
486 # ifdef YYSTACK_ALLOC
487    /* Pacify GCC's `empty if-body' warning.  */
488 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
489 #  ifndef YYSTACK_ALLOC_MAXIMUM
490     /* The OS might guarantee only one guard page at the bottom of the stack,
491        and a page size can be as small as 4096 bytes.  So we cannot safely
492        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
493        to allow for a few compiler-allocated temporary stack slots.  */
494 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
495 #  endif
496 # else
497 #  define YYSTACK_ALLOC YYMALLOC
498 #  define YYSTACK_FREE YYFREE
499 #  ifndef YYSTACK_ALLOC_MAXIMUM
500 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
501 #  endif
502 #  if (defined __cplusplus && ! defined EXIT_SUCCESS \
503        && ! ((defined YYMALLOC || defined malloc) \
504              && (defined YYFREE || defined free)))
505 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
506 #   ifndef EXIT_SUCCESS
507 #    define EXIT_SUCCESS 0
508 #   endif
509 #  endif
510 #  ifndef YYMALLOC
511 #   define YYMALLOC malloc
512 #   if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
513      || defined __cplusplus || defined _MSC_VER)
514 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
515 #   endif
516 #  endif
517 #  ifndef YYFREE
518 #   define YYFREE free
519 #   if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
520      || defined __cplusplus || defined _MSC_VER)
521 void free (void *); /* INFRINGES ON USER NAME SPACE */
522 #   endif
523 #  endif
524 # endif
525 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
526
527
528 #if (! defined yyoverflow \
529      && (! defined __cplusplus \
530          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
531
532 /* A type that is properly aligned for any stack member.  */
533 union yyalloc
534 {
535   yytype_int16 yyss_alloc;
536   YYSTYPE yyvs_alloc;
537 };
538
539 /* The size of the maximum gap between one aligned stack and the next.  */
540 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
541
542 /* The size of an array large to enough to hold all stacks, each with
543    N elements.  */
544 # define YYSTACK_BYTES(N) \
545      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
546       + YYSTACK_GAP_MAXIMUM)
547
548 # define YYCOPY_NEEDED 1
549
550 /* Relocate STACK from its old location to the new one.  The
551    local variables YYSIZE and YYSTACKSIZE give the old and new number of
552    elements in the stack, and YYPTR gives the new location of the
553    stack.  Advance YYPTR to a properly aligned location for the next
554    stack.  */
555 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
556     do                                                                  \
557       {                                                                 \
558         YYSIZE_T yynewbytes;                                            \
559         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
560         Stack = &yyptr->Stack_alloc;                                    \
561         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
562         yyptr += yynewbytes / sizeof (*yyptr);                          \
563       }                                                                 \
564     while (YYID (0))
565
566 #endif
567
568 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
569 /* Copy COUNT objects from FROM to TO.  The source and destination do
570    not overlap.  */
571 # ifndef YYCOPY
572 #  if defined __GNUC__ && 1 < __GNUC__
573 #   define YYCOPY(To, From, Count) \
574       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
575 #  else
576 #   define YYCOPY(To, From, Count)              \
577       do                                        \
578         {                                       \
579           YYSIZE_T yyi;                         \
580           for (yyi = 0; yyi < (Count); yyi++)   \
581             (To)[yyi] = (From)[yyi];            \
582         }                                       \
583       while (YYID (0))
584 #  endif
585 # endif
586 #endif /* !YYCOPY_NEEDED */
587
588 /* YYFINAL -- State number of the termination state.  */
589 #define YYFINAL  67
590 /* YYLAST -- Last index in YYTABLE.  */
591 #define YYLAST   2168
592
593 /* YYNTOKENS -- Number of terminals.  */
594 #define YYNTOKENS  93
595 /* YYNNTS -- Number of nonterminals.  */
596 #define YYNNTS  76
597 /* YYNRULES -- Number of rules.  */
598 #define YYNRULES  244
599 /* YYNRULES -- Number of states.  */
600 #define YYNSTATES  408
601
602 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
603 #define YYUNDEFTOK  2
604 #define YYMAXUTOK   323
605
606 #define YYTRANSLATE(YYX)                                                \
607   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
608
609 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
610 static const yytype_uint8 yytranslate[] =
611 {
612        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
613        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
614        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
615        2,     2,     2,    82,     2,     2,     2,    84,    77,     2,
616       69,    70,    78,    79,    76,    80,    75,    83,     2,     2,
617        2,     2,     2,     2,     2,     2,     2,     2,    90,    92,
618       85,    91,    86,    89,     2,     2,     2,     2,     2,     2,
619        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
620        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
621        2,    73,     2,    74,    87,     2,     2,     2,     2,     2,
622        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
623        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
624        2,     2,     2,    71,    88,    72,    81,     2,     2,     2,
625        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
626        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
627        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
628        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
629        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
630        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
631        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
632        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
633        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
634        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
635        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
636        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
637        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
638        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
639       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
640       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
641       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
642       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
643       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
644       65,    66,    67,    68
645 };
646
647 #if YYDEBUG
648 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
649    YYRHS.  */
650 static const yytype_uint16 yyprhs[] =
651 {
652        0,     0,     3,     5,     7,     9,    11,    13,    17,    24,
653       26,    29,    31,    33,    35,    37,    42,    47,    51,    55,
654       59,    62,    65,    67,    71,    73,    76,    79,    82,    85,
655       90,    92,    94,    96,    98,   100,   102,   104,   109,   111,
656      115,   119,   123,   125,   129,   133,   135,   139,   143,   145,
657      149,   153,   157,   161,   163,   167,   171,   173,   177,   179,
658      183,   185,   189,   191,   195,   197,   201,   203,   209,   211,
659      215,   217,   219,   221,   223,   225,   227,   229,   231,   233,
660      235,   237,   239,   243,   246,   248,   252,   255,   258,   260,
661      263,   265,   268,   270,   273,   275,   277,   281,   283,   287,
662      289,   291,   293,   295,   297,   299,   301,   303,   305,   307,
663      309,   311,   313,   315,   317,   319,   321,   323,   329,   334,
664      337,   339,   341,   343,   346,   350,   353,   355,   358,   360,
665      362,   366,   367,   369,   372,   376,   382,   387,   394,   400,
666      403,   405,   406,   409,   413,   415,   419,   421,   423,   425,
667      427,   429,   432,   434,   436,   440,   445,   449,   454,   459,
668      463,   466,   468,   472,   475,   477,   480,   482,   486,   489,
669      492,   494,   496,   498,   502,   504,   507,   509,   511,   514,
670      518,   521,   525,   529,   534,   537,   541,   545,   550,   552,
671      554,   558,   563,   565,   569,   571,   573,   575,   577,   579,
672      581,   585,   590,   594,   597,   601,   603,   606,   608,   610,
673      612,   615,   621,   629,   635,   641,   649,   656,   664,   672,
674      681,   689,   698,   707,   717,   721,   724,   727,   730,   734,
675      736,   739,   741,   743,   745,   750,   754,   756,   759,   761,
676      763,   768,   771,   773,   775
677 };
678
679 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
680 static const yytype_int16 yyrhs[] =
681 {
682      160,     0,    -1,    96,    -1,     5,    -1,     7,    -1,     6,
683       -1,    95,    -1,    69,   116,    70,    -1,    43,    69,    71,
684      154,    72,    70,    -1,     8,    -1,    95,     8,    -1,     3,
685       -1,    96,    -1,   148,    -1,    94,    -1,    98,    73,   116,
686       74,    -1,    98,    69,    99,    70,    -1,    98,    69,    70,
687       -1,    98,    75,    97,    -1,    98,    30,    97,    -1,    98,
688       28,    -1,    98,    29,    -1,   114,    -1,    99,    76,   114,
689       -1,    98,    -1,    28,   100,    -1,    29,   100,    -1,   101,
690      102,    -1,    57,   100,    -1,    57,    69,   145,    70,    -1,
691       77,    -1,    78,    -1,    79,    -1,    80,    -1,    81,    -1,
692       82,    -1,   100,    -1,    69,   145,    70,   102,    -1,   102,
693       -1,   103,    78,   102,    -1,   103,    83,   102,    -1,   103,
694       84,   102,    -1,   103,    -1,   104,    79,   103,    -1,   104,
695       80,   103,    -1,   104,    -1,   105,    18,   104,    -1,   105,
696       19,   104,    -1,   105,    -1,   106,    85,   105,    -1,   106,
697       86,   105,    -1,   106,    24,   105,    -1,   106,    25,   105,
698       -1,   106,    -1,   107,    22,   106,    -1,   107,    23,   106,
699       -1,   107,    -1,   108,    77,   107,    -1,   108,    -1,   109,
700       87,   108,    -1,   109,    -1,   110,    88,   109,    -1,   110,
701       -1,   111,    26,   110,    -1,   111,    -1,   112,    27,   111,
702       -1,   112,    -1,   112,    89,   116,    90,   113,    -1,   113,
703       -1,   100,   115,   114,    -1,    91,    -1,    12,    -1,    13,
704       -1,    14,    -1,    10,    -1,    11,    -1,    20,    -1,    21,
705       -1,    16,    -1,    15,    -1,    17,    -1,   114,    -1,   116,
706       76,   114,    -1,    43,   116,    -1,   113,    -1,   119,   120,
707       92,    -1,   119,    92,    -1,   122,   119,    -1,   122,    -1,
708      123,   119,    -1,   123,    -1,   136,   119,    -1,   136,    -1,
709      137,   119,    -1,   137,    -1,   121,    -1,   120,    76,   121,
710       -1,   138,    -1,   138,    91,   149,    -1,    61,    -1,    44,
711       -1,    58,    -1,    31,    -1,    52,    -1,    64,    -1,    35,
712       -1,    55,    -1,    50,    -1,    51,    -1,    45,    -1,    40,
713       -1,    56,    -1,    63,    -1,    32,    -1,   124,    -1,   131,
714       -1,   148,    -1,   125,    97,    71,   126,    72,    -1,   125,
715       71,   126,    72,    -1,   125,    97,    -1,    59,    -1,    62,
716       -1,   127,    -1,   126,   127,    -1,   128,   129,    92,    -1,
717      123,   128,    -1,   123,    -1,   136,   128,    -1,   136,    -1,
718      130,    -1,   129,    76,   130,    -1,    -1,   138,    -1,    90,
719      117,    -1,   138,    90,   117,    -1,   132,    97,    71,   133,
720       72,    -1,   132,    71,   133,    72,    -1,   132,    97,    71,
721      133,    76,    72,    -1,   132,    71,   133,    76,    72,    -1,
722      132,    97,    -1,    42,    -1,    -1,   134,   135,    -1,   133,
723       76,   135,    -1,    96,    -1,    96,    91,   117,    -1,    36,
724       -1,    53,    -1,    43,    -1,    65,    -1,    49,    -1,   140,
725      139,    -1,   139,    -1,    96,    -1,    69,   138,    70,    -1,
726      139,    73,   114,    74,    -1,   139,    73,    74,    -1,   139,
727       69,   142,    70,    -1,   139,    69,   144,    70,    -1,   139,
728       69,    70,    -1,    78,   141,    -1,    78,    -1,    78,   141,
729      140,    -1,    78,   140,    -1,   136,    -1,   141,   136,    -1,
730      143,    -1,   142,    76,   143,    -1,   119,   138,    -1,   119,
731      146,    -1,   119,    -1,     9,    -1,    96,    -1,   144,    76,
732       96,    -1,   128,    -1,   128,   146,    -1,   140,    -1,   147,
733       -1,   140,   147,    -1,    69,   146,    70,    -1,    73,    74,
734       -1,    73,   114,    74,    -1,   147,    73,    74,    -1,   147,
735       73,   114,    74,    -1,    69,    70,    -1,    69,   142,    70,
736       -1,   147,    69,    70,    -1,   147,    69,   142,    70,    -1,
737        4,    -1,   114,    -1,    71,   150,    72,    -1,    71,   150,
738       76,    72,    -1,   149,    -1,   150,    76,   149,    -1,   152,
739       -1,   153,    -1,   156,    -1,   157,    -1,   158,    -1,   159,
740       -1,    97,    90,   151,    -1,    34,   117,    90,   151,    -1,
741       38,    90,   151,    -1,    71,    72,    -1,    71,   154,    72,
742       -1,   155,    -1,   154,   155,    -1,   118,    -1,   151,    -1,
743       92,    -1,   116,    92,    -1,    48,    69,   116,    70,   151,
744       -1,    48,    69,   116,    70,   151,    41,   151,    -1,    60,
745       69,   116,    70,   151,    -1,    66,    69,   116,    70,   151,
746       -1,    39,   151,    66,    69,   116,    70,    92,    -1,    46,
747       69,    92,    92,    70,   151,    -1,    46,    69,   116,    92,
748       92,    70,   151,    -1,    46,    69,    92,   116,    92,    70,
749      151,    -1,    46,    69,   116,    92,   116,    92,    70,   151,
750       -1,    46,    69,    92,    92,   116,    70,   151,    -1,    46,
751       69,   116,    92,    92,   116,    70,   151,    -1,    46,    69,
752       92,   116,    92,   116,    70,   151,    -1,    46,    69,   116,
753       92,   116,    92,   116,    70,   151,    -1,    47,    97,    92,
754       -1,    37,    92,    -1,    33,    92,    -1,    54,    92,    -1,
755       54,   116,    92,    -1,   161,    -1,   160,   161,    -1,   162,
756       -1,   118,    -1,   168,    -1,   119,   138,   163,   153,    -1,
757      119,   138,   153,    -1,   118,    -1,   163,   118,    -1,    67,
758       -1,    68,    -1,   164,    69,   144,    70,    -1,   165,   117,
759       -1,   166,    -1,   167,    -1,     1,    -1
760 };
761
762 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
763 static const yytype_uint16 yyrline[] =
764 {
765        0,   223,   223,   232,   244,   250,   257,   258,   262,   270,
766      285,   299,   306,   307,   311,   312,   316,   320,   324,   328,
767      332,   336,   343,   344,   348,   349,   353,   357,   380,   384,
768      392,   396,   400,   404,   408,   412,   419,   420,   428,   429,
769      435,   443,   454,   455,   461,   470,   471,   483,   492,   493,
770      499,   505,   511,   520,   521,   527,   536,   537,   546,   547,
771      556,   557,   566,   567,   578,   579,   590,   591,   598,   599,
772      606,   607,   608,   609,   610,   611,   612,   613,   614,   615,
773      616,   620,   621,   622,   629,   635,   653,   660,   665,   670,
774      683,   684,   689,   694,   699,   707,   711,   718,   719,   723,
775      727,   731,   735,   739,   746,   750,   754,   758,   762,   766,
776      770,   774,   778,   782,   786,   787,   788,   796,   815,   820,
777      828,   833,   841,   842,   849,   869,   874,   875,   880,   888,
778      892,   900,   903,   904,   908,   919,   926,   933,   940,   947,
779      954,   963,   963,   972,   980,   988,  1000,  1004,  1008,  1012,
780     1019,  1026,  1031,  1035,  1040,  1044,  1049,  1054,  1064,  1071,
781     1080,  1085,  1089,  1094,  1101,  1102,  1109,  1113,  1120,  1125,
782     1130,  1135,  1142,  1148,  1157,  1158,  1162,  1167,  1168,  1176,
783     1180,  1185,  1190,  1195,  1200,  1206,  1216,  1222,  1235,  1242,
784     1243,  1244,  1248,  1249,  1255,  1256,  1257,  1258,  1259,  1260,
785     1264,  1265,  1266,  1270,  1271,  1275,  1276,  1280,  1281,  1285,
786     1286,  1290,  1291,  1292,  1296,  1297,  1298,  1299,  1300,  1301,
787     1302,  1303,  1304,  1305,  1309,  1310,  1311,  1312,  1313,  1319,
788     1320,  1324,  1325,  1326,  1330,  1331,  1335,  1336,  1342,  1349,
789     1356,  1360,  1371,  1372,  1373
790 };
791 #endif
792
793 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
794 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
795    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
796 static const char *const yytname[] =
797 {
798   "$end", "error", "$undefined", "\"identifier\"", "\"typedef-name\"",
799   "INTEGER", "FLOATING", "CHARACTER", "STRING", "ELLIPSIS", "ADDEQ",
800   "SUBEQ", "MULEQ", "DIVEQ", "MODEQ", "XOREQ", "ANDEQ", "OREQ", "SL", "SR",
801   "SLEQ", "SREQ", "EQ", "NOTEQ", "LTEQ", "GTEQ", "ANDAND", "OROR",
802   "PLUSPLUS", "MINUSMINUS", "ARROW", "AUTO", "BOOL", "BREAK", "CASE",
803   "CHAR", "CONST", "CONTINUE", "DEFAULT", "DO", "DOUBLE", "ELSE", "ENUM",
804   "EXTENSION", "EXTERN", "FLOAT", "FOR", "GOTO", "IF", "INLINE", "INT",
805   "LONG", "REGISTER", "RESTRICT", "RETURN", "SHORT", "SIGNED", "SIZEOF",
806   "STATIC", "STRUCT", "SWITCH", "TYPEDEF", "UNION", "UNSIGNED", "VOID",
807   "VOLATILE", "WHILE", "FUNCTION_MACRO", "OBJECT_MACRO", "'('", "')'",
808   "'{'", "'}'", "'['", "']'", "'.'", "','", "'&'", "'*'", "'+'", "'-'",
809   "'~'", "'!'", "'/'", "'%'", "'<'", "'>'", "'^'", "'|'", "'?'", "':'",
810   "'='", "';'", "$accept", "primary_expression", "strings", "identifier",
811   "identifier_or_typedef_name", "postfix_expression",
812   "argument_expression_list", "unary_expression", "unary_operator",
813   "cast_expression", "multiplicative_expression", "additive_expression",
814   "shift_expression", "relational_expression", "equality_expression",
815   "and_expression", "exclusive_or_expression", "inclusive_or_expression",
816   "logical_and_expression", "logical_or_expression",
817   "conditional_expression", "assignment_expression", "assignment_operator",
818   "expression", "constant_expression", "declaration",
819   "declaration_specifiers", "init_declarator_list", "init_declarator",
820   "storage_class_specifier", "type_specifier", "struct_or_union_specifier",
821   "struct_or_union", "struct_declaration_list", "struct_declaration",
822   "specifier_qualifier_list", "struct_declarator_list",
823   "struct_declarator", "enum_specifier", "enum_keyword", "enumerator_list",
824   "$@1", "enumerator", "type_qualifier", "function_specifier",
825   "declarator", "direct_declarator", "pointer", "type_qualifier_list",
826   "parameter_list", "parameter_declaration", "identifier_list",
827   "type_name", "abstract_declarator", "direct_abstract_declarator",
828   "typedef_name", "initializer", "initializer_list", "statement",
829   "labeled_statement", "compound_statement", "block_item_list",
830   "block_item", "expression_statement", "selection_statement",
831   "iteration_statement", "jump_statement", "translation_unit",
832   "external_declaration", "function_definition", "declaration_list",
833   "function_macro", "object_macro", "function_macro_define",
834   "object_macro_define", "macro", 0
835 };
836 #endif
837
838 # ifdef YYPRINT
839 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
840    token YYLEX-NUM.  */
841 static const yytype_uint16 yytoknum[] =
842 {
843        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
844      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
845      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
846      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
847      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
848      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
849      315,   316,   317,   318,   319,   320,   321,   322,   323,    40,
850       41,   123,   125,    91,    93,    46,    44,    38,    42,    43,
851       45,   126,    33,    47,    37,    60,    62,    94,   124,    63,
852       58,    61,    59
853 };
854 # endif
855
856 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
857 static const yytype_uint8 yyr1[] =
858 {
859        0,    93,    94,    94,    94,    94,    94,    94,    94,    95,
860       95,    96,    97,    97,    98,    98,    98,    98,    98,    98,
861       98,    98,    99,    99,   100,   100,   100,   100,   100,   100,
862      101,   101,   101,   101,   101,   101,   102,   102,   103,   103,
863      103,   103,   104,   104,   104,   105,   105,   105,   106,   106,
864      106,   106,   106,   107,   107,   107,   108,   108,   109,   109,
865      110,   110,   111,   111,   112,   112,   113,   113,   114,   114,
866      115,   115,   115,   115,   115,   115,   115,   115,   115,   115,
867      115,   116,   116,   116,   117,   118,   118,   119,   119,   119,
868      119,   119,   119,   119,   119,   120,   120,   121,   121,   122,
869      122,   122,   122,   122,   123,   123,   123,   123,   123,   123,
870      123,   123,   123,   123,   123,   123,   123,   124,   124,   124,
871      125,   125,   126,   126,   127,   128,   128,   128,   128,   129,
872      129,   130,   130,   130,   130,   131,   131,   131,   131,   131,
873      132,   134,   133,   133,   135,   135,   136,   136,   136,   136,
874      137,   138,   138,   139,   139,   139,   139,   139,   139,   139,
875      140,   140,   140,   140,   141,   141,   142,   142,   143,   143,
876      143,   143,   144,   144,   145,   145,   146,   146,   146,   147,
877      147,   147,   147,   147,   147,   147,   147,   147,   148,   149,
878      149,   149,   150,   150,   151,   151,   151,   151,   151,   151,
879      152,   152,   152,   153,   153,   154,   154,   155,   155,   156,
880      156,   157,   157,   157,   158,   158,   158,   158,   158,   158,
881      158,   158,   158,   158,   159,   159,   159,   159,   159,   160,
882      160,   161,   161,   161,   162,   162,   163,   163,   164,   165,
883      166,   167,   168,   168,   168
884 };
885
886 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
887 static const yytype_uint8 yyr2[] =
888 {
889        0,     2,     1,     1,     1,     1,     1,     3,     6,     1,
890        2,     1,     1,     1,     1,     4,     4,     3,     3,     3,
891        2,     2,     1,     3,     1,     2,     2,     2,     2,     4,
892        1,     1,     1,     1,     1,     1,     1,     4,     1,     3,
893        3,     3,     1,     3,     3,     1,     3,     3,     1,     3,
894        3,     3,     3,     1,     3,     3,     1,     3,     1,     3,
895        1,     3,     1,     3,     1,     3,     1,     5,     1,     3,
896        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
897        1,     1,     3,     2,     1,     3,     2,     2,     1,     2,
898        1,     2,     1,     2,     1,     1,     3,     1,     3,     1,
899        1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
900        1,     1,     1,     1,     1,     1,     1,     5,     4,     2,
901        1,     1,     1,     2,     3,     2,     1,     2,     1,     1,
902        3,     0,     1,     2,     3,     5,     4,     6,     5,     2,
903        1,     0,     2,     3,     1,     3,     1,     1,     1,     1,
904        1,     2,     1,     1,     3,     4,     3,     4,     4,     3,
905        2,     1,     3,     2,     1,     2,     1,     3,     2,     2,
906        1,     1,     1,     3,     1,     2,     1,     1,     2,     3,
907        2,     3,     3,     4,     2,     3,     3,     4,     1,     1,
908        3,     4,     1,     3,     1,     1,     1,     1,     1,     1,
909        3,     4,     3,     2,     3,     1,     2,     1,     1,     1,
910        2,     5,     7,     5,     5,     7,     6,     7,     7,     8,
911        7,     8,     8,     9,     3,     2,     2,     2,     3,     1,
912        2,     1,     1,     1,     4,     3,     1,     2,     1,     1,
913        4,     2,     1,     1,     1
914 };
915
916 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
917    Performed when YYTABLE doesn't specify something else to do.  Zero
918    means the default is an error.  */
919 static const yytype_uint8 yydefact[] =
920 {
921        0,   244,   188,   102,   113,   105,   146,   110,   140,   148,
922      100,   109,   150,   107,   108,   103,   147,   106,   111,   101,
923      120,    99,   121,   112,   104,   149,   238,   239,   232,     0,
924       88,    90,   114,     0,   115,     0,    92,    94,   116,     0,
925      229,   231,     0,     0,   242,   243,   233,    11,     0,   161,
926       86,   153,     0,    95,    97,   152,     0,    87,    89,     0,
927       12,   119,    13,   141,   139,    91,    93,     1,   230,     0,
928        3,     5,     4,     9,     0,     0,     0,     0,     0,    30,
929       31,    32,    33,    34,    35,    14,     6,     2,    24,    36,
930        0,    38,    42,    45,    48,    53,    56,    58,    60,    62,
931       64,    66,    84,   241,     0,   164,   163,   160,     0,    85,
932        0,     0,   236,     0,   235,     0,     0,     0,   151,   126,
933        0,   122,   131,   128,     0,     0,     0,   141,   172,     0,
934        0,    25,    26,     0,     0,    28,   148,    36,    68,    81,
935        0,   174,     0,    10,    20,    21,     0,     0,     0,     0,
936       27,     0,     0,     0,     0,     0,     0,     0,     0,     0,
937        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
938      154,   165,   162,    96,    97,     0,     0,     0,     0,     0,
939        0,     0,     0,     0,     0,     0,   203,   209,     2,     0,
940        0,   207,   116,   208,   194,   195,     0,   205,   196,   197,
941      198,   199,     0,   189,    98,   237,   234,   171,   159,   170,
942        0,   166,     0,   156,     0,   125,   118,   123,     0,     0,
943      129,   132,   127,     0,   136,     0,   144,   142,     0,   240,
944        0,     0,     0,     0,     0,    83,    74,    75,    71,    72,
945       73,    79,    78,    80,    76,    77,    70,     0,     7,     0,
946        0,     0,   176,   175,   177,     0,    19,    17,     0,    22,
947        0,    18,    39,    40,    41,    43,    44,    46,    47,    51,
948       52,    49,    50,    54,    55,    57,    59,    61,    63,    65,
949        0,   226,     0,   225,     0,     0,     0,     0,     0,   227,
950        0,     0,     0,     0,   210,   204,   206,   192,     0,     0,
951      168,   176,   169,   157,     0,   158,   155,   133,   131,   124,
952        0,   117,   138,   143,     0,   135,     0,   173,     0,    29,
953       69,    82,   184,     0,     0,   180,     0,   178,     0,     0,
954       37,    16,     0,    15,     0,     0,   202,     0,     0,     0,
955      224,     0,   228,     0,     0,   200,   190,     0,   167,   130,
956      134,   145,   137,     0,   185,   179,   181,   186,     0,   182,
957        0,    23,    67,   201,     0,     0,     0,     0,     0,     0,
958        0,   191,   193,     8,   187,   183,     0,     0,     0,     0,
959        0,     0,   211,   213,   214,     0,   216,     0,     0,     0,
960        0,     0,     0,     0,   215,   220,   218,     0,   217,     0,
961        0,     0,   212,   222,   221,   219,     0,   223
962 };
963
964 /* YYDEFGOTO[NTERM-NUM].  */
965 static const yytype_int16 yydefgoto[] =
966 {
967       -1,    85,    86,    87,   189,    88,   258,   137,    90,    91,
968       92,    93,    94,    95,    96,    97,    98,    99,   100,   101,
969      138,   139,   247,   190,   103,   191,   113,    52,    53,    30,
970       31,    32,    33,   120,   121,   122,   219,   220,    34,    35,
971      125,   126,   313,    36,    37,   104,    55,    56,   107,   323,
972      211,   129,   142,   324,   254,    38,   204,   298,   193,   194,
973      195,   196,   197,   198,   199,   200,   201,    39,    40,    41,
974      115,    42,    43,    44,    45,    46
975 };
976
977 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
978    STATE-NUM.  */
979 #define YYPACT_NINF -224
980 static const yytype_int16 yypact[] =
981 {
982     1857,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,
983     -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,
984     -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,  -224,    20,
985     2069,  2069,  -224,    59,  -224,    66,  2069,  2069,  -224,  1746,
986     -224,  -224,   -38,  1451,  -224,  -224,  -224,  -224,    23,   151,
987     -224,  -224,   -43,  -224,   970,   -17,    22,  -224,  -224,  2103,
988     -224,   -16,  -224,  -224,    12,  -224,  -224,  -224,  -224,    39,
989     -224,  -224,  -224,  -224,  1478,  1478,    40,  1508,  1119,  -224,
990     -224,  -224,  -224,  -224,  -224,  -224,   108,  -224,   161,  -224,
991     1451,  -224,   129,    68,   255,    29,   198,    49,    42,    51,
992      130,     1,  -224,  -224,   165,  -224,  -224,   151,    23,  -224,
993      473,  1184,  -224,    20,  -224,  1960,  1923,  1217,   -17,  2103,
994     1780,  -224,    71,  2103,  2103,     4,    39,  -224,  -224,    87,
995     1535,  -224,  -224,   157,  1119,  -224,  1565,   472,  -224,  -224,
996       95,   137,   167,  -224,  -224,  -224,   196,  1244,  1535,   196,
997     -224,  1451,  1451,  1451,  1451,  1451,  1451,  1451,  1451,  1451,
998     1451,  1451,  1451,  1451,  1451,  1451,  1451,  1451,  1451,  1535,
999     -224,  -224,  -224,  -224,   117,   160,  1451,   162,   159,   803,
1000      194,   196,   197,   819,   215,   217,  -224,  -224,   205,   214,
1001      -42,  -224,   218,  -224,  -224,  -224,   563,  -224,  -224,  -224,
1002     -224,  -224,  1184,  -224,  -224,  -224,  -224,  -224,  -224,   124,
1003      106,  -224,   109,  -224,   231,  -224,  -224,  -224,  1451,   -25,
1004     -224,   219,  -224,  1814,  -224,    32,   220,  -224,   133,  -224,
1005       39,  1565,   723,   240,  1039,   237,  -224,  -224,  -224,  -224,
1006     -224,  -224,  -224,  -224,  -224,  -224,  -224,  1451,  -224,  1451,
1007     1679,  1274,   158,  -224,   202,  1451,  -224,  -224,   122,  -224,
1008       -3,  -224,  -224,  -224,  -224,   129,   129,    68,    68,   255,
1009      255,   255,   255,    29,    29,   198,    49,    42,    51,   130,
1010      -44,  -224,   224,  -224,   803,   249,   884,   226,  1535,  -224,
1011       62,  1535,  1535,   803,  -224,  -224,  -224,  -224,   209,  1617,
1012     -224,    34,  -224,  -224,  2034,  -224,  -224,  -224,    71,  -224,
1013     1451,  -224,  -224,  -224,  1451,  -224,    33,  -224,   643,  -224,
1014     -224,  -224,  -224,   148,   251,  -224,   250,   202,  1997,  1301,
1015     -224,  -224,  1451,  -224,  1451,   803,  -224,   257,   900,    70,
1016     -224,   149,  -224,   169,   172,  -224,  -224,  1137,  -224,  -224,
1017     -224,  -224,  -224,   258,  -224,  -224,  -224,  -224,   177,  -224,
1018      253,  -224,  -224,  -224,  1535,  1331,    77,   916,   803,   803,
1019      803,  -224,  -224,  -224,  -224,  -224,   180,   803,   181,  1361,
1020     1391,    83,   288,  -224,  -224,   238,  -224,   803,   803,   189,
1021      803,   191,  1421,   803,  -224,  -224,  -224,   803,  -224,   803,
1022      803,   192,  -224,  -224,  -224,  -224,   803,  -224
1023 };
1024
1025 /* YYPGOTO[NTERM-NUM].  */
1026 static const yytype_int16 yypgoto[] =
1027 {
1028     -224,  -224,  -224,   -29,   -21,  -224,  -224,   248,  -224,   -87,
1029      128,   136,   138,   139,   170,   168,   176,   178,   175,  -224,
1030      -34,  -106,  -224,   -48,  -159,    21,     8,  -224,   227,  -224,
1031       54,  -224,  -224,   223,  -113,   -62,  -224,    41,  -224,  -224,
1032      225,  -224,   230,    -1,  -224,   -14,   -55,   -39,  -224,  -114,
1033       46,   235,   229,   -98,  -223,   -15,  -189,  -224,    53,  -224,
1034      -30,   125,  -174,  -224,  -224,  -224,  -224,  -224,   321,  -224,
1035     -224,  -224,  -224,  -224,  -224,  -224
1036 };
1037
1038 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
1039    positive, shift that token.  If negative, reduce the rule which
1040    number is the opposite.  If YYTABLE_NINF, syntax error.  */
1041 #define YYTABLE_NINF -14
1042 static const yytype_int16 yytable[] =
1043 {
1044       51,   118,   210,   150,    60,   203,    60,   217,    29,   102,
1045      106,   214,    61,   297,    64,    54,   141,   282,    62,    51,
1046       62,    28,   296,    47,   114,    47,    47,    51,   168,   327,
1047      140,    69,   249,   108,   249,    47,    47,    47,    57,    58,
1048      128,   259,    47,   253,    65,    66,   334,    29,   105,   109,
1049      294,   308,   116,   158,   159,   124,   117,   215,   123,   307,
1050       28,   222,    47,     2,   262,   263,   264,   309,   172,    47,
1051        2,   333,   141,   249,    47,   112,   224,   123,   327,    51,
1052      225,   188,   140,   127,    51,   206,   140,   128,   235,    48,
1053      169,    48,    48,    51,   174,   192,   203,   226,    49,   174,
1054      260,    49,   252,   299,   312,   352,   171,   251,   221,   133,
1055      217,   302,    50,   119,   160,   161,   143,    60,   123,   123,
1056       60,   280,   123,   123,   209,   256,   164,    47,   261,   165,
1057       59,    62,   119,   123,    62,   290,   205,    63,   249,   166,
1058       48,   320,   102,   321,   296,   326,   249,   154,   155,    49,
1059      188,   350,    60,   249,   342,   351,   167,   229,   372,   249,
1060      287,   218,   367,   230,    62,   248,    62,   188,   330,   379,
1061      301,   249,   141,   119,   119,   392,   303,   119,   119,   305,
1062       51,   192,   304,   235,   102,   230,   140,     6,   119,   144,
1063      145,   146,   331,   299,     9,   300,   226,   251,   332,    47,
1064        2,   317,    49,   188,    16,   315,   250,   151,   111,   316,
1065      251,   252,   152,   153,   358,    49,    25,   192,   354,   368,
1066      162,   163,   123,   360,   304,   249,   361,   250,   232,    49,
1067      147,   251,   285,   123,   148,   170,   149,   255,   339,   369,
1068      341,   203,   370,   343,   344,   249,   118,   374,   249,   284,
1069      385,   387,   281,   304,   283,   188,   249,   249,   209,   397,
1070      301,   399,   406,   286,   188,   249,   288,   249,   249,    62,
1071       51,   328,    51,   156,   157,   329,   102,   119,    62,    51,
1072      102,   346,   265,   266,   291,   347,   292,   226,   119,   188,
1073      366,    89,   267,   268,   221,   -12,   269,   270,   271,   272,
1074      362,   273,   274,   192,   293,   306,   188,   209,   -13,   310,
1075      319,   314,   209,   249,   335,   337,   376,   378,   340,   381,
1076       62,   355,   131,   132,   356,   135,   364,   375,   373,   393,
1077      394,   389,   391,   276,   275,   173,   209,   336,    89,   188,
1078      188,   188,   277,   279,   401,   278,   345,   223,   188,   349,
1079      348,   212,   228,    62,    62,    62,   227,   318,   188,   188,
1080       68,   188,    62,   233,   188,     0,     0,     0,   188,     0,
1081      188,   188,    62,    62,     0,    62,     0,   188,    62,     0,
1082        0,     0,    62,     0,    62,    62,     0,     0,   363,     0,
1083        0,    62,     0,     0,     0,     0,     0,     0,     0,    89,
1084       89,    89,    89,    89,    89,    89,    89,    89,    89,    89,
1085       89,    89,    89,    89,    89,    89,    89,     0,     0,     0,
1086        0,   382,   383,   384,    89,     0,     0,     0,     0,     0,
1087      386,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1088      395,   396,     0,   398,     0,     0,   402,     0,     0,     0,
1089      403,     0,   404,   405,     0,     0,     0,     0,     0,   407,
1090        0,     0,     0,     0,     0,     0,    89,     0,     0,     0,
1091        0,     0,     0,     0,     0,     0,    47,     2,    70,    71,
1092       72,    73,   236,   237,   238,   239,   240,   241,   242,   243,
1093        0,     0,   244,   245,     0,     0,     0,     0,     0,     0,
1094        0,    74,    75,    89,     3,     4,   175,   176,     5,     6,
1095      177,   178,   179,     7,     0,     8,   136,    10,    11,   180,
1096      181,   182,    12,    13,    14,    15,    16,   183,    17,    18,
1097       77,    19,    20,   184,    21,    22,    23,    24,    25,   185,
1098        0,     0,    78,     0,   110,   186,     0,     0,     0,     0,
1099       79,    80,    81,    82,    83,    84,     0,     0,    89,     0,
1100        0,     0,    89,   246,     0,   187,    47,     2,    70,    71,
1101       72,    73,     0,     0,     0,     0,     0,     0,     0,     0,
1102        0,     0,    89,     0,     0,     0,     0,     0,     0,     0,
1103        0,    74,    75,     0,     3,     4,   175,   176,     5,     6,
1104      177,   178,   179,     7,     0,     8,   136,    10,    11,   180,
1105      181,   182,    12,    13,    14,    15,    16,   183,    17,    18,
1106       77,    19,    20,   184,    21,    22,    23,    24,    25,   185,
1107        0,     0,    78,     0,   110,   295,     0,     0,     0,     0,
1108       79,    80,    81,    82,    83,    84,    47,     2,    70,    71,
1109       72,    73,     0,     0,     0,   187,     0,     0,     0,     0,
1110        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1111        0,    74,    75,     0,     3,     4,   175,   176,     5,     6,
1112      177,   178,   179,     7,     0,     8,   136,    10,    11,   180,
1113      181,   182,    12,    13,    14,    15,    16,   183,    17,    18,
1114       77,    19,    20,   184,    21,    22,    23,    24,    25,   185,
1115        0,     0,    78,     0,   110,   353,     0,     0,     0,     0,
1116       79,    80,    81,    82,    83,    84,    47,     2,    70,    71,
1117       72,    73,     0,     0,     0,   187,     0,     0,     0,     0,
1118        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1119        0,    74,    75,     0,     3,     4,   175,   176,     5,     6,
1120      177,   178,   179,     7,     0,     8,   136,    10,    11,   180,
1121      181,   182,    12,    13,    14,    15,    16,   183,    17,    18,
1122       77,    19,    20,   184,    21,    22,    23,    24,    25,   185,
1123        0,     0,    78,     0,   110,     0,     0,     0,     0,     0,
1124       79,    80,    81,    82,    83,    84,    47,     2,    70,    71,
1125       72,    73,     0,     0,     0,   187,     0,     0,     0,     0,
1126        0,     0,    47,     0,    70,    71,    72,    73,     0,     0,
1127        0,    74,    75,     0,     0,     0,   175,   176,     0,     0,
1128      177,   178,   179,     0,     0,     0,   231,    74,    75,   180,
1129      181,   182,     0,     0,     0,     0,     0,   183,     0,     0,
1130       77,     0,   231,   184,     0,     0,     0,     0,     0,   185,
1131        0,     0,    78,     0,   110,     0,    77,     0,     0,     0,
1132       79,    80,    81,    82,    83,    84,     0,    47,    78,    70,
1133       71,    72,    73,     0,     0,   187,    79,    80,    81,    82,
1134       83,    84,     0,    47,     0,    70,    71,    72,    73,     0,
1135        0,   289,    74,    75,     0,     0,     0,     0,     0,    47,
1136        0,    70,    71,    72,    73,     0,     0,   231,    74,    75,
1137        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1138        0,    77,     0,   231,    74,    75,     0,     0,     0,     0,
1139        0,     0,     0,    78,     0,     0,     0,    77,     0,   231,
1140        0,    79,    80,    81,    82,    83,    84,     0,     0,    78,
1141        0,     0,     0,    77,     2,     0,   338,    79,    80,    81,
1142       82,    83,    84,     0,     0,    78,     0,     0,     0,     0,
1143        0,     0,   365,    79,    80,    81,    82,    83,    84,     0,
1144        0,     3,     4,     0,     0,     5,     6,     0,   380,     0,
1145        7,     0,     8,     9,    10,    11,     0,     0,     0,    12,
1146       13,    14,    15,    16,     0,    17,    18,     0,    19,    20,
1147        0,    21,    22,    23,    24,    25,     0,     0,     0,     0,
1148        0,   110,    47,     2,    70,    71,    72,    73,     0,     0,
1149        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1150        0,   111,     0,     0,     0,     0,     0,    74,    75,     0,
1151        0,     4,     0,     0,     5,     6,     0,     0,     0,     7,
1152        0,     8,   136,     0,    11,     0,     0,     0,     0,    13,
1153       14,     0,    16,     0,    17,    18,    77,     0,    20,     0,
1154        0,    22,    23,    24,    25,     0,     0,     0,    78,     0,
1155      232,     0,     0,     0,     0,     0,    79,    80,    81,    82,
1156       83,    84,    47,     2,    70,    71,    72,    73,     0,     0,
1157        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1158       47,     0,    70,    71,    72,    73,     0,    74,    75,     0,
1159        0,     4,     0,     0,     5,     6,     0,     0,     0,     7,
1160        0,     8,   136,     0,    11,    74,    75,     0,     0,    13,
1161       14,     0,    16,     0,    17,    18,    77,     0,    20,     0,
1162       76,    22,    23,    24,    25,     0,     0,    47,    78,    70,
1163       71,    72,    73,     0,    77,     0,    79,    80,    81,    82,
1164       83,    84,     0,     0,     0,     0,    78,     0,   202,   371,
1165        0,     0,    74,    75,    79,    80,    81,    82,    83,    84,
1166       47,     0,    70,    71,    72,    73,     0,    76,     0,     0,
1167        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1168        0,    77,     0,     0,     0,    74,    75,    47,     0,    70,
1169       71,    72,    73,    78,     0,   202,     0,     0,     0,     0,
1170       76,    79,    80,    81,    82,    83,    84,     0,     0,     0,
1171        0,     0,    74,    75,    77,     0,     0,    47,     0,    70,
1172       71,    72,    73,     0,     0,     0,    78,    76,     0,     0,
1173        0,   213,     0,     0,    79,    80,    81,    82,    83,    84,
1174        0,    77,    74,    75,    47,     0,    70,    71,    72,    73,
1175        0,     0,     0,    78,   257,     0,     0,    76,     0,     0,
1176        0,    79,    80,    81,    82,    83,    84,     0,     0,    74,
1177       75,    77,     0,     0,    47,     0,    70,    71,    72,    73,
1178        0,     0,     0,    78,    76,     0,     0,     0,   325,     0,
1179        0,    79,    80,    81,    82,    83,    84,     0,    77,    74,
1180       75,     0,     0,     0,    47,     0,    70,    71,    72,    73,
1181       78,     0,     0,     0,   231,   359,     0,     0,    79,    80,
1182       81,    82,    83,    84,     0,     0,     0,     0,    77,    74,
1183       75,     0,     0,     0,    47,     0,    70,    71,    72,    73,
1184       78,   377,     0,     0,   231,     0,     0,     0,    79,    80,
1185       81,    82,    83,    84,     0,     0,     0,     0,    77,    74,
1186       75,     0,     0,     0,    47,     0,    70,    71,    72,    73,
1187       78,   388,     0,     0,   231,     0,     0,     0,    79,    80,
1188       81,    82,    83,    84,     0,     0,     0,     0,    77,    74,
1189       75,     0,     0,     0,    47,     0,    70,    71,    72,    73,
1190       78,   390,     0,     0,   231,     0,     0,     0,    79,    80,
1191       81,    82,    83,    84,     0,     0,     0,     0,    77,    74,
1192       75,    47,     0,    70,    71,    72,    73,     0,     0,     0,
1193       78,   400,     0,     0,    76,     0,     0,     0,    79,    80,
1194       81,    82,    83,    84,     0,     0,    74,    75,    77,     0,
1195        0,    47,     0,    70,    71,    72,    73,     0,     0,     0,
1196       78,    76,     0,     0,     0,     0,     0,     0,    79,    80,
1197       81,    82,    83,    84,     0,    77,    74,    75,    47,     0,
1198       70,    71,    72,    73,     0,     0,     0,   130,     0,     0,
1199        0,    76,     0,     0,     0,    79,    80,    81,    82,    83,
1200       84,     0,     0,    74,    75,    77,     0,     0,    47,     0,
1201       70,    71,    72,    73,     0,     0,     0,   134,   231,     0,
1202        0,     0,     0,     0,     0,    79,    80,    81,    82,    83,
1203       84,     0,    77,    74,    75,     0,     0,     0,     0,     0,
1204        0,     0,     0,     0,    78,     0,     0,     0,   231,     0,
1205        0,     0,    79,    80,    81,    82,    83,    84,     0,     0,
1206       47,     2,    77,     0,     0,     0,   207,     0,     0,     0,
1207        0,     0,     0,     0,   234,     0,     0,     0,     0,     0,
1208        0,     0,    79,    80,    81,    82,    83,    84,     3,     4,
1209        0,     0,     5,     6,     0,     0,     0,     7,     0,     8,
1210        9,    10,    11,     0,     0,     0,    12,    13,    14,    15,
1211       16,     0,    17,    18,     0,    19,    20,     0,    21,    22,
1212       23,    24,    25,     2,     0,     0,   299,   322,   207,     0,
1213      251,     0,     0,     0,     0,    49,     0,     0,     0,     0,
1214        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1215        3,     4,     0,     0,     5,     6,     0,     0,     0,     7,
1216        0,     8,     9,    10,    11,     0,     0,     0,    12,    13,
1217       14,    15,    16,     0,    17,    18,     0,    19,    20,     0,
1218       21,    22,    23,    24,    25,     0,    67,     1,   250,   322,
1219        2,     0,   251,     0,     0,     0,     0,    49,     0,     0,
1220        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1221        0,     0,     0,     0,     0,     0,     0,     3,     4,     0,
1222        0,     5,     6,     0,     2,     0,     7,     0,     8,     9,
1223       10,    11,     0,     0,     0,    12,    13,    14,    15,    16,
1224        0,    17,    18,     0,    19,    20,     0,    21,    22,    23,
1225       24,    25,     4,    26,    27,     5,     6,     0,     2,     0,
1226        7,     0,     8,     9,     0,    11,     0,     0,     0,     0,
1227       13,    14,     0,    16,     0,    17,    18,     0,     0,    20,
1228        0,     0,    22,    23,    24,    25,     4,     0,     0,     5,
1229        6,     0,   216,     0,     7,     0,     8,     9,     1,    11,
1230        0,     2,     0,     0,    13,    14,     0,    16,     0,    17,
1231       18,     0,     0,    20,     0,     0,    22,    23,    24,    25,
1232        0,     0,     0,     0,     0,     0,   311,     0,     3,     4,
1233        0,     0,     5,     6,     0,     0,     0,     7,     0,     8,
1234        9,    10,    11,     0,     0,     0,    12,    13,    14,    15,
1235       16,     0,    17,    18,     0,    19,    20,     0,    21,    22,
1236       23,    24,    25,     0,    26,    27,    47,     2,     0,     0,
1237        0,     0,   207,     0,     0,     0,     0,     0,     0,     0,
1238        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1239        0,     0,     0,     0,     3,     4,     0,     0,     5,     6,
1240        0,     0,     0,     7,     2,     8,     9,    10,    11,     0,
1241        0,     0,    12,    13,    14,    15,    16,     0,    17,    18,
1242        0,    19,    20,     0,    21,    22,    23,    24,    25,     0,
1243        0,     3,     4,   208,     0,     5,     6,     0,     0,     0,
1244        7,     2,     8,     9,    10,    11,   207,     0,     0,    12,
1245       13,    14,    15,    16,     0,    17,    18,     0,    19,    20,
1246        0,    21,    22,    23,    24,    25,     0,     0,     3,     4,
1247        0,   110,     5,     6,     0,     0,     0,     7,     2,     8,
1248        9,    10,    11,   207,     0,     0,    12,    13,    14,    15,
1249       16,     0,    17,    18,     0,    19,    20,     0,    21,    22,
1250       23,    24,    25,     0,     0,     3,     4,   357,     0,     5,
1251        6,     0,     0,     2,     7,     0,     8,     9,    10,    11,
1252        0,     0,     0,    12,    13,    14,    15,    16,     0,    17,
1253       18,     0,    19,    20,     0,    21,    22,    23,    24,    25,
1254        3,     4,     0,     0,     5,     6,     0,     2,     0,     7,
1255        0,     8,     9,    10,    11,     0,     0,     0,    12,    13,
1256       14,    15,    16,     0,    17,    18,     0,    19,    20,     0,
1257       21,    22,    23,    24,    25,     4,     0,     0,     5,     6,
1258        0,     0,     0,     7,     0,     8,     9,     0,    11,     0,
1259        0,     0,     0,    13,    14,     0,    16,     0,    17,    18,
1260        0,     0,    20,     0,     0,    22,    23,    24,    25
1261 };
1262
1263 #define yypact_value_is_default(yystate) \
1264   ((yystate) == (-224))
1265
1266 #define yytable_value_is_error(yytable_value) \
1267   YYID (0)
1268
1269 static const yytype_int16 yycheck[] =
1270 {
1271       29,    56,   116,    90,    33,   111,    35,   120,     0,    43,
1272       49,   117,    33,   202,    35,    29,    78,   176,    33,    48,
1273       35,     0,   196,     3,    54,     3,     3,    56,    27,   252,
1274       78,    69,    76,    76,    76,     3,     3,     3,    30,    31,
1275       69,   147,     3,   141,    36,    37,    90,    39,    49,    92,
1276       92,    76,    69,    24,    25,    71,    73,   119,    59,   218,
1277       39,   123,     3,     4,   151,   152,   153,    92,   107,     3,
1278        4,    74,   134,    76,     3,    54,    72,    78,   301,   108,
1279       76,   110,   130,    71,   113,   115,   134,   116,   136,    69,
1280       89,    69,    69,   122,   108,   110,   202,   126,    78,   113,
1281      148,    78,   141,    69,    72,    72,   107,    73,   122,    69,
1282      223,   209,    92,    59,    85,    86,     8,   146,   119,   120,
1283      149,   169,   123,   124,   116,   146,    77,     3,   149,    87,
1284       71,   146,    78,   134,   149,   183,   115,    71,    76,    88,
1285       69,   247,   176,   249,   318,   251,    76,    79,    80,    78,
1286      179,   310,   181,    76,    92,   314,    26,    70,   347,    76,
1287      181,    90,    92,    76,   179,    70,   181,   196,   255,    92,
1288      209,    76,   234,   119,   120,    92,    70,   123,   124,    70,
1289      209,   196,    76,   231,   218,    76,   234,    36,   134,    28,
1290       29,    30,    70,    69,    43,   209,   225,    73,    76,     3,
1291        4,   230,    78,   232,    53,    72,    69,    78,    91,    76,
1292       73,   250,    83,    84,   328,    78,    65,   232,    70,    70,
1293       22,    23,   223,   329,    76,    76,   332,    69,    71,    78,
1294       69,    73,   179,   234,    73,    70,    75,    70,   286,    70,
1295      288,   347,    70,   291,   292,    76,   301,    70,    76,    90,
1296       70,    70,    92,    76,    92,   284,    76,    76,   250,    70,
1297      299,    70,    70,    69,   293,    76,    69,    76,    76,   284,
1298      299,    69,   301,    18,    19,    73,   310,   223,   293,   308,
1299      314,    72,   154,   155,    69,    76,    69,   316,   234,   318,
1300      338,    43,   156,   157,   308,    90,   158,   159,   160,   161,
1301      334,   162,   163,   318,    90,    74,   335,   299,    90,    90,
1302       70,    91,   304,    76,    90,    66,   364,   365,    92,   367,
1303      335,    70,    74,    75,    74,    77,    69,    74,    70,    41,
1304       92,   379,   380,   165,   164,   108,   328,   284,    90,   368,
1305      369,   370,   166,   168,   392,   167,   293,   124,   377,   308,
1306      304,   116,   127,   368,   369,   370,   126,   232,   387,   388,
1307       39,   390,   377,   134,   393,    -1,    -1,    -1,   397,    -1,
1308      399,   400,   387,   388,    -1,   390,    -1,   406,   393,    -1,
1309       -1,    -1,   397,    -1,   399,   400,    -1,    -1,   335,    -1,
1310       -1,   406,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   151,
1311      152,   153,   154,   155,   156,   157,   158,   159,   160,   161,
1312      162,   163,   164,   165,   166,   167,   168,    -1,    -1,    -1,
1313       -1,   368,   369,   370,   176,    -1,    -1,    -1,    -1,    -1,
1314      377,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1315      387,   388,    -1,   390,    -1,    -1,   393,    -1,    -1,    -1,
1316      397,    -1,   399,   400,    -1,    -1,    -1,    -1,    -1,   406,
1317       -1,    -1,    -1,    -1,    -1,    -1,   218,    -1,    -1,    -1,
1318       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,     5,     6,
1319        7,     8,    10,    11,    12,    13,    14,    15,    16,    17,
1320       -1,    -1,    20,    21,    -1,    -1,    -1,    -1,    -1,    -1,
1321       -1,    28,    29,   255,    31,    32,    33,    34,    35,    36,
1322       37,    38,    39,    40,    -1,    42,    43,    44,    45,    46,
1323       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
1324       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
1325       -1,    -1,    69,    -1,    71,    72,    -1,    -1,    -1,    -1,
1326       77,    78,    79,    80,    81,    82,    -1,    -1,   310,    -1,
1327       -1,    -1,   314,    91,    -1,    92,     3,     4,     5,     6,
1328        7,     8,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1329       -1,    -1,   334,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1330       -1,    28,    29,    -1,    31,    32,    33,    34,    35,    36,
1331       37,    38,    39,    40,    -1,    42,    43,    44,    45,    46,
1332       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
1333       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
1334       -1,    -1,    69,    -1,    71,    72,    -1,    -1,    -1,    -1,
1335       77,    78,    79,    80,    81,    82,     3,     4,     5,     6,
1336        7,     8,    -1,    -1,    -1,    92,    -1,    -1,    -1,    -1,
1337       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1338       -1,    28,    29,    -1,    31,    32,    33,    34,    35,    36,
1339       37,    38,    39,    40,    -1,    42,    43,    44,    45,    46,
1340       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
1341       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
1342       -1,    -1,    69,    -1,    71,    72,    -1,    -1,    -1,    -1,
1343       77,    78,    79,    80,    81,    82,     3,     4,     5,     6,
1344        7,     8,    -1,    -1,    -1,    92,    -1,    -1,    -1,    -1,
1345       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1346       -1,    28,    29,    -1,    31,    32,    33,    34,    35,    36,
1347       37,    38,    39,    40,    -1,    42,    43,    44,    45,    46,
1348       47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
1349       57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
1350       -1,    -1,    69,    -1,    71,    -1,    -1,    -1,    -1,    -1,
1351       77,    78,    79,    80,    81,    82,     3,     4,     5,     6,
1352        7,     8,    -1,    -1,    -1,    92,    -1,    -1,    -1,    -1,
1353       -1,    -1,     3,    -1,     5,     6,     7,     8,    -1,    -1,
1354       -1,    28,    29,    -1,    -1,    -1,    33,    34,    -1,    -1,
1355       37,    38,    39,    -1,    -1,    -1,    43,    28,    29,    46,
1356       47,    48,    -1,    -1,    -1,    -1,    -1,    54,    -1,    -1,
1357       57,    -1,    43,    60,    -1,    -1,    -1,    -1,    -1,    66,
1358       -1,    -1,    69,    -1,    71,    -1,    57,    -1,    -1,    -1,
1359       77,    78,    79,    80,    81,    82,    -1,     3,    69,     5,
1360        6,     7,     8,    -1,    -1,    92,    77,    78,    79,    80,
1361       81,    82,    -1,     3,    -1,     5,     6,     7,     8,    -1,
1362       -1,    92,    28,    29,    -1,    -1,    -1,    -1,    -1,     3,
1363       -1,     5,     6,     7,     8,    -1,    -1,    43,    28,    29,
1364       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1365       -1,    57,    -1,    43,    28,    29,    -1,    -1,    -1,    -1,
1366       -1,    -1,    -1,    69,    -1,    -1,    -1,    57,    -1,    43,
1367       -1,    77,    78,    79,    80,    81,    82,    -1,    -1,    69,
1368       -1,    -1,    -1,    57,     4,    -1,    92,    77,    78,    79,
1369       80,    81,    82,    -1,    -1,    69,    -1,    -1,    -1,    -1,
1370       -1,    -1,    92,    77,    78,    79,    80,    81,    82,    -1,
1371       -1,    31,    32,    -1,    -1,    35,    36,    -1,    92,    -1,
1372       40,    -1,    42,    43,    44,    45,    -1,    -1,    -1,    49,
1373       50,    51,    52,    53,    -1,    55,    56,    -1,    58,    59,
1374       -1,    61,    62,    63,    64,    65,    -1,    -1,    -1,    -1,
1375       -1,    71,     3,     4,     5,     6,     7,     8,    -1,    -1,
1376       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1377       -1,    91,    -1,    -1,    -1,    -1,    -1,    28,    29,    -1,
1378       -1,    32,    -1,    -1,    35,    36,    -1,    -1,    -1,    40,
1379       -1,    42,    43,    -1,    45,    -1,    -1,    -1,    -1,    50,
1380       51,    -1,    53,    -1,    55,    56,    57,    -1,    59,    -1,
1381       -1,    62,    63,    64,    65,    -1,    -1,    -1,    69,    -1,
1382       71,    -1,    -1,    -1,    -1,    -1,    77,    78,    79,    80,
1383       81,    82,     3,     4,     5,     6,     7,     8,    -1,    -1,
1384       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1385        3,    -1,     5,     6,     7,     8,    -1,    28,    29,    -1,
1386       -1,    32,    -1,    -1,    35,    36,    -1,    -1,    -1,    40,
1387       -1,    42,    43,    -1,    45,    28,    29,    -1,    -1,    50,
1388       51,    -1,    53,    -1,    55,    56,    57,    -1,    59,    -1,
1389       43,    62,    63,    64,    65,    -1,    -1,     3,    69,     5,
1390        6,     7,     8,    -1,    57,    -1,    77,    78,    79,    80,
1391       81,    82,    -1,    -1,    -1,    -1,    69,    -1,    71,    72,
1392       -1,    -1,    28,    29,    77,    78,    79,    80,    81,    82,
1393        3,    -1,     5,     6,     7,     8,    -1,    43,    -1,    -1,
1394       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1395       -1,    57,    -1,    -1,    -1,    28,    29,     3,    -1,     5,
1396        6,     7,     8,    69,    -1,    71,    -1,    -1,    -1,    -1,
1397       43,    77,    78,    79,    80,    81,    82,    -1,    -1,    -1,
1398       -1,    -1,    28,    29,    57,    -1,    -1,     3,    -1,     5,
1399        6,     7,     8,    -1,    -1,    -1,    69,    43,    -1,    -1,
1400       -1,    74,    -1,    -1,    77,    78,    79,    80,    81,    82,
1401       -1,    57,    28,    29,     3,    -1,     5,     6,     7,     8,
1402       -1,    -1,    -1,    69,    70,    -1,    -1,    43,    -1,    -1,
1403       -1,    77,    78,    79,    80,    81,    82,    -1,    -1,    28,
1404       29,    57,    -1,    -1,     3,    -1,     5,     6,     7,     8,
1405       -1,    -1,    -1,    69,    43,    -1,    -1,    -1,    74,    -1,
1406       -1,    77,    78,    79,    80,    81,    82,    -1,    57,    28,
1407       29,    -1,    -1,    -1,     3,    -1,     5,     6,     7,     8,
1408       69,    -1,    -1,    -1,    43,    74,    -1,    -1,    77,    78,
1409       79,    80,    81,    82,    -1,    -1,    -1,    -1,    57,    28,
1410       29,    -1,    -1,    -1,     3,    -1,     5,     6,     7,     8,
1411       69,    70,    -1,    -1,    43,    -1,    -1,    -1,    77,    78,
1412       79,    80,    81,    82,    -1,    -1,    -1,    -1,    57,    28,
1413       29,    -1,    -1,    -1,     3,    -1,     5,     6,     7,     8,
1414       69,    70,    -1,    -1,    43,    -1,    -1,    -1,    77,    78,
1415       79,    80,    81,    82,    -1,    -1,    -1,    -1,    57,    28,
1416       29,    -1,    -1,    -1,     3,    -1,     5,     6,     7,     8,
1417       69,    70,    -1,    -1,    43,    -1,    -1,    -1,    77,    78,
1418       79,    80,    81,    82,    -1,    -1,    -1,    -1,    57,    28,
1419       29,     3,    -1,     5,     6,     7,     8,    -1,    -1,    -1,
1420       69,    70,    -1,    -1,    43,    -1,    -1,    -1,    77,    78,
1421       79,    80,    81,    82,    -1,    -1,    28,    29,    57,    -1,
1422       -1,     3,    -1,     5,     6,     7,     8,    -1,    -1,    -1,
1423       69,    43,    -1,    -1,    -1,    -1,    -1,    -1,    77,    78,
1424       79,    80,    81,    82,    -1,    57,    28,    29,     3,    -1,
1425        5,     6,     7,     8,    -1,    -1,    -1,    69,    -1,    -1,
1426       -1,    43,    -1,    -1,    -1,    77,    78,    79,    80,    81,
1427       82,    -1,    -1,    28,    29,    57,    -1,    -1,     3,    -1,
1428        5,     6,     7,     8,    -1,    -1,    -1,    69,    43,    -1,
1429       -1,    -1,    -1,    -1,    -1,    77,    78,    79,    80,    81,
1430       82,    -1,    57,    28,    29,    -1,    -1,    -1,    -1,    -1,
1431       -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,    43,    -1,
1432       -1,    -1,    77,    78,    79,    80,    81,    82,    -1,    -1,
1433        3,     4,    57,    -1,    -1,    -1,     9,    -1,    -1,    -1,
1434       -1,    -1,    -1,    -1,    69,    -1,    -1,    -1,    -1,    -1,
1435       -1,    -1,    77,    78,    79,    80,    81,    82,    31,    32,
1436       -1,    -1,    35,    36,    -1,    -1,    -1,    40,    -1,    42,
1437       43,    44,    45,    -1,    -1,    -1,    49,    50,    51,    52,
1438       53,    -1,    55,    56,    -1,    58,    59,    -1,    61,    62,
1439       63,    64,    65,     4,    -1,    -1,    69,    70,     9,    -1,
1440       73,    -1,    -1,    -1,    -1,    78,    -1,    -1,    -1,    -1,
1441       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1442       31,    32,    -1,    -1,    35,    36,    -1,    -1,    -1,    40,
1443       -1,    42,    43,    44,    45,    -1,    -1,    -1,    49,    50,
1444       51,    52,    53,    -1,    55,    56,    -1,    58,    59,    -1,
1445       61,    62,    63,    64,    65,    -1,     0,     1,    69,    70,
1446        4,    -1,    73,    -1,    -1,    -1,    -1,    78,    -1,    -1,
1447       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1448       -1,    -1,    -1,    -1,    -1,    -1,    -1,    31,    32,    -1,
1449       -1,    35,    36,    -1,     4,    -1,    40,    -1,    42,    43,
1450       44,    45,    -1,    -1,    -1,    49,    50,    51,    52,    53,
1451       -1,    55,    56,    -1,    58,    59,    -1,    61,    62,    63,
1452       64,    65,    32,    67,    68,    35,    36,    -1,     4,    -1,
1453       40,    -1,    42,    43,    -1,    45,    -1,    -1,    -1,    -1,
1454       50,    51,    -1,    53,    -1,    55,    56,    -1,    -1,    59,
1455       -1,    -1,    62,    63,    64,    65,    32,    -1,    -1,    35,
1456       36,    -1,    72,    -1,    40,    -1,    42,    43,     1,    45,
1457       -1,     4,    -1,    -1,    50,    51,    -1,    53,    -1,    55,
1458       56,    -1,    -1,    59,    -1,    -1,    62,    63,    64,    65,
1459       -1,    -1,    -1,    -1,    -1,    -1,    72,    -1,    31,    32,
1460       -1,    -1,    35,    36,    -1,    -1,    -1,    40,    -1,    42,
1461       43,    44,    45,    -1,    -1,    -1,    49,    50,    51,    52,
1462       53,    -1,    55,    56,    -1,    58,    59,    -1,    61,    62,
1463       63,    64,    65,    -1,    67,    68,     3,     4,    -1,    -1,
1464       -1,    -1,     9,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1465       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1466       -1,    -1,    -1,    -1,    31,    32,    -1,    -1,    35,    36,
1467       -1,    -1,    -1,    40,     4,    42,    43,    44,    45,    -1,
1468       -1,    -1,    49,    50,    51,    52,    53,    -1,    55,    56,
1469       -1,    58,    59,    -1,    61,    62,    63,    64,    65,    -1,
1470       -1,    31,    32,    70,    -1,    35,    36,    -1,    -1,    -1,
1471       40,     4,    42,    43,    44,    45,     9,    -1,    -1,    49,
1472       50,    51,    52,    53,    -1,    55,    56,    -1,    58,    59,
1473       -1,    61,    62,    63,    64,    65,    -1,    -1,    31,    32,
1474       -1,    71,    35,    36,    -1,    -1,    -1,    40,     4,    42,
1475       43,    44,    45,     9,    -1,    -1,    49,    50,    51,    52,
1476       53,    -1,    55,    56,    -1,    58,    59,    -1,    61,    62,
1477       63,    64,    65,    -1,    -1,    31,    32,    70,    -1,    35,
1478       36,    -1,    -1,     4,    40,    -1,    42,    43,    44,    45,
1479       -1,    -1,    -1,    49,    50,    51,    52,    53,    -1,    55,
1480       56,    -1,    58,    59,    -1,    61,    62,    63,    64,    65,
1481       31,    32,    -1,    -1,    35,    36,    -1,     4,    -1,    40,
1482       -1,    42,    43,    44,    45,    -1,    -1,    -1,    49,    50,
1483       51,    52,    53,    -1,    55,    56,    -1,    58,    59,    -1,
1484       61,    62,    63,    64,    65,    32,    -1,    -1,    35,    36,
1485       -1,    -1,    -1,    40,    -1,    42,    43,    -1,    45,    -1,
1486       -1,    -1,    -1,    50,    51,    -1,    53,    -1,    55,    56,
1487       -1,    -1,    59,    -1,    -1,    62,    63,    64,    65
1488 };
1489
1490 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1491    symbol of state STATE-NUM.  */
1492 static const yytype_uint8 yystos[] =
1493 {
1494        0,     1,     4,    31,    32,    35,    36,    40,    42,    43,
1495       44,    45,    49,    50,    51,    52,    53,    55,    56,    58,
1496       59,    61,    62,    63,    64,    65,    67,    68,   118,   119,
1497      122,   123,   124,   125,   131,   132,   136,   137,   148,   160,
1498      161,   162,   164,   165,   166,   167,   168,     3,    69,    78,
1499       92,    96,   120,   121,   138,   139,   140,   119,   119,    71,
1500       96,    97,   148,    71,    97,   119,   119,     0,   161,    69,
1501        5,     6,     7,     8,    28,    29,    43,    57,    69,    77,
1502       78,    79,    80,    81,    82,    94,    95,    96,    98,   100,
1503      101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
1504      111,   112,   113,   117,   138,   136,   140,   141,    76,    92,
1505       71,    91,   118,   119,   153,   163,    69,    73,   139,   123,
1506      126,   127,   128,   136,    71,   133,   134,    71,    96,   144,
1507       69,   100,   100,    69,    69,   100,    43,   100,   113,   114,
1508      116,   128,   145,     8,    28,    29,    30,    69,    73,    75,
1509      102,    78,    83,    84,    79,    80,    18,    19,    24,    25,
1510       85,    86,    22,    23,    77,    87,    88,    26,    27,    89,
1511       70,   136,   140,   121,   138,    33,    34,    37,    38,    39,
1512       46,    47,    48,    54,    60,    66,    72,    92,    96,    97,
1513      116,   118,   148,   151,   152,   153,   154,   155,   156,   157,
1514      158,   159,    71,   114,   149,   118,   153,     9,    70,   119,
1515      142,   143,   144,    74,   114,   128,    72,   127,    90,   129,
1516      130,   138,   128,   126,    72,    76,    96,   135,   133,    70,
1517       76,    43,    71,   145,    69,   116,    10,    11,    12,    13,
1518       14,    15,    16,    17,    20,    21,    91,   115,    70,    76,
1519       69,    73,   140,   146,   147,    70,    97,    70,    99,   114,
1520      116,    97,   102,   102,   102,   103,   103,   104,   104,   105,
1521      105,   105,   105,   106,   106,   107,   108,   109,   110,   111,
1522      116,    92,   117,    92,    90,   151,    69,    97,    69,    92,
1523      116,    69,    69,    90,    92,    72,   155,   149,   150,    69,
1524      138,   140,   146,    70,    76,    70,    74,   117,    76,    92,
1525       90,    72,    72,   135,    91,    72,    76,    96,   154,    70,
1526      114,   114,    70,   142,   146,    74,   114,   147,    69,    73,
1527      102,    70,    76,    74,    90,    90,   151,    66,    92,   116,
1528       92,   116,    92,   116,   116,   151,    72,    76,   143,   130,
1529      117,   117,    72,    72,    70,    70,    74,    70,   142,    74,
1530      114,   114,   113,   151,    69,    92,   116,    92,    70,    70,
1531       70,    72,   149,    70,    70,    74,   116,    70,   116,    92,
1532       92,   116,   151,   151,   151,    70,   151,    70,    70,   116,
1533       70,   116,    92,    41,    92,   151,   151,    70,   151,    70,
1534       70,   116,   151,   151,   151,   151,    70,   151
1535 };
1536
1537 #define yyerrok         (yyerrstatus = 0)
1538 #define yyclearin       (yychar = YYEMPTY)
1539 #define YYEMPTY         (-2)
1540 #define YYEOF           0
1541
1542 #define YYACCEPT        goto yyacceptlab
1543 #define YYABORT         goto yyabortlab
1544 #define YYERROR         goto yyerrorlab
1545
1546
1547 /* Like YYERROR except do call yyerror.  This remains here temporarily
1548    to ease the transition to the new meaning of YYERROR, for GCC.
1549    Once GCC version 2 has supplanted version 1, this can go.  However,
1550    YYFAIL appears to be in use.  Nevertheless, it is formally deprecated
1551    in Bison 2.4.2's NEWS entry, where a plan to phase it out is
1552    discussed.  */
1553
1554 #define YYFAIL          goto yyerrlab
1555 #if defined YYFAIL
1556   /* This is here to suppress warnings from the GCC cpp's
1557      -Wunused-macros.  Normally we don't worry about that warning, but
1558      some users do, and we want to make it easy for users to remove
1559      YYFAIL uses, which will produce warnings from Bison 2.5.  */
1560 #endif
1561
1562 #define YYRECOVERING()  (!!yyerrstatus)
1563
1564 #define YYBACKUP(Token, Value)                                  \
1565 do                                                              \
1566   if (yychar == YYEMPTY && yylen == 1)                          \
1567     {                                                           \
1568       yychar = (Token);                                         \
1569       yylval = (Value);                                         \
1570       YYPOPSTACK (1);                                           \
1571       goto yybackup;                                            \
1572     }                                                           \
1573   else                                                          \
1574     {                                                           \
1575       yyerror (scanner, YY_("syntax error: cannot back up")); \
1576       YYERROR;                                                  \
1577     }                                                           \
1578 while (YYID (0))
1579
1580
1581 #define YYTERROR        1
1582 #define YYERRCODE       256
1583
1584
1585 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1586    If N is 0, then set CURRENT to the empty location which ends
1587    the previous symbol: RHS[0] (always defined).  */
1588
1589 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1590 #ifndef YYLLOC_DEFAULT
1591 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
1592     do                                                                  \
1593       if (YYID (N))                                                    \
1594         {                                                               \
1595           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
1596           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
1597           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
1598           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
1599         }                                                               \
1600       else                                                              \
1601         {                                                               \
1602           (Current).first_line   = (Current).last_line   =              \
1603             YYRHSLOC (Rhs, 0).last_line;                                \
1604           (Current).first_column = (Current).last_column =              \
1605             YYRHSLOC (Rhs, 0).last_column;                              \
1606         }                                                               \
1607     while (YYID (0))
1608 #endif
1609
1610
1611 /* This macro is provided for backward compatibility. */
1612
1613 #ifndef YY_LOCATION_PRINT
1614 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1615 #endif
1616
1617
1618 /* YYLEX -- calling `yylex' with the right arguments.  */
1619
1620 #ifdef YYLEX_PARAM
1621 # define YYLEX yylex (YYLEX_PARAM)
1622 #else
1623 # define YYLEX yylex (scanner)
1624 #endif
1625
1626 /* Enable debugging if requested.  */
1627 #if YYDEBUG
1628
1629 # ifndef YYFPRINTF
1630 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1631 #  define YYFPRINTF fprintf
1632 # endif
1633
1634 # define YYDPRINTF(Args)                        \
1635 do {                                            \
1636   if (yydebug)                                  \
1637     YYFPRINTF Args;                             \
1638 } while (YYID (0))
1639
1640 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
1641 do {                                                                      \
1642   if (yydebug)                                                            \
1643     {                                                                     \
1644       YYFPRINTF (stderr, "%s ", Title);                                   \
1645       yy_symbol_print (stderr,                                            \
1646                   Type, Value, scanner); \
1647       YYFPRINTF (stderr, "\n");                                           \
1648     }                                                                     \
1649 } while (YYID (0))
1650
1651
1652 /*--------------------------------.
1653 | Print this symbol on YYOUTPUT.  |
1654 `--------------------------------*/
1655
1656 /*ARGSUSED*/
1657 #if (defined __STDC__ || defined __C99__FUNC__ \
1658      || defined __cplusplus || defined _MSC_VER)
1659 static void
1660 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, GISourceScanner* scanner)
1661 #else
1662 static void
1663 yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner)
1664     FILE *yyoutput;
1665     int yytype;
1666     YYSTYPE const * const yyvaluep;
1667     GISourceScanner* scanner;
1668 #endif
1669 {
1670   if (!yyvaluep)
1671     return;
1672   YYUSE (scanner);
1673 # ifdef YYPRINT
1674   if (yytype < YYNTOKENS)
1675     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1676 # else
1677   YYUSE (yyoutput);
1678 # endif
1679   switch (yytype)
1680     {
1681       default:
1682         break;
1683     }
1684 }
1685
1686
1687 /*--------------------------------.
1688 | Print this symbol on YYOUTPUT.  |
1689 `--------------------------------*/
1690
1691 #if (defined __STDC__ || defined __C99__FUNC__ \
1692      || defined __cplusplus || defined _MSC_VER)
1693 static void
1694 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, GISourceScanner* scanner)
1695 #else
1696 static void
1697 yy_symbol_print (yyoutput, yytype, yyvaluep, scanner)
1698     FILE *yyoutput;
1699     int yytype;
1700     YYSTYPE const * const yyvaluep;
1701     GISourceScanner* scanner;
1702 #endif
1703 {
1704   if (yytype < YYNTOKENS)
1705     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1706   else
1707     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1708
1709   yy_symbol_value_print (yyoutput, yytype, yyvaluep, scanner);
1710   YYFPRINTF (yyoutput, ")");
1711 }
1712
1713 /*------------------------------------------------------------------.
1714 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1715 | TOP (included).                                                   |
1716 `------------------------------------------------------------------*/
1717
1718 #if (defined __STDC__ || defined __C99__FUNC__ \
1719      || defined __cplusplus || defined _MSC_VER)
1720 static void
1721 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1722 #else
1723 static void
1724 yy_stack_print (yybottom, yytop)
1725     yytype_int16 *yybottom;
1726     yytype_int16 *yytop;
1727 #endif
1728 {
1729   YYFPRINTF (stderr, "Stack now");
1730   for (; yybottom <= yytop; yybottom++)
1731     {
1732       int yybot = *yybottom;
1733       YYFPRINTF (stderr, " %d", yybot);
1734     }
1735   YYFPRINTF (stderr, "\n");
1736 }
1737
1738 # define YY_STACK_PRINT(Bottom, Top)                            \
1739 do {                                                            \
1740   if (yydebug)                                                  \
1741     yy_stack_print ((Bottom), (Top));                           \
1742 } while (YYID (0))
1743
1744
1745 /*------------------------------------------------.
1746 | Report that the YYRULE is going to be reduced.  |
1747 `------------------------------------------------*/
1748
1749 #if (defined __STDC__ || defined __C99__FUNC__ \
1750      || defined __cplusplus || defined _MSC_VER)
1751 static void
1752 yy_reduce_print (YYSTYPE *yyvsp, int yyrule, GISourceScanner* scanner)
1753 #else
1754 static void
1755 yy_reduce_print (yyvsp, yyrule, scanner)
1756     YYSTYPE *yyvsp;
1757     int yyrule;
1758     GISourceScanner* scanner;
1759 #endif
1760 {
1761   int yynrhs = yyr2[yyrule];
1762   int yyi;
1763   unsigned long int yylno = yyrline[yyrule];
1764   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1765              yyrule - 1, yylno);
1766   /* The symbols being reduced.  */
1767   for (yyi = 0; yyi < yynrhs; yyi++)
1768     {
1769       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1770       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1771                        &(yyvsp[(yyi + 1) - (yynrhs)])
1772                                        , scanner);
1773       YYFPRINTF (stderr, "\n");
1774     }
1775 }
1776
1777 # define YY_REDUCE_PRINT(Rule)          \
1778 do {                                    \
1779   if (yydebug)                          \
1780     yy_reduce_print (yyvsp, Rule, scanner); \
1781 } while (YYID (0))
1782
1783 /* Nonzero means print parse trace.  It is left uninitialized so that
1784    multiple parsers can coexist.  */
1785 int yydebug;
1786 #else /* !YYDEBUG */
1787 # define YYDPRINTF(Args)
1788 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1789 # define YY_STACK_PRINT(Bottom, Top)
1790 # define YY_REDUCE_PRINT(Rule)
1791 #endif /* !YYDEBUG */
1792
1793
1794 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1795 #ifndef YYINITDEPTH
1796 # define YYINITDEPTH 200
1797 #endif
1798
1799 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1800    if the built-in stack extension method is used).
1801
1802    Do not make this value too large; the results are undefined if
1803    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1804    evaluated with infinite-precision integer arithmetic.  */
1805
1806 #ifndef YYMAXDEPTH
1807 # define YYMAXDEPTH 10000
1808 #endif
1809
1810
1811 #if YYERROR_VERBOSE
1812
1813 # ifndef yystrlen
1814 #  if defined __GLIBC__ && defined _STRING_H
1815 #   define yystrlen strlen
1816 #  else
1817 /* Return the length of YYSTR.  */
1818 #if (defined __STDC__ || defined __C99__FUNC__ \
1819      || defined __cplusplus || defined _MSC_VER)
1820 static YYSIZE_T
1821 yystrlen (const char *yystr)
1822 #else
1823 static YYSIZE_T
1824 yystrlen (yystr)
1825     const char *yystr;
1826 #endif
1827 {
1828   YYSIZE_T yylen;
1829   for (yylen = 0; yystr[yylen]; yylen++)
1830     continue;
1831   return yylen;
1832 }
1833 #  endif
1834 # endif
1835
1836 # ifndef yystpcpy
1837 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1838 #   define yystpcpy stpcpy
1839 #  else
1840 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1841    YYDEST.  */
1842 #if (defined __STDC__ || defined __C99__FUNC__ \
1843      || defined __cplusplus || defined _MSC_VER)
1844 static char *
1845 yystpcpy (char *yydest, const char *yysrc)
1846 #else
1847 static char *
1848 yystpcpy (yydest, yysrc)
1849     char *yydest;
1850     const char *yysrc;
1851 #endif
1852 {
1853   char *yyd = yydest;
1854   const char *yys = yysrc;
1855
1856   while ((*yyd++ = *yys++) != '\0')
1857     continue;
1858
1859   return yyd - 1;
1860 }
1861 #  endif
1862 # endif
1863
1864 # ifndef yytnamerr
1865 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1866    quotes and backslashes, so that it's suitable for yyerror.  The
1867    heuristic is that double-quoting is unnecessary unless the string
1868    contains an apostrophe, a comma, or backslash (other than
1869    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1870    null, do not copy; instead, return the length of what the result
1871    would have been.  */
1872 static YYSIZE_T
1873 yytnamerr (char *yyres, const char *yystr)
1874 {
1875   if (*yystr == '"')
1876     {
1877       YYSIZE_T yyn = 0;
1878       char const *yyp = yystr;
1879
1880       for (;;)
1881         switch (*++yyp)
1882           {
1883           case '\'':
1884           case ',':
1885             goto do_not_strip_quotes;
1886
1887           case '\\':
1888             if (*++yyp != '\\')
1889               goto do_not_strip_quotes;
1890             /* Fall through.  */
1891           default:
1892             if (yyres)
1893               yyres[yyn] = *yyp;
1894             yyn++;
1895             break;
1896
1897           case '"':
1898             if (yyres)
1899               yyres[yyn] = '\0';
1900             return yyn;
1901           }
1902     do_not_strip_quotes: ;
1903     }
1904
1905   if (! yyres)
1906     return yystrlen (yystr);
1907
1908   return yystpcpy (yyres, yystr) - yyres;
1909 }
1910 # endif
1911
1912 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1913    about the unexpected token YYTOKEN for the state stack whose top is
1914    YYSSP.
1915
1916    Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
1917    not large enough to hold the message.  In that case, also set
1918    *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
1919    required number of bytes is too large to store.  */
1920 static int
1921 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1922                 yytype_int16 *yyssp, int yytoken)
1923 {
1924   YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1925   YYSIZE_T yysize = yysize0;
1926   YYSIZE_T yysize1;
1927   enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1928   /* Internationalized format string. */
1929   const char *yyformat = 0;
1930   /* Arguments of yyformat. */
1931   char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1932   /* Number of reported tokens (one for the "unexpected", one per
1933      "expected"). */
1934   int yycount = 0;
1935
1936   /* There are many possibilities here to consider:
1937      - Assume YYFAIL is not used.  It's too flawed to consider.  See
1938        <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1939        for details.  YYERROR is fine as it does not invoke this
1940        function.
1941      - If this state is a consistent state with a default action, then
1942        the only way this function was invoked is if the default action
1943        is an error action.  In that case, don't check for expected
1944        tokens because there are none.
1945      - The only way there can be no lookahead present (in yychar) is if
1946        this state is a consistent state with a default action.  Thus,
1947        detecting the absence of a lookahead is sufficient to determine
1948        that there is no unexpected or expected token to report.  In that
1949        case, just report a simple "syntax error".
1950      - Don't assume there isn't a lookahead just because this state is a
1951        consistent state with a default action.  There might have been a
1952        previous inconsistent state, consistent state with a non-default
1953        action, or user semantic action that manipulated yychar.
1954      - Of course, the expected token list depends on states to have
1955        correct lookahead information, and it depends on the parser not
1956        to perform extra reductions after fetching a lookahead from the
1957        scanner and before detecting a syntax error.  Thus, state merging
1958        (from LALR or IELR) and default reductions corrupt the expected
1959        token list.  However, the list is correct for canonical LR with
1960        one exception: it will still contain any token that will not be
1961        accepted due to an error action in a later state.
1962   */
1963   if (yytoken != YYEMPTY)
1964     {
1965       int yyn = yypact[*yyssp];
1966       yyarg[yycount++] = yytname[yytoken];
1967       if (!yypact_value_is_default (yyn))
1968         {
1969           /* Start YYX at -YYN if negative to avoid negative indexes in
1970              YYCHECK.  In other words, skip the first -YYN actions for
1971              this state because they are default actions.  */
1972           int yyxbegin = yyn < 0 ? -yyn : 0;
1973           /* Stay within bounds of both yycheck and yytname.  */
1974           int yychecklim = YYLAST - yyn + 1;
1975           int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1976           int yyx;
1977
1978           for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1979             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1980                 && !yytable_value_is_error (yytable[yyx + yyn]))
1981               {
1982                 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1983                   {
1984                     yycount = 1;
1985                     yysize = yysize0;
1986                     break;
1987                   }
1988                 yyarg[yycount++] = yytname[yyx];
1989                 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1990                 if (! (yysize <= yysize1
1991                        && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1992                   return 2;
1993                 yysize = yysize1;
1994               }
1995         }
1996     }
1997
1998   switch (yycount)
1999     {
2000 # define YYCASE_(N, S)                      \
2001       case N:                               \
2002         yyformat = S;                       \
2003       break
2004       YYCASE_(0, YY_("syntax error"));
2005       YYCASE_(1, YY_("syntax error, unexpected %s"));
2006       YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
2007       YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
2008       YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
2009       YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
2010 # undef YYCASE_
2011     }
2012
2013   yysize1 = yysize + yystrlen (yyformat);
2014   if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
2015     return 2;
2016   yysize = yysize1;
2017
2018   if (*yymsg_alloc < yysize)
2019     {
2020       *yymsg_alloc = 2 * yysize;
2021       if (! (yysize <= *yymsg_alloc
2022              && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
2023         *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
2024       return 1;
2025     }
2026
2027   /* Avoid sprintf, as that infringes on the user's name space.
2028      Don't have undefined behavior even if the translation
2029      produced a string with the wrong number of "%s"s.  */
2030   {
2031     char *yyp = *yymsg;
2032     int yyi = 0;
2033     while ((*yyp = *yyformat) != '\0')
2034       if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
2035         {
2036           yyp += yytnamerr (yyp, yyarg[yyi++]);
2037           yyformat += 2;
2038         }
2039       else
2040         {
2041           yyp++;
2042           yyformat++;
2043         }
2044   }
2045   return 0;
2046 }
2047 #endif /* YYERROR_VERBOSE */
2048
2049 /*-----------------------------------------------.
2050 | Release the memory associated to this symbol.  |
2051 `-----------------------------------------------*/
2052
2053 /*ARGSUSED*/
2054 #if (defined __STDC__ || defined __C99__FUNC__ \
2055      || defined __cplusplus || defined _MSC_VER)
2056 static void
2057 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, GISourceScanner* scanner)
2058 #else
2059 static void
2060 yydestruct (yymsg, yytype, yyvaluep, scanner)
2061     const char *yymsg;
2062     int yytype;
2063     YYSTYPE *yyvaluep;
2064     GISourceScanner* scanner;
2065 #endif
2066 {
2067   YYUSE (yyvaluep);
2068   YYUSE (scanner);
2069
2070   if (!yymsg)
2071     yymsg = "Deleting";
2072   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2073
2074   switch (yytype)
2075     {
2076
2077       default:
2078         break;
2079     }
2080 }
2081
2082
2083 /* Prevent warnings from -Wmissing-prototypes.  */
2084 #ifdef YYPARSE_PARAM
2085 #if defined __STDC__ || defined __cplusplus
2086 int yyparse (void *YYPARSE_PARAM);
2087 #else
2088 int yyparse ();
2089 #endif
2090 #else /* ! YYPARSE_PARAM */
2091 #if defined __STDC__ || defined __cplusplus
2092 int yyparse (GISourceScanner* scanner);
2093 #else
2094 int yyparse ();
2095 #endif
2096 #endif /* ! YYPARSE_PARAM */
2097
2098
2099 /* The lookahead symbol.  */
2100 int yychar;
2101
2102 /* The semantic value of the lookahead symbol.  */
2103 YYSTYPE yylval;
2104
2105 /* Number of syntax errors so far.  */
2106 int yynerrs;
2107
2108
2109 /*----------.
2110 | yyparse.  |
2111 `----------*/
2112
2113 #ifdef YYPARSE_PARAM
2114 #if (defined __STDC__ || defined __C99__FUNC__ \
2115      || defined __cplusplus || defined _MSC_VER)
2116 int
2117 yyparse (void *YYPARSE_PARAM)
2118 #else
2119 int
2120 yyparse (YYPARSE_PARAM)
2121     void *YYPARSE_PARAM;
2122 #endif
2123 #else /* ! YYPARSE_PARAM */
2124 #if (defined __STDC__ || defined __C99__FUNC__ \
2125      || defined __cplusplus || defined _MSC_VER)
2126 int
2127 yyparse (GISourceScanner* scanner)
2128 #else
2129 int
2130 yyparse (scanner)
2131     GISourceScanner* scanner;
2132 #endif
2133 #endif
2134 {
2135     int yystate;
2136     /* Number of tokens to shift before error messages enabled.  */
2137     int yyerrstatus;
2138
2139     /* The stacks and their tools:
2140        `yyss': related to states.
2141        `yyvs': related to semantic values.
2142
2143        Refer to the stacks thru separate pointers, to allow yyoverflow
2144        to reallocate them elsewhere.  */
2145
2146     /* The state stack.  */
2147     yytype_int16 yyssa[YYINITDEPTH];
2148     yytype_int16 *yyss;
2149     yytype_int16 *yyssp;
2150
2151     /* The semantic value stack.  */
2152     YYSTYPE yyvsa[YYINITDEPTH];
2153     YYSTYPE *yyvs;
2154     YYSTYPE *yyvsp;
2155
2156     YYSIZE_T yystacksize;
2157
2158   int yyn;
2159   int yyresult;
2160   /* Lookahead token as an internal (translated) token number.  */
2161   int yytoken;
2162   /* The variables used to return semantic value and location from the
2163      action routines.  */
2164   YYSTYPE yyval;
2165
2166 #if YYERROR_VERBOSE
2167   /* Buffer for error messages, and its allocated size.  */
2168   char yymsgbuf[128];
2169   char *yymsg = yymsgbuf;
2170   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2171 #endif
2172
2173 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
2174
2175   /* The number of symbols on the RHS of the reduced rule.
2176      Keep to zero when no symbol should be popped.  */
2177   int yylen = 0;
2178
2179   yytoken = 0;
2180   yyss = yyssa;
2181   yyvs = yyvsa;
2182   yystacksize = YYINITDEPTH;
2183
2184   YYDPRINTF ((stderr, "Starting parse\n"));
2185
2186   yystate = 0;
2187   yyerrstatus = 0;
2188   yynerrs = 0;
2189   yychar = YYEMPTY; /* Cause a token to be read.  */
2190
2191   /* Initialize stack pointers.
2192      Waste one element of value and location stack
2193      so that they stay on the same level as the state stack.
2194      The wasted elements are never initialized.  */
2195   yyssp = yyss;
2196   yyvsp = yyvs;
2197
2198   goto yysetstate;
2199
2200 /*------------------------------------------------------------.
2201 | yynewstate -- Push a new state, which is found in yystate.  |
2202 `------------------------------------------------------------*/
2203  yynewstate:
2204   /* In all cases, when you get here, the value and location stacks
2205      have just been pushed.  So pushing a state here evens the stacks.  */
2206   yyssp++;
2207
2208  yysetstate:
2209   *yyssp = yystate;
2210
2211   if (yyss + yystacksize - 1 <= yyssp)
2212     {
2213       /* Get the current used size of the three stacks, in elements.  */
2214       YYSIZE_T yysize = yyssp - yyss + 1;
2215
2216 #ifdef yyoverflow
2217       {
2218         /* Give user a chance to reallocate the stack.  Use copies of
2219            these so that the &'s don't force the real ones into
2220            memory.  */
2221         YYSTYPE *yyvs1 = yyvs;
2222         yytype_int16 *yyss1 = yyss;
2223
2224         /* Each stack pointer address is followed by the size of the
2225            data in use in that stack, in bytes.  This used to be a
2226            conditional around just the two extra args, but that might
2227            be undefined if yyoverflow is a macro.  */
2228         yyoverflow (YY_("memory exhausted"),
2229                     &yyss1, yysize * sizeof (*yyssp),
2230                     &yyvs1, yysize * sizeof (*yyvsp),
2231                     &yystacksize);
2232
2233         yyss = yyss1;
2234         yyvs = yyvs1;
2235       }
2236 #else /* no yyoverflow */
2237 # ifndef YYSTACK_RELOCATE
2238       goto yyexhaustedlab;
2239 # else
2240       /* Extend the stack our own way.  */
2241       if (YYMAXDEPTH <= yystacksize)
2242         goto yyexhaustedlab;
2243       yystacksize *= 2;
2244       if (YYMAXDEPTH < yystacksize)
2245         yystacksize = YYMAXDEPTH;
2246
2247       {
2248         yytype_int16 *yyss1 = yyss;
2249         union yyalloc *yyptr =
2250           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2251         if (! yyptr)
2252           goto yyexhaustedlab;
2253         YYSTACK_RELOCATE (yyss_alloc, yyss);
2254         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2255 #  undef YYSTACK_RELOCATE
2256         if (yyss1 != yyssa)
2257           YYSTACK_FREE (yyss1);
2258       }
2259 # endif
2260 #endif /* no yyoverflow */
2261
2262       yyssp = yyss + yysize - 1;
2263       yyvsp = yyvs + yysize - 1;
2264
2265       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2266                   (unsigned long int) yystacksize));
2267
2268       if (yyss + yystacksize - 1 <= yyssp)
2269         YYABORT;
2270     }
2271
2272   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2273
2274   if (yystate == YYFINAL)
2275     YYACCEPT;
2276
2277   goto yybackup;
2278
2279 /*-----------.
2280 | yybackup.  |
2281 `-----------*/
2282 yybackup:
2283
2284   /* Do appropriate processing given the current state.  Read a
2285      lookahead token if we need one and don't already have one.  */
2286
2287   /* First try to decide what to do without reference to lookahead token.  */
2288   yyn = yypact[yystate];
2289   if (yypact_value_is_default (yyn))
2290     goto yydefault;
2291
2292   /* Not known => get a lookahead token if don't already have one.  */
2293
2294   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
2295   if (yychar == YYEMPTY)
2296     {
2297       YYDPRINTF ((stderr, "Reading a token: "));
2298       yychar = YYLEX;
2299     }
2300
2301   if (yychar <= YYEOF)
2302     {
2303       yychar = yytoken = YYEOF;
2304       YYDPRINTF ((stderr, "Now at end of input.\n"));
2305     }
2306   else
2307     {
2308       yytoken = YYTRANSLATE (yychar);
2309       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2310     }
2311
2312   /* If the proper action on seeing token YYTOKEN is to reduce or to
2313      detect an error, take that action.  */
2314   yyn += yytoken;
2315   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2316     goto yydefault;
2317   yyn = yytable[yyn];
2318   if (yyn <= 0)
2319     {
2320       if (yytable_value_is_error (yyn))
2321         goto yyerrlab;
2322       yyn = -yyn;
2323       goto yyreduce;
2324     }
2325
2326   /* Count tokens shifted since error; after three, turn off error
2327      status.  */
2328   if (yyerrstatus)
2329     yyerrstatus--;
2330
2331   /* Shift the lookahead token.  */
2332   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2333
2334   /* Discard the shifted token.  */
2335   yychar = YYEMPTY;
2336
2337   yystate = yyn;
2338   *++yyvsp = yylval;
2339
2340   goto yynewstate;
2341
2342
2343 /*-----------------------------------------------------------.
2344 | yydefault -- do the default action for the current state.  |
2345 `-----------------------------------------------------------*/
2346 yydefault:
2347   yyn = yydefact[yystate];
2348   if (yyn == 0)
2349     goto yyerrlab;
2350   goto yyreduce;
2351
2352
2353 /*-----------------------------.
2354 | yyreduce -- Do a reduction.  |
2355 `-----------------------------*/
2356 yyreduce:
2357   /* yyn is the number of a rule to reduce with.  */
2358   yylen = yyr2[yyn];
2359
2360   /* If YYLEN is nonzero, implement the default value of the action:
2361      `$$ = $1'.
2362
2363      Otherwise, the following line sets YYVAL to garbage.
2364      This behavior is undocumented and Bison
2365      users should not rely upon it.  Assigning to YYVAL
2366      unconditionally makes the parser a bit smaller, and it avoids a
2367      GCC warning that YYVAL may be used uninitialized.  */
2368   yyval = yyvsp[1-yylen];
2369
2370
2371   YY_REDUCE_PRINT (yyn);
2372   switch (yyn)
2373     {
2374         case 2:
2375
2376 /* Line 1806 of yacc.c  */
2377 #line 224 "scannerparser.y"
2378     {
2379                 (yyval.symbol) = g_hash_table_lookup (const_table, (yyvsp[(1) - (1)].str));
2380                 if ((yyval.symbol) == NULL) {
2381                         (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2382                 } else {
2383                         (yyval.symbol) = gi_source_symbol_ref ((yyval.symbol));
2384                 }
2385           }
2386     break;
2387
2388   case 3:
2389
2390 /* Line 1806 of yacc.c  */
2391 #line 233 "scannerparser.y"
2392     {
2393                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2394                 (yyval.symbol)->const_int_set = TRUE;
2395                 if (g_str_has_prefix (yytext, "0x") && strlen (yytext) > 2) {
2396                         (yyval.symbol)->const_int = g_ascii_strtoll (yytext + 2, NULL, 16);
2397                 } else if (g_str_has_prefix (yytext, "0") && strlen (yytext) > 1) {
2398                         (yyval.symbol)->const_int = g_ascii_strtoll (yytext + 1, NULL, 8);
2399                 } else {
2400                         (yyval.symbol)->const_int = g_ascii_strtoll (yytext, NULL, 10);
2401                 }
2402           }
2403     break;
2404
2405   case 4:
2406
2407 /* Line 1806 of yacc.c  */
2408 #line 245 "scannerparser.y"
2409     {
2410                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2411                 (yyval.symbol)->const_int_set = TRUE;
2412                 (yyval.symbol)->const_int = g_utf8_get_char(yytext + 1);
2413           }
2414     break;
2415
2416   case 5:
2417
2418 /* Line 1806 of yacc.c  */
2419 #line 251 "scannerparser.y"
2420     {
2421                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2422                 (yyval.symbol)->const_double_set = TRUE;
2423                 (yyval.symbol)->const_double = 0.0;
2424         sscanf (yytext, "%lf", &((yyval.symbol)->const_double));
2425           }
2426     break;
2427
2428   case 7:
2429
2430 /* Line 1806 of yacc.c  */
2431 #line 259 "scannerparser.y"
2432     {
2433                 (yyval.symbol) = (yyvsp[(2) - (3)].symbol);
2434           }
2435     break;
2436
2437   case 8:
2438
2439 /* Line 1806 of yacc.c  */
2440 #line 263 "scannerparser.y"
2441     {
2442                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2443           }
2444     break;
2445
2446   case 9:
2447
2448 /* Line 1806 of yacc.c  */
2449 #line 271 "scannerparser.y"
2450     {
2451                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2452                 yytext[strlen (yytext) - 1] = '\0';
2453                 (yyval.symbol)->const_string = parse_c_string_literal (yytext + 1);
2454                 if (!g_utf8_validate ((yyval.symbol)->const_string, -1, NULL))
2455                   {
2456 #if 0
2457                     g_warning ("Ignoring non-UTF-8 constant string \"%s\"", yytext + 1);
2458 #endif
2459                     g_free((yyval.symbol)->const_string);
2460                     (yyval.symbol)->const_string = NULL;
2461                   }
2462
2463           }
2464     break;
2465
2466   case 10:
2467
2468 /* Line 1806 of yacc.c  */
2469 #line 286 "scannerparser.y"
2470     {
2471                 char *strings, *string2;
2472                 (yyval.symbol) = (yyvsp[(1) - (2)].symbol);
2473                 yytext[strlen (yytext) - 1] = '\0';
2474                 string2 = parse_c_string_literal (yytext + 1);
2475                 strings = g_strconcat ((yyval.symbol)->const_string, string2, NULL);
2476                 g_free ((yyval.symbol)->const_string);
2477                 g_free (string2);
2478                 (yyval.symbol)->const_string = strings;
2479           }
2480     break;
2481
2482   case 11:
2483
2484 /* Line 1806 of yacc.c  */
2485 #line 300 "scannerparser.y"
2486     {
2487                 (yyval.str) = g_strdup (yytext);
2488           }
2489     break;
2490
2491   case 15:
2492
2493 /* Line 1806 of yacc.c  */
2494 #line 313 "scannerparser.y"
2495     {
2496                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2497           }
2498     break;
2499
2500   case 16:
2501
2502 /* Line 1806 of yacc.c  */
2503 #line 317 "scannerparser.y"
2504     {
2505                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2506           }
2507     break;
2508
2509   case 17:
2510
2511 /* Line 1806 of yacc.c  */
2512 #line 321 "scannerparser.y"
2513     {
2514                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2515           }
2516     break;
2517
2518   case 18:
2519
2520 /* Line 1806 of yacc.c  */
2521 #line 325 "scannerparser.y"
2522     {
2523                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2524           }
2525     break;
2526
2527   case 19:
2528
2529 /* Line 1806 of yacc.c  */
2530 #line 329 "scannerparser.y"
2531     {
2532                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2533           }
2534     break;
2535
2536   case 20:
2537
2538 /* Line 1806 of yacc.c  */
2539 #line 333 "scannerparser.y"
2540     {
2541                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2542           }
2543     break;
2544
2545   case 21:
2546
2547 /* Line 1806 of yacc.c  */
2548 #line 337 "scannerparser.y"
2549     {
2550                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2551           }
2552     break;
2553
2554   case 25:
2555
2556 /* Line 1806 of yacc.c  */
2557 #line 350 "scannerparser.y"
2558     {
2559                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2560           }
2561     break;
2562
2563   case 26:
2564
2565 /* Line 1806 of yacc.c  */
2566 #line 354 "scannerparser.y"
2567     {
2568                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2569           }
2570     break;
2571
2572   case 27:
2573
2574 /* Line 1806 of yacc.c  */
2575 #line 358 "scannerparser.y"
2576     {
2577                 switch ((yyvsp[(1) - (2)].unary_operator)) {
2578                 case UNARY_PLUS:
2579                         (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
2580                         break;
2581                 case UNARY_MINUS:
2582                         (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
2583                         (yyval.symbol)->const_int = -(yyvsp[(2) - (2)].symbol)->const_int;
2584                         break;
2585                 case UNARY_BITWISE_COMPLEMENT:
2586                         (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
2587                         (yyval.symbol)->const_int = ~(yyvsp[(2) - (2)].symbol)->const_int;
2588                         break;
2589                 case UNARY_LOGICAL_NEGATION:
2590                         (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
2591                         (yyval.symbol)->const_int = !gi_source_symbol_get_const_boolean ((yyvsp[(2) - (2)].symbol));
2592                         break;
2593                 default:
2594                         (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2595                         break;
2596                 }
2597           }
2598     break;
2599
2600   case 28:
2601
2602 /* Line 1806 of yacc.c  */
2603 #line 381 "scannerparser.y"
2604     {
2605                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2606           }
2607     break;
2608
2609   case 29:
2610
2611 /* Line 1806 of yacc.c  */
2612 #line 385 "scannerparser.y"
2613     {
2614                 ctype_free ((yyvsp[(3) - (4)].ctype));
2615                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2616           }
2617     break;
2618
2619   case 30:
2620
2621 /* Line 1806 of yacc.c  */
2622 #line 393 "scannerparser.y"
2623     {
2624                 (yyval.unary_operator) = UNARY_ADDRESS_OF;
2625           }
2626     break;
2627
2628   case 31:
2629
2630 /* Line 1806 of yacc.c  */
2631 #line 397 "scannerparser.y"
2632     {
2633                 (yyval.unary_operator) = UNARY_POINTER_INDIRECTION;
2634           }
2635     break;
2636
2637   case 32:
2638
2639 /* Line 1806 of yacc.c  */
2640 #line 401 "scannerparser.y"
2641     {
2642                 (yyval.unary_operator) = UNARY_PLUS;
2643           }
2644     break;
2645
2646   case 33:
2647
2648 /* Line 1806 of yacc.c  */
2649 #line 405 "scannerparser.y"
2650     {
2651                 (yyval.unary_operator) = UNARY_MINUS;
2652           }
2653     break;
2654
2655   case 34:
2656
2657 /* Line 1806 of yacc.c  */
2658 #line 409 "scannerparser.y"
2659     {
2660                 (yyval.unary_operator) = UNARY_BITWISE_COMPLEMENT;
2661           }
2662     break;
2663
2664   case 35:
2665
2666 /* Line 1806 of yacc.c  */
2667 #line 413 "scannerparser.y"
2668     {
2669                 (yyval.unary_operator) = UNARY_LOGICAL_NEGATION;
2670           }
2671     break;
2672
2673   case 37:
2674
2675 /* Line 1806 of yacc.c  */
2676 #line 421 "scannerparser.y"
2677     {
2678                 ctype_free ((yyvsp[(2) - (4)].ctype));
2679                 (yyval.symbol) = (yyvsp[(4) - (4)].symbol);
2680           }
2681     break;
2682
2683   case 39:
2684
2685 /* Line 1806 of yacc.c  */
2686 #line 430 "scannerparser.y"
2687     {
2688                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2689                 (yyval.symbol)->const_int_set = TRUE;
2690                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int * (yyvsp[(3) - (3)].symbol)->const_int;
2691           }
2692     break;
2693
2694   case 40:
2695
2696 /* Line 1806 of yacc.c  */
2697 #line 436 "scannerparser.y"
2698     {
2699                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2700                 (yyval.symbol)->const_int_set = TRUE;
2701                 if ((yyvsp[(3) - (3)].symbol)->const_int != 0) {
2702                         (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int / (yyvsp[(3) - (3)].symbol)->const_int;
2703                 }
2704           }
2705     break;
2706
2707   case 41:
2708
2709 /* Line 1806 of yacc.c  */
2710 #line 444 "scannerparser.y"
2711     {
2712                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2713                 (yyval.symbol)->const_int_set = TRUE;
2714                 if ((yyvsp[(3) - (3)].symbol)->const_int != 0) {
2715                         (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int % (yyvsp[(3) - (3)].symbol)->const_int;
2716                 }
2717           }
2718     break;
2719
2720   case 43:
2721
2722 /* Line 1806 of yacc.c  */
2723 #line 456 "scannerparser.y"
2724     {
2725                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2726                 (yyval.symbol)->const_int_set = TRUE;
2727                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int + (yyvsp[(3) - (3)].symbol)->const_int;
2728           }
2729     break;
2730
2731   case 44:
2732
2733 /* Line 1806 of yacc.c  */
2734 #line 462 "scannerparser.y"
2735     {
2736                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2737                 (yyval.symbol)->const_int_set = TRUE;
2738                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int - (yyvsp[(3) - (3)].symbol)->const_int;
2739           }
2740     break;
2741
2742   case 46:
2743
2744 /* Line 1806 of yacc.c  */
2745 #line 472 "scannerparser.y"
2746     {
2747                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2748                 (yyval.symbol)->const_int_set = TRUE;
2749                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int << (yyvsp[(3) - (3)].symbol)->const_int;
2750
2751                 /* assume this is a bitfield/flags declaration
2752                  * if a left shift operator is sued in an enum value
2753                  * This mimics the glib-mkenum behavior.
2754                  */
2755                 is_bitfield = TRUE;
2756           }
2757     break;
2758
2759   case 47:
2760
2761 /* Line 1806 of yacc.c  */
2762 #line 484 "scannerparser.y"
2763     {
2764                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2765                 (yyval.symbol)->const_int_set = TRUE;
2766                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int >> (yyvsp[(3) - (3)].symbol)->const_int;
2767           }
2768     break;
2769
2770   case 49:
2771
2772 /* Line 1806 of yacc.c  */
2773 #line 494 "scannerparser.y"
2774     {
2775                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2776                 (yyval.symbol)->const_int_set = TRUE;
2777                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int < (yyvsp[(3) - (3)].symbol)->const_int;
2778           }
2779     break;
2780
2781   case 50:
2782
2783 /* Line 1806 of yacc.c  */
2784 #line 500 "scannerparser.y"
2785     {
2786                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2787                 (yyval.symbol)->const_int_set = TRUE;
2788                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int > (yyvsp[(3) - (3)].symbol)->const_int;
2789           }
2790     break;
2791
2792   case 51:
2793
2794 /* Line 1806 of yacc.c  */
2795 #line 506 "scannerparser.y"
2796     {
2797                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2798                 (yyval.symbol)->const_int_set = TRUE;
2799                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int <= (yyvsp[(3) - (3)].symbol)->const_int;
2800           }
2801     break;
2802
2803   case 52:
2804
2805 /* Line 1806 of yacc.c  */
2806 #line 512 "scannerparser.y"
2807     {
2808                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2809                 (yyval.symbol)->const_int_set = TRUE;
2810                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int >= (yyvsp[(3) - (3)].symbol)->const_int;
2811           }
2812     break;
2813
2814   case 54:
2815
2816 /* Line 1806 of yacc.c  */
2817 #line 522 "scannerparser.y"
2818     {
2819                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2820                 (yyval.symbol)->const_int_set = TRUE;
2821                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int == (yyvsp[(3) - (3)].symbol)->const_int;
2822           }
2823     break;
2824
2825   case 55:
2826
2827 /* Line 1806 of yacc.c  */
2828 #line 528 "scannerparser.y"
2829     {
2830                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2831                 (yyval.symbol)->const_int_set = TRUE;
2832                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int != (yyvsp[(3) - (3)].symbol)->const_int;
2833           }
2834     break;
2835
2836   case 57:
2837
2838 /* Line 1806 of yacc.c  */
2839 #line 538 "scannerparser.y"
2840     {
2841                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2842                 (yyval.symbol)->const_int_set = TRUE;
2843                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int & (yyvsp[(3) - (3)].symbol)->const_int;
2844           }
2845     break;
2846
2847   case 59:
2848
2849 /* Line 1806 of yacc.c  */
2850 #line 548 "scannerparser.y"
2851     {
2852                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2853                 (yyval.symbol)->const_int_set = TRUE;
2854                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int ^ (yyvsp[(3) - (3)].symbol)->const_int;
2855           }
2856     break;
2857
2858   case 61:
2859
2860 /* Line 1806 of yacc.c  */
2861 #line 558 "scannerparser.y"
2862     {
2863                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2864                 (yyval.symbol)->const_int_set = TRUE;
2865                 (yyval.symbol)->const_int = (yyvsp[(1) - (3)].symbol)->const_int | (yyvsp[(3) - (3)].symbol)->const_int;
2866           }
2867     break;
2868
2869   case 63:
2870
2871 /* Line 1806 of yacc.c  */
2872 #line 568 "scannerparser.y"
2873     {
2874                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2875                 (yyval.symbol)->const_int_set = TRUE;
2876                 (yyval.symbol)->const_int =
2877                   gi_source_symbol_get_const_boolean ((yyvsp[(1) - (3)].symbol)) &&
2878                   gi_source_symbol_get_const_boolean ((yyvsp[(3) - (3)].symbol));
2879           }
2880     break;
2881
2882   case 65:
2883
2884 /* Line 1806 of yacc.c  */
2885 #line 580 "scannerparser.y"
2886     {
2887                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_CONST, scanner->current_filename, lineno);
2888                 (yyval.symbol)->const_int_set = TRUE;
2889                 (yyval.symbol)->const_int =
2890                   gi_source_symbol_get_const_boolean ((yyvsp[(1) - (3)].symbol)) ||
2891                   gi_source_symbol_get_const_boolean ((yyvsp[(3) - (3)].symbol));
2892           }
2893     break;
2894
2895   case 67:
2896
2897 /* Line 1806 of yacc.c  */
2898 #line 592 "scannerparser.y"
2899     {
2900                 (yyval.symbol) = gi_source_symbol_get_const_boolean ((yyvsp[(1) - (5)].symbol)) ? (yyvsp[(3) - (5)].symbol) : (yyvsp[(5) - (5)].symbol);
2901           }
2902     break;
2903
2904   case 69:
2905
2906 /* Line 1806 of yacc.c  */
2907 #line 600 "scannerparser.y"
2908     {
2909                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2910           }
2911     break;
2912
2913   case 83:
2914
2915 /* Line 1806 of yacc.c  */
2916 #line 623 "scannerparser.y"
2917     {
2918                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
2919           }
2920     break;
2921
2922   case 85:
2923
2924 /* Line 1806 of yacc.c  */
2925 #line 636 "scannerparser.y"
2926     {
2927                 GList *l;
2928                 for (l = (yyvsp[(2) - (3)].list); l != NULL; l = l->next) {
2929                         GISourceSymbol *sym = l->data;
2930                         gi_source_symbol_merge_type (sym, gi_source_type_copy ((yyvsp[(1) - (3)].ctype)));
2931                         if ((yyvsp[(1) - (3)].ctype)->storage_class_specifier & STORAGE_CLASS_TYPEDEF) {
2932                                 sym->type = CSYMBOL_TYPE_TYPEDEF;
2933                         } else if (sym->base_type->type == CTYPE_FUNCTION) {
2934                                 sym->type = CSYMBOL_TYPE_FUNCTION;
2935                         } else {
2936                                 sym->type = CSYMBOL_TYPE_OBJECT;
2937                         }
2938                         gi_source_scanner_add_symbol (scanner, sym);
2939                         gi_source_symbol_unref (sym);
2940                 }
2941                 ctype_free ((yyvsp[(1) - (3)].ctype));
2942           }
2943     break;
2944
2945   case 86:
2946
2947 /* Line 1806 of yacc.c  */
2948 #line 654 "scannerparser.y"
2949     {
2950                 ctype_free ((yyvsp[(1) - (2)].ctype));
2951           }
2952     break;
2953
2954   case 87:
2955
2956 /* Line 1806 of yacc.c  */
2957 #line 661 "scannerparser.y"
2958     {
2959                 (yyval.ctype) = (yyvsp[(2) - (2)].ctype);
2960                 (yyval.ctype)->storage_class_specifier |= (yyvsp[(1) - (2)].storage_class_specifier);
2961           }
2962     break;
2963
2964   case 88:
2965
2966 /* Line 1806 of yacc.c  */
2967 #line 666 "scannerparser.y"
2968     {
2969                 (yyval.ctype) = gi_source_type_new (CTYPE_INVALID);
2970                 (yyval.ctype)->storage_class_specifier |= (yyvsp[(1) - (1)].storage_class_specifier);
2971           }
2972     break;
2973
2974   case 89:
2975
2976 /* Line 1806 of yacc.c  */
2977 #line 671 "scannerparser.y"
2978     {
2979                 (yyval.ctype) = (yyvsp[(1) - (2)].ctype);
2980                 /* combine basic types like unsigned int and long long */
2981                 if ((yyval.ctype)->type == CTYPE_BASIC_TYPE && (yyvsp[(2) - (2)].ctype)->type == CTYPE_BASIC_TYPE) {
2982                         char *name = g_strdup_printf ("%s %s", (yyval.ctype)->name, (yyvsp[(2) - (2)].ctype)->name);
2983                         g_free ((yyval.ctype)->name);
2984                         (yyval.ctype)->name = name;
2985                         ctype_free ((yyvsp[(2) - (2)].ctype));
2986                 } else {
2987                         (yyval.ctype)->base_type = (yyvsp[(2) - (2)].ctype);
2988                 }
2989           }
2990     break;
2991
2992   case 91:
2993
2994 /* Line 1806 of yacc.c  */
2995 #line 685 "scannerparser.y"
2996     {
2997                 (yyval.ctype) = (yyvsp[(2) - (2)].ctype);
2998                 (yyval.ctype)->type_qualifier |= (yyvsp[(1) - (2)].type_qualifier);
2999           }
3000     break;
3001
3002   case 92:
3003
3004 /* Line 1806 of yacc.c  */
3005 #line 690 "scannerparser.y"
3006     {
3007                 (yyval.ctype) = gi_source_type_new (CTYPE_INVALID);
3008                 (yyval.ctype)->type_qualifier |= (yyvsp[(1) - (1)].type_qualifier);
3009           }
3010     break;
3011
3012   case 93:
3013
3014 /* Line 1806 of yacc.c  */
3015 #line 695 "scannerparser.y"
3016     {
3017                 (yyval.ctype) = (yyvsp[(2) - (2)].ctype);
3018                 (yyval.ctype)->function_specifier |= (yyvsp[(1) - (2)].function_specifier);
3019           }
3020     break;
3021
3022   case 94:
3023
3024 /* Line 1806 of yacc.c  */
3025 #line 700 "scannerparser.y"
3026     {
3027                 (yyval.ctype) = gi_source_type_new (CTYPE_INVALID);
3028                 (yyval.ctype)->function_specifier |= (yyvsp[(1) - (1)].function_specifier);
3029           }
3030     break;
3031
3032   case 95:
3033
3034 /* Line 1806 of yacc.c  */
3035 #line 708 "scannerparser.y"
3036     {
3037                 (yyval.list) = g_list_append (NULL, (yyvsp[(1) - (1)].symbol));
3038           }
3039     break;
3040
3041   case 96:
3042
3043 /* Line 1806 of yacc.c  */
3044 #line 712 "scannerparser.y"
3045     {
3046                 (yyval.list) = g_list_append ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].symbol));
3047           }
3048     break;
3049
3050   case 99:
3051
3052 /* Line 1806 of yacc.c  */
3053 #line 724 "scannerparser.y"
3054     {
3055                 (yyval.storage_class_specifier) = STORAGE_CLASS_TYPEDEF;
3056           }
3057     break;
3058
3059   case 100:
3060
3061 /* Line 1806 of yacc.c  */
3062 #line 728 "scannerparser.y"
3063     {
3064                 (yyval.storage_class_specifier) = STORAGE_CLASS_EXTERN;
3065           }
3066     break;
3067
3068   case 101:
3069
3070 /* Line 1806 of yacc.c  */
3071 #line 732 "scannerparser.y"
3072     {
3073                 (yyval.storage_class_specifier) = STORAGE_CLASS_STATIC;
3074           }
3075     break;
3076
3077   case 102:
3078
3079 /* Line 1806 of yacc.c  */
3080 #line 736 "scannerparser.y"
3081     {
3082                 (yyval.storage_class_specifier) = STORAGE_CLASS_AUTO;
3083           }
3084     break;
3085
3086   case 103:
3087
3088 /* Line 1806 of yacc.c  */
3089 #line 740 "scannerparser.y"
3090     {
3091                 (yyval.storage_class_specifier) = STORAGE_CLASS_REGISTER;
3092           }
3093     break;
3094
3095   case 104:
3096
3097 /* Line 1806 of yacc.c  */
3098 #line 747 "scannerparser.y"
3099     {
3100                 (yyval.ctype) = gi_source_type_new (CTYPE_VOID);
3101           }
3102     break;
3103
3104   case 105:
3105
3106 /* Line 1806 of yacc.c  */
3107 #line 751 "scannerparser.y"
3108     {
3109                 (yyval.ctype) = gi_source_basic_type_new ("char");
3110           }
3111     break;
3112
3113   case 106:
3114
3115 /* Line 1806 of yacc.c  */
3116 #line 755 "scannerparser.y"
3117     {
3118                 (yyval.ctype) = gi_source_basic_type_new ("short");
3119           }
3120     break;
3121
3122   case 107:
3123
3124 /* Line 1806 of yacc.c  */
3125 #line 759 "scannerparser.y"
3126     {
3127                 (yyval.ctype) = gi_source_basic_type_new ("int");
3128           }
3129     break;
3130
3131   case 108:
3132
3133 /* Line 1806 of yacc.c  */
3134 #line 763 "scannerparser.y"
3135     {
3136                 (yyval.ctype) = gi_source_basic_type_new ("long");
3137           }
3138     break;
3139
3140   case 109:
3141
3142 /* Line 1806 of yacc.c  */
3143 #line 767 "scannerparser.y"
3144     {
3145                 (yyval.ctype) = gi_source_basic_type_new ("float");
3146           }
3147     break;
3148
3149   case 110:
3150
3151 /* Line 1806 of yacc.c  */
3152 #line 771 "scannerparser.y"
3153     {
3154                 (yyval.ctype) = gi_source_basic_type_new ("double");
3155           }
3156     break;
3157
3158   case 111:
3159
3160 /* Line 1806 of yacc.c  */
3161 #line 775 "scannerparser.y"
3162     {
3163                 (yyval.ctype) = gi_source_basic_type_new ("signed");
3164           }
3165     break;
3166
3167   case 112:
3168
3169 /* Line 1806 of yacc.c  */
3170 #line 779 "scannerparser.y"
3171     {
3172                 (yyval.ctype) = gi_source_basic_type_new ("unsigned");
3173           }
3174     break;
3175
3176   case 113:
3177
3178 /* Line 1806 of yacc.c  */
3179 #line 783 "scannerparser.y"
3180     {
3181                 (yyval.ctype) = gi_source_basic_type_new ("bool");
3182           }
3183     break;
3184
3185   case 116:
3186
3187 /* Line 1806 of yacc.c  */
3188 #line 789 "scannerparser.y"
3189     {
3190                 (yyval.ctype) = gi_source_typedef_new ((yyvsp[(1) - (1)].str));
3191                 g_free ((yyvsp[(1) - (1)].str));
3192           }
3193     break;
3194
3195   case 117:
3196
3197 /* Line 1806 of yacc.c  */
3198 #line 797 "scannerparser.y"
3199     {
3200                 (yyval.ctype) = (yyvsp[(1) - (5)].ctype);
3201                 (yyval.ctype)->name = (yyvsp[(2) - (5)].str);
3202                 (yyval.ctype)->child_list = (yyvsp[(4) - (5)].list);
3203
3204                 GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3205                 if ((yyval.ctype)->type == CTYPE_STRUCT) {
3206                         sym->type = CSYMBOL_TYPE_STRUCT;
3207                 } else if ((yyval.ctype)->type == CTYPE_UNION) {
3208                         sym->type = CSYMBOL_TYPE_UNION;
3209                 } else {
3210                         g_assert_not_reached ();
3211                 }
3212                 sym->ident = g_strdup ((yyval.ctype)->name);
3213                 sym->base_type = gi_source_type_copy ((yyval.ctype));
3214                 gi_source_scanner_add_symbol (scanner, sym);
3215                 gi_source_symbol_unref (sym);
3216           }
3217     break;
3218
3219   case 118:
3220
3221 /* Line 1806 of yacc.c  */
3222 #line 816 "scannerparser.y"
3223     {
3224                 (yyval.ctype) = (yyvsp[(1) - (4)].ctype);
3225                 (yyval.ctype)->child_list = (yyvsp[(3) - (4)].list);
3226           }
3227     break;
3228
3229   case 119:
3230
3231 /* Line 1806 of yacc.c  */
3232 #line 821 "scannerparser.y"
3233     {
3234                 (yyval.ctype) = (yyvsp[(1) - (2)].ctype);
3235                 (yyval.ctype)->name = (yyvsp[(2) - (2)].str);
3236           }
3237     break;
3238
3239   case 120:
3240
3241 /* Line 1806 of yacc.c  */
3242 #line 829 "scannerparser.y"
3243     {
3244                 scanner->private = FALSE;
3245                 (yyval.ctype) = gi_source_struct_new (NULL);
3246           }
3247     break;
3248
3249   case 121:
3250
3251 /* Line 1806 of yacc.c  */
3252 #line 834 "scannerparser.y"
3253     {
3254                 scanner->private = FALSE;
3255                 (yyval.ctype) = gi_source_union_new (NULL);
3256           }
3257     break;
3258
3259   case 123:
3260
3261 /* Line 1806 of yacc.c  */
3262 #line 843 "scannerparser.y"
3263     {
3264                 (yyval.list) = g_list_concat ((yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].list));
3265           }
3266     break;
3267
3268   case 124:
3269
3270 /* Line 1806 of yacc.c  */
3271 #line 850 "scannerparser.y"
3272     {
3273             GList *l;
3274             (yyval.list) = NULL;
3275             for (l = (yyvsp[(2) - (3)].list); l != NULL; l = l->next)
3276               {
3277                 GISourceSymbol *sym = l->data;
3278                 if ((yyvsp[(1) - (3)].ctype)->storage_class_specifier & STORAGE_CLASS_TYPEDEF)
3279                     sym->type = CSYMBOL_TYPE_TYPEDEF;
3280                 else
3281                     sym->type = CSYMBOL_TYPE_MEMBER;
3282                 gi_source_symbol_merge_type (sym, gi_source_type_copy ((yyvsp[(1) - (3)].ctype)));
3283                 sym->private = scanner->private;
3284                 (yyval.list) = g_list_append ((yyval.list), sym);
3285               }
3286             ctype_free ((yyvsp[(1) - (3)].ctype));
3287           }
3288     break;
3289
3290   case 125:
3291
3292 /* Line 1806 of yacc.c  */
3293 #line 870 "scannerparser.y"
3294     {
3295                 (yyval.ctype) = (yyvsp[(1) - (2)].ctype);
3296                 (yyval.ctype)->base_type = (yyvsp[(2) - (2)].ctype);
3297           }
3298     break;
3299
3300   case 127:
3301
3302 /* Line 1806 of yacc.c  */
3303 #line 876 "scannerparser.y"
3304     {
3305                 (yyval.ctype) = (yyvsp[(2) - (2)].ctype);
3306                 (yyval.ctype)->type_qualifier |= (yyvsp[(1) - (2)].type_qualifier);
3307           }
3308     break;
3309
3310   case 128:
3311
3312 /* Line 1806 of yacc.c  */
3313 #line 881 "scannerparser.y"
3314     {
3315                 (yyval.ctype) = gi_source_type_new (CTYPE_INVALID);
3316                 (yyval.ctype)->type_qualifier |= (yyvsp[(1) - (1)].type_qualifier);
3317           }
3318     break;
3319
3320   case 129:
3321
3322 /* Line 1806 of yacc.c  */
3323 #line 889 "scannerparser.y"
3324     {
3325                 (yyval.list) = g_list_append (NULL, (yyvsp[(1) - (1)].symbol));
3326           }
3327     break;
3328
3329   case 130:
3330
3331 /* Line 1806 of yacc.c  */
3332 #line 893 "scannerparser.y"
3333     {
3334                 (yyval.list) = g_list_append ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].symbol));
3335           }
3336     break;
3337
3338   case 131:
3339
3340 /* Line 1806 of yacc.c  */
3341 #line 900 "scannerparser.y"
3342     {
3343                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3344           }
3345     break;
3346
3347   case 133:
3348
3349 /* Line 1806 of yacc.c  */
3350 #line 905 "scannerparser.y"
3351     {
3352                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3353           }
3354     break;
3355
3356   case 134:
3357
3358 /* Line 1806 of yacc.c  */
3359 #line 909 "scannerparser.y"
3360     {
3361                 (yyval.symbol) = (yyvsp[(1) - (3)].symbol);
3362                 if ((yyvsp[(3) - (3)].symbol)->const_int_set) {
3363                   (yyval.symbol)->const_int_set = TRUE;
3364                   (yyval.symbol)->const_int = (yyvsp[(3) - (3)].symbol)->const_int;
3365                 }
3366           }
3367     break;
3368
3369   case 135:
3370
3371 /* Line 1806 of yacc.c  */
3372 #line 920 "scannerparser.y"
3373     {
3374                 (yyval.ctype) = gi_source_enum_new ((yyvsp[(2) - (5)].str));
3375                 (yyval.ctype)->child_list = (yyvsp[(4) - (5)].list);
3376                 (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags;
3377                 last_enum_value = -1;
3378           }
3379     break;
3380
3381   case 136:
3382
3383 /* Line 1806 of yacc.c  */
3384 #line 927 "scannerparser.y"
3385     {
3386                 (yyval.ctype) = gi_source_enum_new (NULL);
3387                 (yyval.ctype)->child_list = (yyvsp[(3) - (4)].list);
3388                 (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags;
3389                 last_enum_value = -1;
3390           }
3391     break;
3392
3393   case 137:
3394
3395 /* Line 1806 of yacc.c  */
3396 #line 934 "scannerparser.y"
3397     {
3398                 (yyval.ctype) = gi_source_enum_new ((yyvsp[(2) - (6)].str));
3399                 (yyval.ctype)->child_list = (yyvsp[(4) - (6)].list);
3400                 (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags;
3401                 last_enum_value = -1;
3402           }
3403     break;
3404
3405   case 138:
3406
3407 /* Line 1806 of yacc.c  */
3408 #line 941 "scannerparser.y"
3409     {
3410                 (yyval.ctype) = gi_source_enum_new (NULL);
3411                 (yyval.ctype)->child_list = (yyvsp[(3) - (5)].list);
3412                 (yyval.ctype)->is_bitfield = is_bitfield || scanner->flags;
3413                 last_enum_value = -1;
3414           }
3415     break;
3416
3417   case 139:
3418
3419 /* Line 1806 of yacc.c  */
3420 #line 948 "scannerparser.y"
3421     {
3422                 (yyval.ctype) = gi_source_enum_new ((yyvsp[(2) - (2)].str));
3423           }
3424     break;
3425
3426   case 140:
3427
3428 /* Line 1806 of yacc.c  */
3429 #line 955 "scannerparser.y"
3430     {
3431                 scanner->flags = FALSE;
3432                 scanner->private = FALSE;
3433           }
3434     break;
3435
3436   case 141:
3437
3438 /* Line 1806 of yacc.c  */
3439 #line 963 "scannerparser.y"
3440     {
3441                 /* reset flag before the first enum value */
3442                 is_bitfield = FALSE;
3443           }
3444     break;
3445
3446   case 142:
3447
3448 /* Line 1806 of yacc.c  */
3449 #line 968 "scannerparser.y"
3450     {
3451             (yyvsp[(2) - (2)].symbol)->private = scanner->private;
3452             (yyval.list) = g_list_append (NULL, (yyvsp[(2) - (2)].symbol));
3453           }
3454     break;
3455
3456   case 143:
3457
3458 /* Line 1806 of yacc.c  */
3459 #line 973 "scannerparser.y"
3460     {
3461             (yyvsp[(3) - (3)].symbol)->private = scanner->private;
3462             (yyval.list) = g_list_append ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].symbol));
3463           }
3464     break;
3465
3466   case 144:
3467
3468 /* Line 1806 of yacc.c  */
3469 #line 981 "scannerparser.y"
3470     {
3471                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_OBJECT, scanner->current_filename, lineno);
3472                 (yyval.symbol)->ident = (yyvsp[(1) - (1)].str);
3473                 (yyval.symbol)->const_int_set = TRUE;
3474                 (yyval.symbol)->const_int = ++last_enum_value;
3475                 g_hash_table_insert (const_table, g_strdup ((yyval.symbol)->ident), gi_source_symbol_ref ((yyval.symbol)));
3476           }
3477     break;
3478
3479   case 145:
3480
3481 /* Line 1806 of yacc.c  */
3482 #line 989 "scannerparser.y"
3483     {
3484                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_OBJECT, scanner->current_filename, lineno);
3485                 (yyval.symbol)->ident = (yyvsp[(1) - (3)].str);
3486                 (yyval.symbol)->const_int_set = TRUE;
3487                 (yyval.symbol)->const_int = (yyvsp[(3) - (3)].symbol)->const_int;
3488                 last_enum_value = (yyval.symbol)->const_int;
3489                 g_hash_table_insert (const_table, g_strdup ((yyval.symbol)->ident), gi_source_symbol_ref ((yyval.symbol)));
3490           }
3491     break;
3492
3493   case 146:
3494
3495 /* Line 1806 of yacc.c  */
3496 #line 1001 "scannerparser.y"
3497     {
3498                 (yyval.type_qualifier) = TYPE_QUALIFIER_CONST;
3499           }
3500     break;
3501
3502   case 147:
3503
3504 /* Line 1806 of yacc.c  */
3505 #line 1005 "scannerparser.y"
3506     {
3507                 (yyval.type_qualifier) = TYPE_QUALIFIER_RESTRICT;
3508           }
3509     break;
3510
3511   case 148:
3512
3513 /* Line 1806 of yacc.c  */
3514 #line 1009 "scannerparser.y"
3515     {
3516                 (yyval.type_qualifier) = TYPE_QUALIFIER_EXTENSION;
3517           }
3518     break;
3519
3520   case 149:
3521
3522 /* Line 1806 of yacc.c  */
3523 #line 1013 "scannerparser.y"
3524     {
3525                 (yyval.type_qualifier) = TYPE_QUALIFIER_VOLATILE;
3526           }
3527     break;
3528
3529   case 150:
3530
3531 /* Line 1806 of yacc.c  */
3532 #line 1020 "scannerparser.y"
3533     {
3534                 (yyval.function_specifier) = FUNCTION_INLINE;
3535           }
3536     break;
3537
3538   case 151:
3539
3540 /* Line 1806 of yacc.c  */
3541 #line 1027 "scannerparser.y"
3542     {
3543                 (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
3544                 gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[(1) - (2)].ctype));
3545           }
3546     break;
3547
3548   case 153:
3549
3550 /* Line 1806 of yacc.c  */
3551 #line 1036 "scannerparser.y"
3552     {
3553                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3554                 (yyval.symbol)->ident = (yyvsp[(1) - (1)].str);
3555           }
3556     break;
3557
3558   case 154:
3559
3560 /* Line 1806 of yacc.c  */
3561 #line 1041 "scannerparser.y"
3562     {
3563                 (yyval.symbol) = (yyvsp[(2) - (3)].symbol);
3564           }
3565     break;
3566
3567   case 155:
3568
3569 /* Line 1806 of yacc.c  */
3570 #line 1045 "scannerparser.y"
3571     {
3572                 (yyval.symbol) = (yyvsp[(1) - (4)].symbol);
3573                 gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new ((yyvsp[(3) - (4)].symbol)));
3574           }
3575     break;
3576
3577   case 156:
3578
3579 /* Line 1806 of yacc.c  */
3580 #line 1050 "scannerparser.y"
3581     {
3582                 (yyval.symbol) = (yyvsp[(1) - (3)].symbol);
3583                 gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new (NULL));
3584           }
3585     break;
3586
3587   case 157:
3588
3589 /* Line 1806 of yacc.c  */
3590 #line 1055 "scannerparser.y"
3591     {
3592                 GISourceType *func = gi_source_function_new ();
3593                 // ignore (void) parameter list
3594                 if ((yyvsp[(3) - (4)].list) != NULL && ((yyvsp[(3) - (4)].list)->next != NULL || ((GISourceSymbol *) (yyvsp[(3) - (4)].list)->data)->base_type->type != CTYPE_VOID)) {
3595                         func->child_list = (yyvsp[(3) - (4)].list);
3596                 }
3597                 (yyval.symbol) = (yyvsp[(1) - (4)].symbol);
3598                 gi_source_symbol_merge_type ((yyval.symbol), func);
3599           }
3600     break;
3601
3602   case 158:
3603
3604 /* Line 1806 of yacc.c  */
3605 #line 1065 "scannerparser.y"
3606     {
3607                 GISourceType *func = gi_source_function_new ();
3608                 func->child_list = (yyvsp[(3) - (4)].list);
3609                 (yyval.symbol) = (yyvsp[(1) - (4)].symbol);
3610                 gi_source_symbol_merge_type ((yyval.symbol), func);
3611           }
3612     break;
3613
3614   case 159:
3615
3616 /* Line 1806 of yacc.c  */
3617 #line 1072 "scannerparser.y"
3618     {
3619                 GISourceType *func = gi_source_function_new ();
3620                 (yyval.symbol) = (yyvsp[(1) - (3)].symbol);
3621                 gi_source_symbol_merge_type ((yyval.symbol), func);
3622           }
3623     break;
3624
3625   case 160:
3626
3627 /* Line 1806 of yacc.c  */
3628 #line 1081 "scannerparser.y"
3629     {
3630                 (yyval.ctype) = gi_source_pointer_new (NULL);
3631                 (yyval.ctype)->type_qualifier = (yyvsp[(2) - (2)].type_qualifier);
3632           }
3633     break;
3634
3635   case 161:
3636
3637 /* Line 1806 of yacc.c  */
3638 #line 1086 "scannerparser.y"
3639     {
3640                 (yyval.ctype) = gi_source_pointer_new (NULL);
3641           }
3642     break;
3643
3644   case 162:
3645
3646 /* Line 1806 of yacc.c  */
3647 #line 1090 "scannerparser.y"
3648     {
3649                 (yyval.ctype) = gi_source_pointer_new ((yyvsp[(3) - (3)].ctype));
3650                 (yyval.ctype)->type_qualifier = (yyvsp[(2) - (3)].type_qualifier);
3651           }
3652     break;
3653
3654   case 163:
3655
3656 /* Line 1806 of yacc.c  */
3657 #line 1095 "scannerparser.y"
3658     {
3659                 (yyval.ctype) = gi_source_pointer_new ((yyvsp[(2) - (2)].ctype));
3660           }
3661     break;
3662
3663   case 165:
3664
3665 /* Line 1806 of yacc.c  */
3666 #line 1103 "scannerparser.y"
3667     {
3668                 (yyval.type_qualifier) = (yyvsp[(1) - (2)].type_qualifier) | (yyvsp[(2) - (2)].type_qualifier);
3669           }
3670     break;
3671
3672   case 166:
3673
3674 /* Line 1806 of yacc.c  */
3675 #line 1110 "scannerparser.y"
3676     {
3677                 (yyval.list) = g_list_append (NULL, (yyvsp[(1) - (1)].symbol));
3678           }
3679     break;
3680
3681   case 167:
3682
3683 /* Line 1806 of yacc.c  */
3684 #line 1114 "scannerparser.y"
3685     {
3686                 (yyval.list) = g_list_append ((yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].symbol));
3687           }
3688     break;
3689
3690   case 168:
3691
3692 /* Line 1806 of yacc.c  */
3693 #line 1121 "scannerparser.y"
3694     {
3695                 (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
3696                 gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[(1) - (2)].ctype));
3697           }
3698     break;
3699
3700   case 169:
3701
3702 /* Line 1806 of yacc.c  */
3703 #line 1126 "scannerparser.y"
3704     {
3705                 (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
3706                 gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[(1) - (2)].ctype));
3707           }
3708     break;
3709
3710   case 170:
3711
3712 /* Line 1806 of yacc.c  */
3713 #line 1131 "scannerparser.y"
3714     {
3715                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3716                 (yyval.symbol)->base_type = (yyvsp[(1) - (1)].ctype);
3717           }
3718     break;
3719
3720   case 171:
3721
3722 /* Line 1806 of yacc.c  */
3723 #line 1136 "scannerparser.y"
3724     {
3725                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_ELLIPSIS, scanner->current_filename, lineno);
3726           }
3727     break;
3728
3729   case 172:
3730
3731 /* Line 1806 of yacc.c  */
3732 #line 1143 "scannerparser.y"
3733     {
3734                 GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3735                 sym->ident = (yyvsp[(1) - (1)].str);
3736                 (yyval.list) = g_list_append (NULL, sym);
3737           }
3738     break;
3739
3740   case 173:
3741
3742 /* Line 1806 of yacc.c  */
3743 #line 1149 "scannerparser.y"
3744     {
3745                 GISourceSymbol *sym = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3746                 sym->ident = (yyvsp[(3) - (3)].str);
3747                 (yyval.list) = g_list_append ((yyvsp[(1) - (3)].list), sym);
3748           }
3749     break;
3750
3751   case 176:
3752
3753 /* Line 1806 of yacc.c  */
3754 #line 1163 "scannerparser.y"
3755     {
3756                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3757                 gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[(1) - (1)].ctype));
3758           }
3759     break;
3760
3761   case 178:
3762
3763 /* Line 1806 of yacc.c  */
3764 #line 1169 "scannerparser.y"
3765     {
3766                 (yyval.symbol) = (yyvsp[(2) - (2)].symbol);
3767                 gi_source_symbol_merge_type ((yyval.symbol), (yyvsp[(1) - (2)].ctype));
3768           }
3769     break;
3770
3771   case 179:
3772
3773 /* Line 1806 of yacc.c  */
3774 #line 1177 "scannerparser.y"
3775     {
3776                 (yyval.symbol) = (yyvsp[(2) - (3)].symbol);
3777           }
3778     break;
3779
3780   case 180:
3781
3782 /* Line 1806 of yacc.c  */
3783 #line 1181 "scannerparser.y"
3784     {
3785                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3786                 gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new (NULL));
3787           }
3788     break;
3789
3790   case 181:
3791
3792 /* Line 1806 of yacc.c  */
3793 #line 1186 "scannerparser.y"
3794     {
3795                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3796                 gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new ((yyvsp[(2) - (3)].symbol)));
3797           }
3798     break;
3799
3800   case 182:
3801
3802 /* Line 1806 of yacc.c  */
3803 #line 1191 "scannerparser.y"
3804     {
3805                 (yyval.symbol) = (yyvsp[(1) - (3)].symbol);
3806                 gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new (NULL));
3807           }
3808     break;
3809
3810   case 183:
3811
3812 /* Line 1806 of yacc.c  */
3813 #line 1196 "scannerparser.y"
3814     {
3815                 (yyval.symbol) = (yyvsp[(1) - (4)].symbol);
3816                 gi_source_symbol_merge_type ((yyval.symbol), gi_source_array_new ((yyvsp[(3) - (4)].symbol)));
3817           }
3818     break;
3819
3820   case 184:
3821
3822 /* Line 1806 of yacc.c  */
3823 #line 1201 "scannerparser.y"
3824     {
3825                 GISourceType *func = gi_source_function_new ();
3826                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3827                 gi_source_symbol_merge_type ((yyval.symbol), func);
3828           }
3829     break;
3830
3831   case 185:
3832
3833 /* Line 1806 of yacc.c  */
3834 #line 1207 "scannerparser.y"
3835     {
3836                 GISourceType *func = gi_source_function_new ();
3837                 // ignore (void) parameter list
3838                 if ((yyvsp[(2) - (3)].list) != NULL && ((yyvsp[(2) - (3)].list)->next != NULL || ((GISourceSymbol *) (yyvsp[(2) - (3)].list)->data)->base_type->type != CTYPE_VOID)) {
3839                         func->child_list = (yyvsp[(2) - (3)].list);
3840                 }
3841                 (yyval.symbol) = gi_source_symbol_new (CSYMBOL_TYPE_INVALID, scanner->current_filename, lineno);
3842                 gi_source_symbol_merge_type ((yyval.symbol), func);
3843           }
3844     break;
3845
3846   case 186:
3847
3848 /* Line 1806 of yacc.c  */
3849 #line 1217 "scannerparser.y"
3850     {
3851                 GISourceType *func = gi_source_function_new ();
3852                 (yyval.symbol) = (yyvsp[(1) - (3)].symbol);
3853                 gi_source_symbol_merge_type ((yyval.symbol), func);
3854           }
3855     break;
3856
3857   case 187:
3858
3859 /* Line 1806 of yacc.c  */
3860 #line 1223 "scannerparser.y"
3861     {
3862                 GISourceType *func = gi_source_function_new ();
3863                 // ignore (void) parameter list
3864                 if ((yyvsp[(3) - (4)].list) != NULL && ((yyvsp[(3) - (4)].list)->next != NULL || ((GISourceSymbol *) (yyvsp[(3) - (4)].list)->data)->base_type->type != CTYPE_VOID)) {
3865                         func->child_list = (yyvsp[(3) - (4)].list);
3866                 }
3867                 (yyval.symbol) = (yyvsp[(1) - (4)].symbol);
3868                 gi_source_symbol_merge_type ((yyval.symbol), func);
3869           }
3870     break;
3871
3872   case 188:
3873
3874 /* Line 1806 of yacc.c  */
3875 #line 1236 "scannerparser.y"
3876     {
3877                 (yyval.str) = g_strdup (yytext);
3878           }
3879     break;
3880
3881   case 238:
3882
3883 /* Line 1806 of yacc.c  */
3884 #line 1343 "scannerparser.y"
3885     {
3886                 (yyval.str) = g_strdup (yytext + strlen ("#define "));
3887           }
3888     break;
3889
3890   case 239:
3891
3892 /* Line 1806 of yacc.c  */
3893 #line 1350 "scannerparser.y"
3894     {
3895                 (yyval.str) = g_strdup (yytext + strlen ("#define "));
3896           }
3897     break;
3898
3899   case 241:
3900
3901 /* Line 1806 of yacc.c  */
3902 #line 1361 "scannerparser.y"
3903     {
3904                 if ((yyvsp[(2) - (2)].symbol)->const_int_set || (yyvsp[(2) - (2)].symbol)->const_double_set || (yyvsp[(2) - (2)].symbol)->const_string != NULL) {
3905                         (yyvsp[(2) - (2)].symbol)->ident = (yyvsp[(1) - (2)].str);
3906                         gi_source_scanner_add_symbol (scanner, (yyvsp[(2) - (2)].symbol));
3907                         gi_source_symbol_unref ((yyvsp[(2) - (2)].symbol));
3908                 }
3909           }
3910     break;
3911
3912
3913
3914 /* Line 1806 of yacc.c  */
3915 #line 3916 "scannerparser.c"
3916       default: break;
3917     }
3918   /* User semantic actions sometimes alter yychar, and that requires
3919      that yytoken be updated with the new translation.  We take the
3920      approach of translating immediately before every use of yytoken.
3921      One alternative is translating here after every semantic action,
3922      but that translation would be missed if the semantic action invokes
3923      YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3924      if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
3925      incorrect destructor might then be invoked immediately.  In the
3926      case of YYERROR or YYBACKUP, subsequent parser actions might lead
3927      to an incorrect destructor call or verbose syntax error message
3928      before the lookahead is translated.  */
3929   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3930
3931   YYPOPSTACK (yylen);
3932   yylen = 0;
3933   YY_STACK_PRINT (yyss, yyssp);
3934
3935   *++yyvsp = yyval;
3936
3937   /* Now `shift' the result of the reduction.  Determine what state
3938      that goes to, based on the state we popped back to and the rule
3939      number reduced by.  */
3940
3941   yyn = yyr1[yyn];
3942
3943   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3944   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3945     yystate = yytable[yystate];
3946   else
3947     yystate = yydefgoto[yyn - YYNTOKENS];
3948
3949   goto yynewstate;
3950
3951
3952 /*------------------------------------.
3953 | yyerrlab -- here on detecting error |
3954 `------------------------------------*/
3955 yyerrlab:
3956   /* Make sure we have latest lookahead translation.  See comments at
3957      user semantic actions for why this is necessary.  */
3958   yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3959
3960   /* If not already recovering from an error, report this error.  */
3961   if (!yyerrstatus)
3962     {
3963       ++yynerrs;
3964 #if ! YYERROR_VERBOSE
3965       yyerror (scanner, YY_("syntax error"));
3966 #else
3967 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3968                                         yyssp, yytoken)
3969       {
3970         char const *yymsgp = YY_("syntax error");
3971         int yysyntax_error_status;
3972         yysyntax_error_status = YYSYNTAX_ERROR;
3973         if (yysyntax_error_status == 0)
3974           yymsgp = yymsg;
3975         else if (yysyntax_error_status == 1)
3976           {
3977             if (yymsg != yymsgbuf)
3978               YYSTACK_FREE (yymsg);
3979             yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3980             if (!yymsg)
3981               {
3982                 yymsg = yymsgbuf;
3983                 yymsg_alloc = sizeof yymsgbuf;
3984                 yysyntax_error_status = 2;
3985               }
3986             else
3987               {
3988                 yysyntax_error_status = YYSYNTAX_ERROR;
3989                 yymsgp = yymsg;
3990               }
3991           }
3992         yyerror (scanner, yymsgp);
3993         if (yysyntax_error_status == 2)
3994           goto yyexhaustedlab;
3995       }
3996 # undef YYSYNTAX_ERROR
3997 #endif
3998     }
3999
4000
4001
4002   if (yyerrstatus == 3)
4003     {
4004       /* If just tried and failed to reuse lookahead token after an
4005          error, discard it.  */
4006
4007       if (yychar <= YYEOF)
4008         {
4009           /* Return failure if at end of input.  */
4010           if (yychar == YYEOF)
4011             YYABORT;
4012         }
4013       else
4014         {
4015           yydestruct ("Error: discarding",
4016                       yytoken, &yylval, scanner);
4017           yychar = YYEMPTY;
4018         }
4019     }
4020
4021   /* Else will try to reuse lookahead token after shifting the error
4022      token.  */
4023   goto yyerrlab1;
4024
4025
4026 /*---------------------------------------------------.
4027 | yyerrorlab -- error raised explicitly by YYERROR.  |
4028 `---------------------------------------------------*/
4029 yyerrorlab:
4030
4031   /* Pacify compilers like GCC when the user code never invokes
4032      YYERROR and the label yyerrorlab therefore never appears in user
4033      code.  */
4034   if (/*CONSTCOND*/ 0)
4035      goto yyerrorlab;
4036
4037   /* Do not reclaim the symbols of the rule which action triggered
4038      this YYERROR.  */
4039   YYPOPSTACK (yylen);
4040   yylen = 0;
4041   YY_STACK_PRINT (yyss, yyssp);
4042   yystate = *yyssp;
4043   goto yyerrlab1;
4044
4045
4046 /*-------------------------------------------------------------.
4047 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
4048 `-------------------------------------------------------------*/
4049 yyerrlab1:
4050   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
4051
4052   for (;;)
4053     {
4054       yyn = yypact[yystate];
4055       if (!yypact_value_is_default (yyn))
4056         {
4057           yyn += YYTERROR;
4058           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4059             {
4060               yyn = yytable[yyn];
4061               if (0 < yyn)
4062                 break;
4063             }
4064         }
4065
4066       /* Pop the current state because it cannot handle the error token.  */
4067       if (yyssp == yyss)
4068         YYABORT;
4069
4070
4071       yydestruct ("Error: popping",
4072                   yystos[yystate], yyvsp, scanner);
4073       YYPOPSTACK (1);
4074       yystate = *yyssp;
4075       YY_STACK_PRINT (yyss, yyssp);
4076     }
4077
4078   *++yyvsp = yylval;
4079
4080
4081   /* Shift the error token.  */
4082   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4083
4084   yystate = yyn;
4085   goto yynewstate;
4086
4087
4088 /*-------------------------------------.
4089 | yyacceptlab -- YYACCEPT comes here.  |
4090 `-------------------------------------*/
4091 yyacceptlab:
4092   yyresult = 0;
4093   goto yyreturn;
4094
4095 /*-----------------------------------.
4096 | yyabortlab -- YYABORT comes here.  |
4097 `-----------------------------------*/
4098 yyabortlab:
4099   yyresult = 1;
4100   goto yyreturn;
4101
4102 #if !defined(yyoverflow) || YYERROR_VERBOSE
4103 /*-------------------------------------------------.
4104 | yyexhaustedlab -- memory exhaustion comes here.  |
4105 `-------------------------------------------------*/
4106 yyexhaustedlab:
4107   yyerror (scanner, YY_("memory exhausted"));
4108   yyresult = 2;
4109   /* Fall through.  */
4110 #endif
4111
4112 yyreturn:
4113   if (yychar != YYEMPTY)
4114     {
4115       /* Make sure we have latest lookahead translation.  See comments at
4116          user semantic actions for why this is necessary.  */
4117       yytoken = YYTRANSLATE (yychar);
4118       yydestruct ("Cleanup: discarding lookahead",
4119                   yytoken, &yylval, scanner);
4120     }
4121   /* Do not reclaim the symbols of the rule which action triggered
4122      this YYABORT or YYACCEPT.  */
4123   YYPOPSTACK (yylen);
4124   YY_STACK_PRINT (yyss, yyssp);
4125   while (yyssp != yyss)
4126     {
4127       yydestruct ("Cleanup: popping",
4128                   yystos[*yyssp], yyvsp, scanner);
4129       YYPOPSTACK (1);
4130     }
4131 #ifndef yyoverflow
4132   if (yyss != yyssa)
4133     YYSTACK_FREE (yyss);
4134 #endif
4135 #if YYERROR_VERBOSE
4136   if (yymsg != yymsgbuf)
4137     YYSTACK_FREE (yymsg);
4138 #endif
4139   /* Make sure YYID is used.  */
4140   return YYID (yyresult);
4141 }
4142
4143
4144
4145 /* Line 2067 of yacc.c  */
4146 #line 1376 "scannerparser.y"
4147
4148 static void
4149 yyerror (GISourceScanner *scanner, const char *s)
4150 {
4151   /* ignore errors while doing a macro scan as not all object macros
4152    * have valid expressions */
4153   if (!scanner->macro_scan)
4154     {
4155       fprintf(stderr, "%s:%d: %s in '%s' at '%s'\n",
4156               scanner->current_filename, lineno, s, linebuf, yytext);
4157     }
4158 }
4159
4160 static int
4161 eat_hspace (FILE * f)
4162 {
4163   int c;
4164   do
4165     {
4166       c = fgetc (f);
4167     }
4168   while (c == ' ' || c == '\t');
4169   return c;
4170 }
4171
4172 static int
4173 eat_line (FILE * f, int c)
4174 {
4175   while (c != EOF && c != '\n')
4176     {
4177       c = fgetc (f);
4178     }
4179   if (c == '\n')
4180     {
4181       c = fgetc (f);
4182       if (c == ' ' || c == '\t')
4183         {
4184           c = eat_hspace (f);
4185         }
4186     }
4187   return c;
4188 }
4189
4190 static int
4191 read_identifier (FILE * f, int c, char **identifier)
4192 {
4193   GString *id = g_string_new ("");
4194   while (g_ascii_isalnum (c) || c == '_')
4195     {
4196       g_string_append_c (id, c);
4197       c = fgetc (f);
4198     }
4199   *identifier = g_string_free (id, FALSE);
4200   return c;
4201 }
4202
4203 void
4204 gi_source_scanner_parse_macros (GISourceScanner *scanner, GList *filenames)
4205 {
4206   GError *error = NULL;
4207   char *tmp_name = NULL;
4208   FILE *fmacros =
4209     fdopen (g_file_open_tmp ("gen-introspect-XXXXXX.h", &tmp_name, &error),
4210             "w+");
4211   g_unlink (tmp_name);
4212
4213   GList *l;
4214   for (l = filenames; l != NULL; l = l->next)
4215     {
4216       FILE *f = fopen (l->data, "r");
4217       int line = 1;
4218
4219       GString *define_line;
4220       char *str;
4221       gboolean error_line = FALSE;
4222       int c = eat_hspace (f);
4223       while (c != EOF)
4224         {
4225           if (c != '#')
4226             {
4227               /* ignore line */
4228               c = eat_line (f, c);
4229               line++;
4230               continue;
4231             }
4232
4233           /* print current location */
4234           str = g_strescape (l->data, "");
4235           fprintf (fmacros, "# %d \"%s\"\n", line, str);
4236           g_free (str);
4237
4238           c = eat_hspace (f);
4239           c = read_identifier (f, c, &str);
4240           if (strcmp (str, "define") != 0 || (c != ' ' && c != '\t'))
4241             {
4242               g_free (str);
4243               /* ignore line */
4244               c = eat_line (f, c);
4245               line++;
4246               continue;
4247             }
4248           g_free (str);
4249           c = eat_hspace (f);
4250           c = read_identifier (f, c, &str);
4251           if (strlen (str) == 0 || (c != ' ' && c != '\t' && c != '('))
4252             {
4253               g_free (str);
4254               /* ignore line */
4255               c = eat_line (f, c);
4256               line++;
4257               continue;
4258             }
4259           define_line = g_string_new ("#define ");
4260           g_string_append (define_line, str);
4261           g_free (str);
4262           if (c == '(')
4263             {
4264               while (c != ')')
4265                 {
4266                   g_string_append_c (define_line, c);
4267                   c = fgetc (f);
4268                   if (c == EOF || c == '\n')
4269                     {
4270                       error_line = TRUE;
4271                       break;
4272                     }
4273                 }
4274               if (error_line)
4275                 {
4276                   g_string_free (define_line, TRUE);
4277                   /* ignore line */
4278                   c = eat_line (f, c);
4279                   line++;
4280                   continue;
4281                 }
4282
4283               g_assert (c == ')');
4284               g_string_append_c (define_line, c);
4285               c = fgetc (f);
4286
4287               /* found function-like macro */
4288               fprintf (fmacros, "%s\n", define_line->str);
4289
4290               g_string_free (define_line, TRUE);
4291               /* ignore rest of line */
4292               c = eat_line (f, c);
4293               line++;
4294               continue;
4295             }
4296           if (c != ' ' && c != '\t')
4297             {
4298               g_string_free (define_line, TRUE);
4299               /* ignore line */
4300               c = eat_line (f, c);
4301               line++;
4302               continue;
4303             }
4304           while (c != EOF && c != '\n')
4305             {
4306               g_string_append_c (define_line, c);
4307               c = fgetc (f);
4308               if (c == '\\')
4309                 {
4310                   c = fgetc (f);
4311                   if (c == '\n')
4312                     {
4313                       /* fold lines when seeing backslash new-line sequence */
4314                       c = fgetc (f);
4315                     }
4316                   else
4317                     {
4318                       g_string_append_c (define_line, '\\');
4319                     }
4320                 }
4321             }
4322
4323           /* found object-like macro */
4324           fprintf (fmacros, "%s\n", define_line->str);
4325
4326           c = eat_line (f, c);
4327           line++;
4328         }
4329
4330       fclose (f);
4331     }
4332
4333   rewind (fmacros);
4334   gi_source_scanner_parse_file (scanner, fmacros);
4335 }
4336
4337 gboolean
4338 gi_source_scanner_parse_file (GISourceScanner *scanner, FILE *file)
4339 {
4340   g_return_val_if_fail (file != NULL, FALSE);
4341
4342   const_table = g_hash_table_new_full (g_str_hash, g_str_equal,
4343                                        g_free, (GDestroyNotify)gi_source_symbol_unref);
4344
4345   lineno = 1;
4346   yyin = file;
4347   yyparse (scanner);
4348
4349   g_hash_table_destroy (const_table);
4350   const_table = NULL;
4351
4352   yyin = NULL;
4353
4354   return TRUE;
4355 }
4356
4357 gboolean
4358 gi_source_scanner_lex_filename (GISourceScanner *scanner, const gchar *filename)
4359 {
4360   lineno = 1;
4361   yyin = fopen (filename, "r");
4362
4363   while (yylex (scanner) != YYEOF)
4364     ;
4365
4366   fclose (yyin);
4367
4368   return TRUE;
4369 }
4370