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