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