1 /* A Bison parser, made by GNU Bison 2.3. */
3 /* Skeleton implementation for Bison's Yacc-like parsers in C
5 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
6 Free Software Foundation, Inc.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 /* As a special exception, you may create a larger work that contains
24 part or all of the Bison parser skeleton and distribute that work
25 under terms of your choice, so long as that work isn't itself a
26 parser generator using the skeleton or a modified version thereof
27 as a parser skeleton. Alternatively, if you modify or redistribute
28 the parser skeleton itself, you may (at your option) remove this
29 special exception, which will cause the skeleton and the resulting
30 Bison output files to be licensed under the GNU General Public
31 License without this special exception.
33 This special exception was added by the Free Software Foundation in
34 version 2.2 of Bison. */
36 /* C LALR(1) parser skeleton written by Richard Stallman, by
37 simplifying the original so-called "semantic" parser. */
39 /* All symbols defined below should begin with yy or YY, to avoid
40 infringing on user name space. This should be done even for local
41 variables, as they might otherwise be expanded by user macros.
42 There are some unavoidable exceptions within include files to
43 define necessary library symbols; they are noted "INFRINGES ON
44 USER NAME SPACE" below. */
46 /* Identify Bison output. */
50 #define YYBISON_VERSION "2.3"
53 #define YYSKELETON_NAME "yacc.c"
58 /* Using locations. */
59 #define YYLSP_NEEDED 0
61 /* Substitute the variable and function names. */
62 #define yyparse cppExpYYparse
63 #define yylex cppExpYYlex
64 #define yyerror cppExpYYerror
65 #define yylval cppExpYYlval
66 #define yychar cppExpYYchar
67 #define yydebug cppExpYYdebug
68 #define yynerrs cppExpYYnerrs
74 /* Put the tokens into the symbol table, so that GDB and other debuggers
77 TOK_QUESTIONMARK = 258,
87 TOK_GREATERTHAN = 268,
88 TOK_LESSTHANOREQUALTO = 269,
89 TOK_GREATERTHANOREQUALTO = 270,
102 TOK_DECIMALINT = 283,
103 TOK_HEXADECIMALINT = 284,
109 #define TOK_QUESTIONMARK 258
110 #define TOK_COLON 259
113 #define TOK_BITWISEOR 262
114 #define TOK_BITWISEXOR 263
115 #define TOK_AMPERSAND 264
116 #define TOK_NOTEQUAL 265
117 #define TOK_EQUAL 266
118 #define TOK_LESSTHAN 267
119 #define TOK_GREATERTHAN 268
120 #define TOK_LESSTHANOREQUALTO 269
121 #define TOK_GREATERTHANOREQUALTO 270
122 #define TOK_SHIFTLEFT 271
123 #define TOK_SHIFTRIGHT 272
125 #define TOK_MINUS 274
127 #define TOK_DIVIDE 276
129 #define TOK_TILDE 278
131 #define TOK_LPAREN 280
132 #define TOK_RPAREN 281
133 #define TOK_OCTALINT 282
134 #define TOK_DECIMALINT 283
135 #define TOK_HEXADECIMALINT 284
136 #define TOK_CHARACTER 285
137 #define TOK_FLOAT 286
142 /* Copy the first part of user declarations. */
146 #include "cppvalue.h"
147 #include "constexp.h"
150 #if defined(_MSC_VER)
154 #define YYSTYPE CPPValue
159 int cppExpYYerror(const char *s)
161 warn(g_constExpFileName,g_constExpLineNr,
162 "warning: preprocessing issue while doing constant expression evaluation: %s",s);
170 /* Enabling traces. */
175 /* Enabling verbose error messages. */
176 #ifdef YYERROR_VERBOSE
177 # undef YYERROR_VERBOSE
178 # define YYERROR_VERBOSE 1
180 # define YYERROR_VERBOSE 0
183 /* Enabling the token table. */
184 #ifndef YYTOKEN_TABLE
185 # define YYTOKEN_TABLE 0
188 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
190 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
191 # define YYSTYPE_IS_DECLARED 1
192 # define YYSTYPE_IS_TRIVIAL 1
197 /* Copy the second part of user declarations. */
200 /* Line 216 of yacc.c. */
208 typedef YYTYPE_UINT8 yytype_uint8;
210 typedef unsigned char yytype_uint8;
214 typedef YYTYPE_INT8 yytype_int8;
215 #elif (defined __STDC__ || defined __C99__FUNC__ \
216 || defined __cplusplus || defined _MSC_VER)
217 typedef signed char yytype_int8;
219 typedef short int yytype_int8;
223 typedef YYTYPE_UINT16 yytype_uint16;
225 typedef unsigned short int yytype_uint16;
229 typedef YYTYPE_INT16 yytype_int16;
231 typedef short int yytype_int16;
235 # ifdef __SIZE_TYPE__
236 # define YYSIZE_T __SIZE_TYPE__
237 # elif defined size_t
238 # define YYSIZE_T size_t
239 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
240 || defined __cplusplus || defined _MSC_VER)
241 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
242 # define YYSIZE_T size_t
244 # define YYSIZE_T unsigned int
248 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
251 # if defined YYENABLE_NLS && YYENABLE_NLS
253 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
254 # define YY_(msgid) dgettext ("bison-runtime", msgid)
258 # define YY_(msgid) msgid
262 /* Suppress unused-variable warnings by "using" E. */
263 #if ! defined lint || defined __GNUC__
264 # define YYUSE(e) ((void) (e))
266 # define YYUSE(e) /* empty */
269 /* Identity function, used to suppress warnings about constant conditions. */
273 #if (defined __STDC__ || defined __C99__FUNC__ \
274 || defined __cplusplus || defined _MSC_VER)
287 #if ! defined yyoverflow || YYERROR_VERBOSE
289 /* The parser invokes alloca or malloc; define the necessary symbols. */
291 # ifdef YYSTACK_USE_ALLOCA
292 # if YYSTACK_USE_ALLOCA
294 # define YYSTACK_ALLOC __builtin_alloca
295 # elif defined __BUILTIN_VA_ARG_INCR
296 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
298 # define YYSTACK_ALLOC __alloca
299 # elif defined _MSC_VER
300 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
301 # define alloca _alloca
303 # define YYSTACK_ALLOC alloca
304 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
305 || defined __cplusplus || defined _MSC_VER)
306 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
315 # ifdef YYSTACK_ALLOC
316 /* Pacify GCC's `empty if-body' warning. */
317 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
318 # ifndef YYSTACK_ALLOC_MAXIMUM
319 /* The OS might guarantee only one guard page at the bottom of the stack,
320 and a page size can be as small as 4096 bytes. So we cannot safely
321 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
322 to allow for a few compiler-allocated temporary stack slots. */
323 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
326 # define YYSTACK_ALLOC YYMALLOC
327 # define YYSTACK_FREE YYFREE
328 # ifndef YYSTACK_ALLOC_MAXIMUM
329 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
331 # if (defined __cplusplus && ! defined _STDLIB_H \
332 && ! ((defined YYMALLOC || defined malloc) \
333 && (defined YYFREE || defined free)))
334 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
340 # define YYMALLOC malloc
341 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
342 || defined __cplusplus || defined _MSC_VER)
343 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
348 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
349 || defined __cplusplus || defined _MSC_VER)
350 void free (void *); /* INFRINGES ON USER NAME SPACE */
354 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
357 #if (! defined yyoverflow \
358 && (! defined __cplusplus \
359 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
361 /* A type that is properly aligned for any stack member. */
368 /* The size of the maximum gap between one aligned stack and the next. */
369 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
371 /* The size of an array large to enough to hold all stacks, each with
373 # define YYSTACK_BYTES(N) \
374 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
375 + YYSTACK_GAP_MAXIMUM)
377 /* Copy COUNT objects from FROM to TO. The source and destination do
380 # if defined __GNUC__ && 1 < __GNUC__
381 # define YYCOPY(To, From, Count) \
382 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
384 # define YYCOPY(To, From, Count) \
388 for (yyi = 0; yyi < (Count); yyi++) \
389 (To)[yyi] = (From)[yyi]; \
395 /* Relocate STACK from its old location to the new one. The
396 local variables YYSIZE and YYSTACKSIZE give the old and new number of
397 elements in the stack, and YYPTR gives the new location of the
398 stack. Advance YYPTR to a properly aligned location for the next
400 # define YYSTACK_RELOCATE(Stack) \
403 YYSIZE_T yynewbytes; \
404 YYCOPY (&yyptr->Stack, Stack, yysize); \
405 Stack = &yyptr->Stack; \
406 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
407 yyptr += yynewbytes / sizeof (*yyptr); \
413 /* YYFINAL -- State number of the termination state. */
415 /* YYLAST -- Last index in YYTABLE. */
418 /* YYNTOKENS -- Number of terminals. */
420 /* YYNNTS -- Number of nonterminals. */
422 /* YYNRULES -- Number of rules. */
424 /* YYNRULES -- Number of states. */
427 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
429 #define YYMAXUTOK 286
431 #define YYTRANSLATE(YYX) \
432 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
434 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
435 static const yytype_uint8 yytranslate[] =
437 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
438 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
439 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
440 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
441 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
442 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
443 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
444 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
450 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
463 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
464 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
465 25, 26, 27, 28, 29, 30, 31
469 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
471 static const yytype_uint8 yyprhs[] =
473 0, 0, 3, 5, 7, 13, 15, 19, 21, 25,
474 27, 31, 33, 37, 39, 43, 45, 49, 53, 55,
475 59, 63, 67, 71, 73, 77, 81, 83, 87, 91,
476 93, 97, 101, 105, 107, 110, 113, 116, 119, 121,
477 125, 127, 129, 131, 133
480 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
481 static const yytype_int8 yyrhs[] =
483 33, 0, -1, 34, -1, 35, -1, 35, 3, 35,
484 4, 35, -1, 36, -1, 35, 5, 36, -1, 37,
485 -1, 36, 6, 37, -1, 38, -1, 37, 7, 38,
486 -1, 39, -1, 38, 8, 39, -1, 40, -1, 39,
487 9, 40, -1, 41, -1, 40, 11, 41, -1, 40,
488 10, 41, -1, 42, -1, 41, 12, 42, -1, 41,
489 13, 42, -1, 41, 14, 42, -1, 41, 15, 42,
490 -1, 43, -1, 42, 16, 43, -1, 42, 17, 43,
491 -1, 44, -1, 43, 18, 44, -1, 43, 19, 44,
492 -1, 45, -1, 44, 20, 45, -1, 44, 21, 45,
493 -1, 44, 22, 45, -1, 46, -1, 18, 45, -1,
494 19, 45, -1, 23, 45, -1, 24, 45, -1, 47,
495 -1, 25, 34, 26, -1, 27, -1, 28, -1, 29,
499 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
500 static const yytype_uint16 yyrline[] =
502 0, 77, 77, 81, 83, 92, 94, 100, 102, 108,
503 110, 117, 119, 125, 127, 133, 135, 139, 145, 147,
504 151, 155, 160, 167, 169, 173, 179, 181, 192, 205,
505 207, 218, 231, 239, 241, 243, 250, 254, 260, 262,
506 266, 268, 270, 272, 274
510 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
511 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
512 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
513 static const char *const yytname[] =
515 "$end", "error", "$undefined", "TOK_QUESTIONMARK", "TOK_COLON",
516 "TOK_OR", "TOK_AND", "TOK_BITWISEOR", "TOK_BITWISEXOR", "TOK_AMPERSAND",
517 "TOK_NOTEQUAL", "TOK_EQUAL", "TOK_LESSTHAN", "TOK_GREATERTHAN",
518 "TOK_LESSTHANOREQUALTO", "TOK_GREATERTHANOREQUALTO", "TOK_SHIFTLEFT",
519 "TOK_SHIFTRIGHT", "TOK_PLUS", "TOK_MINUS", "TOK_STAR", "TOK_DIVIDE",
520 "TOK_MOD", "TOK_TILDE", "TOK_NOT", "TOK_LPAREN", "TOK_RPAREN",
521 "TOK_OCTALINT", "TOK_DECIMALINT", "TOK_HEXADECIMALINT", "TOK_CHARACTER",
522 "TOK_FLOAT", "$accept", "start", "constant_expression",
523 "logical_or_expression", "logical_and_expression",
524 "inclusive_or_expression", "exclusive_or_expression", "and_expression",
525 "equality_expression", "relational_expression", "shift_expression",
526 "additive_expression", "multiplicative_expression", "unary_expression",
527 "primary_expression", "constant", 0
532 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
534 static const yytype_uint16 yytoknum[] =
536 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
537 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
538 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
543 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
544 static const yytype_uint8 yyr1[] =
546 0, 32, 33, 34, 34, 35, 35, 36, 36, 37,
547 37, 38, 38, 39, 39, 40, 40, 40, 41, 41,
548 41, 41, 41, 42, 42, 42, 43, 43, 43, 44,
549 44, 44, 44, 45, 45, 45, 45, 45, 46, 46,
553 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
554 static const yytype_uint8 yyr2[] =
556 0, 2, 1, 1, 5, 1, 3, 1, 3, 1,
557 3, 1, 3, 1, 3, 1, 3, 3, 1, 3,
558 3, 3, 3, 1, 3, 3, 1, 3, 3, 1,
559 3, 3, 3, 1, 2, 2, 2, 2, 1, 3,
563 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
564 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
565 means the default is an error. */
566 static const yytype_uint8 yydefact[] =
568 0, 0, 0, 0, 0, 0, 40, 41, 42, 43,
569 44, 0, 2, 3, 5, 7, 9, 11, 13, 15,
570 18, 23, 26, 29, 33, 38, 34, 35, 36, 37,
571 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
572 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
573 0, 39, 0, 6, 8, 10, 12, 14, 17, 16,
574 19, 20, 21, 22, 24, 25, 27, 28, 30, 31,
578 /* YYDEFGOTO[NTERM-NUM]. */
579 static const yytype_int8 yydefgoto[] =
581 -1, 11, 12, 13, 14, 15, 16, 17, 18, 19,
582 20, 21, 22, 23, 24, 25
585 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
587 #define YYPACT_NINF -29
588 static const yytype_int8 yypact[] =
590 -13, -13, -13, -13, -13, -13, -29, -29, -29, -29,
591 -29, 13, -29, 4, 29, 1, 19, 33, 21, 7,
592 17, 18, 8, -29, -29, -29, -29, -29, -29, -29,
593 20, -29, -13, -13, -13, -13, -13, -13, -13, -13,
594 -13, -13, -13, -13, -13, -13, -13, -13, -13, -13,
595 -13, -29, 34, 29, 1, 19, 33, 21, 7, 7,
596 17, 17, 17, 17, 18, 18, 8, 8, -29, -29,
600 /* YYPGOTO[NTERM-NUM]. */
601 static const yytype_int8 yypgoto[] =
603 -29, -29, 48, -28, 22, 23, 24, 25, 26, 2,
604 -17, 0, 5, -1, -29, -29
607 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
608 positive, shift that token. If negative, reduce the rule which
609 number is the opposite. If zero, do what YYDEFACT says.
610 If YYTABLE_NINF, syntax error. */
611 #define YYTABLE_NINF -1
612 static const yytype_uint8 yytable[] =
614 26, 27, 28, 29, 52, 1, 2, 32, 35, 33,
615 3, 4, 5, 31, 6, 7, 8, 9, 10, 40,
616 41, 42, 43, 60, 61, 62, 63, 36, 48, 49,
617 50, 38, 39, 44, 45, 34, 46, 47, 71, 33,
618 58, 59, 37, 72, 64, 65, 51, 68, 69, 70,
619 33, 66, 67, 30, 0, 53, 0, 54, 0, 55,
623 static const yytype_int8 yycheck[] =
625 1, 2, 3, 4, 32, 18, 19, 3, 7, 5,
626 23, 24, 25, 0, 27, 28, 29, 30, 31, 12,
627 13, 14, 15, 40, 41, 42, 43, 8, 20, 21,
628 22, 10, 11, 16, 17, 6, 18, 19, 4, 5,
629 38, 39, 9, 71, 44, 45, 26, 48, 49, 50,
630 5, 46, 47, 5, -1, 33, -1, 34, -1, 35,
634 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
635 symbol of state STATE-NUM. */
636 static const yytype_uint8 yystos[] =
638 0, 18, 19, 23, 24, 25, 27, 28, 29, 30,
639 31, 33, 34, 35, 36, 37, 38, 39, 40, 41,
640 42, 43, 44, 45, 46, 47, 45, 45, 45, 45,
641 34, 0, 3, 5, 6, 7, 8, 9, 10, 11,
642 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
643 22, 26, 35, 36, 37, 38, 39, 40, 41, 41,
644 42, 42, 42, 42, 43, 43, 44, 44, 45, 45,
648 #define yyerrok (yyerrstatus = 0)
649 #define yyclearin (yychar = YYEMPTY)
653 #define YYACCEPT goto yyacceptlab
654 #define YYABORT goto yyabortlab
655 #define YYERROR goto yyerrorlab
658 /* Like YYERROR except do call yyerror. This remains here temporarily
659 to ease the transition to the new meaning of YYERROR, for GCC.
660 Once GCC version 2 has supplanted version 1, this can go. */
662 #define YYFAIL goto yyerrlab
664 #define YYRECOVERING() (!!yyerrstatus)
666 #define YYBACKUP(Token, Value) \
668 if (yychar == YYEMPTY && yylen == 1) \
672 yytoken = YYTRANSLATE (yychar); \
678 yyerror (YY_("syntax error: cannot back up")); \
685 #define YYERRCODE 256
688 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
689 If N is 0, then set CURRENT to the empty location which ends
690 the previous symbol: RHS[0] (always defined). */
692 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
693 #ifndef YYLLOC_DEFAULT
694 # define YYLLOC_DEFAULT(Current, Rhs, N) \
698 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
699 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
700 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
701 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
705 (Current).first_line = (Current).last_line = \
706 YYRHSLOC (Rhs, 0).last_line; \
707 (Current).first_column = (Current).last_column = \
708 YYRHSLOC (Rhs, 0).last_column; \
714 /* YY_LOCATION_PRINT -- Print the location on the stream.
715 This macro was not mandated originally: define only if we know
716 we won't break user code: when these are the locations we know. */
718 #ifndef YY_LOCATION_PRINT
719 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
720 # define YY_LOCATION_PRINT(File, Loc) \
721 fprintf (File, "%d.%d-%d.%d", \
722 (Loc).first_line, (Loc).first_column, \
723 (Loc).last_line, (Loc).last_column)
725 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
730 /* YYLEX -- calling `yylex' with the right arguments. */
733 # define YYLEX yylex (YYLEX_PARAM)
735 # define YYLEX yylex ()
738 /* Enable debugging if requested. */
742 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
743 # define YYFPRINTF fprintf
746 # define YYDPRINTF(Args) \
752 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
756 YYFPRINTF (stderr, "%s ", Title); \
757 yy_symbol_print (stderr, \
759 YYFPRINTF (stderr, "\n"); \
764 /*--------------------------------.
765 | Print this symbol on YYOUTPUT. |
766 `--------------------------------*/
769 #if (defined __STDC__ || defined __C99__FUNC__ \
770 || defined __cplusplus || defined _MSC_VER)
772 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
775 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
778 YYSTYPE const * const yyvaluep;
784 if (yytype < YYNTOKENS)
785 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
797 /*--------------------------------.
798 | Print this symbol on YYOUTPUT. |
799 `--------------------------------*/
801 #if (defined __STDC__ || defined __C99__FUNC__ \
802 || defined __cplusplus || defined _MSC_VER)
804 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
807 yy_symbol_print (yyoutput, yytype, yyvaluep)
810 YYSTYPE const * const yyvaluep;
813 if (yytype < YYNTOKENS)
814 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
816 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
818 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
819 YYFPRINTF (yyoutput, ")");
822 /*------------------------------------------------------------------.
823 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
825 `------------------------------------------------------------------*/
827 #if (defined __STDC__ || defined __C99__FUNC__ \
828 || defined __cplusplus || defined _MSC_VER)
830 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
833 yy_stack_print (bottom, top)
834 yytype_int16 *bottom;
838 YYFPRINTF (stderr, "Stack now");
839 for (; bottom <= top; ++bottom)
840 YYFPRINTF (stderr, " %d", *bottom);
841 YYFPRINTF (stderr, "\n");
844 # define YY_STACK_PRINT(Bottom, Top) \
847 yy_stack_print ((Bottom), (Top)); \
851 /*------------------------------------------------.
852 | Report that the YYRULE is going to be reduced. |
853 `------------------------------------------------*/
855 #if (defined __STDC__ || defined __C99__FUNC__ \
856 || defined __cplusplus || defined _MSC_VER)
858 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
861 yy_reduce_print (yyvsp, yyrule)
866 int yynrhs = yyr2[yyrule];
868 unsigned long int yylno = yyrline[yyrule];
869 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
871 /* The symbols being reduced. */
872 for (yyi = 0; yyi < yynrhs; yyi++)
874 fprintf (stderr, " $%d = ", yyi + 1);
875 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
876 &(yyvsp[(yyi + 1) - (yynrhs)])
878 fprintf (stderr, "\n");
882 # define YY_REDUCE_PRINT(Rule) \
885 yy_reduce_print (yyvsp, Rule); \
888 /* Nonzero means print parse trace. It is left uninitialized so that
889 multiple parsers can coexist. */
892 # define YYDPRINTF(Args)
893 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
894 # define YY_STACK_PRINT(Bottom, Top)
895 # define YY_REDUCE_PRINT(Rule)
896 #endif /* !YYDEBUG */
899 /* YYINITDEPTH -- initial size of the parser's stacks. */
901 # define YYINITDEPTH 200
904 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
905 if the built-in stack extension method is used).
907 Do not make this value too large; the results are undefined if
908 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
909 evaluated with infinite-precision integer arithmetic. */
912 # define YYMAXDEPTH 10000
920 # if defined __GLIBC__ && defined _STRING_H
921 # define yystrlen strlen
923 /* Return the length of YYSTR. */
924 #if (defined __STDC__ || defined __C99__FUNC__ \
925 || defined __cplusplus || defined _MSC_VER)
927 yystrlen (const char *yystr)
935 for (yylen = 0; yystr[yylen]; yylen++)
943 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
944 # define yystpcpy stpcpy
946 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
948 #if (defined __STDC__ || defined __C99__FUNC__ \
949 || defined __cplusplus || defined _MSC_VER)
951 yystpcpy (char *yydest, const char *yysrc)
954 yystpcpy (yydest, yysrc)
960 const char *yys = yysrc;
962 while ((*yyd++ = *yys++) != '\0')
971 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
972 quotes and backslashes, so that it's suitable for yyerror. The
973 heuristic is that double-quoting is unnecessary unless the string
974 contains an apostrophe, a comma, or backslash (other than
975 backslash-backslash). YYSTR is taken from yytname. If YYRES is
976 null, do not copy; instead, return the length of what the result
979 yytnamerr (char *yyres, const char *yystr)
984 char const *yyp = yystr;
991 goto do_not_strip_quotes;
995 goto do_not_strip_quotes;
1008 do_not_strip_quotes: ;
1012 return yystrlen (yystr);
1014 return yystpcpy (yyres, yystr) - yyres;
1018 /* Copy into YYRESULT an error message about the unexpected token
1019 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1020 including the terminating null byte. If YYRESULT is null, do not
1021 copy anything; just return the number of bytes that would be
1022 copied. As a special case, return 0 if an ordinary "syntax error"
1023 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1024 size calculation. */
1026 yysyntax_error (char *yyresult, int yystate, int yychar)
1028 int yyn = yypact[yystate];
1030 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1034 int yytype = YYTRANSLATE (yychar);
1035 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1036 YYSIZE_T yysize = yysize0;
1038 int yysize_overflow = 0;
1039 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1040 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1044 /* This is so xgettext sees the translatable formats that are
1045 constructed on the fly. */
1046 YY_("syntax error, unexpected %s");
1047 YY_("syntax error, unexpected %s, expecting %s");
1048 YY_("syntax error, unexpected %s, expecting %s or %s");
1049 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1050 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1054 static char const yyunexpected[] = "syntax error, unexpected %s";
1055 static char const yyexpecting[] = ", expecting %s";
1056 static char const yyor[] = " or %s";
1057 char yyformat[sizeof yyunexpected
1058 + sizeof yyexpecting - 1
1059 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1060 * (sizeof yyor - 1))];
1061 char const *yyprefix = yyexpecting;
1063 /* Start YYX at -YYN if negative to avoid negative indexes in
1065 int yyxbegin = yyn < 0 ? -yyn : 0;
1067 /* Stay within bounds of both yycheck and yytname. */
1068 int yychecklim = YYLAST - yyn + 1;
1069 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1072 yyarg[0] = yytname[yytype];
1073 yyfmt = yystpcpy (yyformat, yyunexpected);
1075 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1076 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1078 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1082 yyformat[sizeof yyunexpected - 1] = '\0';
1085 yyarg[yycount++] = yytname[yyx];
1086 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1087 yysize_overflow |= (yysize1 < yysize);
1089 yyfmt = yystpcpy (yyfmt, yyprefix);
1093 yyf = YY_(yyformat);
1094 yysize1 = yysize + yystrlen (yyf);
1095 yysize_overflow |= (yysize1 < yysize);
1098 if (yysize_overflow)
1099 return YYSIZE_MAXIMUM;
1103 /* Avoid sprintf, as that infringes on the user's name space.
1104 Don't have undefined behavior even if the translation
1105 produced a string with the wrong number of "%s"s. */
1106 char *yyp = yyresult;
1108 while ((*yyp = *yyf) != '\0')
1110 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1112 yyp += yytnamerr (yyp, yyarg[yyi++]);
1125 #endif /* YYERROR_VERBOSE */
1128 /*-----------------------------------------------.
1129 | Release the memory associated to this symbol. |
1130 `-----------------------------------------------*/
1133 #if (defined __STDC__ || defined __C99__FUNC__ \
1134 || defined __cplusplus || defined _MSC_VER)
1136 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1139 yydestruct (yymsg, yytype, yyvaluep)
1149 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1160 /* Prevent warnings from -Wmissing-prototypes. */
1162 #ifdef YYPARSE_PARAM
1163 #if defined __STDC__ || defined __cplusplus
1164 int yyparse (void *YYPARSE_PARAM);
1168 #else /* ! YYPARSE_PARAM */
1169 #if defined __STDC__ || defined __cplusplus
1174 #endif /* ! YYPARSE_PARAM */
1178 /* The look-ahead symbol. */
1181 /* The semantic value of the look-ahead symbol. */
1184 /* Number of syntax errors so far. */
1193 #ifdef YYPARSE_PARAM
1194 #if (defined __STDC__ || defined __C99__FUNC__ \
1195 || defined __cplusplus || defined _MSC_VER)
1197 yyparse (void *YYPARSE_PARAM)
1200 yyparse (YYPARSE_PARAM)
1201 void *YYPARSE_PARAM;
1203 #else /* ! YYPARSE_PARAM */
1204 #if (defined __STDC__ || defined __C99__FUNC__ \
1205 || defined __cplusplus || defined _MSC_VER)
1219 /* Number of tokens to shift before error messages enabled. */
1221 /* Look-ahead token as an internal (translated) token number. */
1224 /* Buffer for error messages, and its allocated size. */
1226 char *yymsg = yymsgbuf;
1227 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1230 /* Three stacks and their tools:
1231 `yyss': related to states,
1232 `yyvs': related to semantic values,
1233 `yyls': related to locations.
1235 Refer to the stacks thru separate pointers, to allow yyoverflow
1236 to reallocate them elsewhere. */
1238 /* The state stack. */
1239 yytype_int16 yyssa[YYINITDEPTH];
1240 yytype_int16 *yyss = yyssa;
1241 yytype_int16 *yyssp;
1243 /* The semantic value stack. */
1244 YYSTYPE yyvsa[YYINITDEPTH];
1245 YYSTYPE *yyvs = yyvsa;
1250 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1252 YYSIZE_T yystacksize = YYINITDEPTH;
1254 /* The variables used to return semantic value and location from the
1259 /* The number of symbols on the RHS of the reduced rule.
1260 Keep to zero when no symbol should be popped. */
1263 YYDPRINTF ((stderr, "Starting parse\n"));
1268 yychar = YYEMPTY; /* Cause a token to be read. */
1270 /* Initialize stack pointers.
1271 Waste one element of value and location stack
1272 so that they stay on the same level as the state stack.
1273 The wasted elements are never initialized. */
1280 /*------------------------------------------------------------.
1281 | yynewstate -- Push a new state, which is found in yystate. |
1282 `------------------------------------------------------------*/
1284 /* In all cases, when you get here, the value and location stacks
1285 have just been pushed. So pushing a state here evens the stacks. */
1291 if (yyss + yystacksize - 1 <= yyssp)
1293 /* Get the current used size of the three stacks, in elements. */
1294 YYSIZE_T yysize = yyssp - yyss + 1;
1298 /* Give user a chance to reallocate the stack. Use copies of
1299 these so that the &'s don't force the real ones into
1301 YYSTYPE *yyvs1 = yyvs;
1302 yytype_int16 *yyss1 = yyss;
1305 /* Each stack pointer address is followed by the size of the
1306 data in use in that stack, in bytes. This used to be a
1307 conditional around just the two extra args, but that might
1308 be undefined if yyoverflow is a macro. */
1309 yyoverflow (YY_("memory exhausted"),
1310 &yyss1, yysize * sizeof (*yyssp),
1311 &yyvs1, yysize * sizeof (*yyvsp),
1318 #else /* no yyoverflow */
1319 # ifndef YYSTACK_RELOCATE
1320 goto yyexhaustedlab;
1322 /* Extend the stack our own way. */
1323 if (YYMAXDEPTH <= yystacksize)
1324 goto yyexhaustedlab;
1326 if (YYMAXDEPTH < yystacksize)
1327 yystacksize = YYMAXDEPTH;
1330 yytype_int16 *yyss1 = yyss;
1331 union yyalloc *yyptr =
1332 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1334 goto yyexhaustedlab;
1335 YYSTACK_RELOCATE (yyss);
1336 YYSTACK_RELOCATE (yyvs);
1338 # undef YYSTACK_RELOCATE
1340 YYSTACK_FREE (yyss1);
1343 #endif /* no yyoverflow */
1345 yyssp = yyss + yysize - 1;
1346 yyvsp = yyvs + yysize - 1;
1349 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1350 (unsigned long int) yystacksize));
1352 if (yyss + yystacksize - 1 <= yyssp)
1356 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1365 /* Do appropriate processing given the current state. Read a
1366 look-ahead token if we need one and don't already have one. */
1368 /* First try to decide what to do without reference to look-ahead token. */
1369 yyn = yypact[yystate];
1370 if (yyn == YYPACT_NINF)
1373 /* Not known => get a look-ahead token if don't already have one. */
1375 /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1376 if (yychar == YYEMPTY)
1378 YYDPRINTF ((stderr, "Reading a token: "));
1382 if (yychar <= YYEOF)
1384 yychar = yytoken = YYEOF;
1385 YYDPRINTF ((stderr, "Now at end of input.\n"));
1389 yytoken = YYTRANSLATE (yychar);
1390 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1393 /* If the proper action on seeing token YYTOKEN is to reduce or to
1394 detect an error, take that action. */
1396 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1401 if (yyn == 0 || yyn == YYTABLE_NINF)
1410 /* Count tokens shifted since error; after three, turn off error
1415 /* Shift the look-ahead token. */
1416 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1418 /* Discard the shifted token unless it is eof. */
1419 if (yychar != YYEOF)
1428 /*-----------------------------------------------------------.
1429 | yydefault -- do the default action for the current state. |
1430 `-----------------------------------------------------------*/
1432 yyn = yydefact[yystate];
1438 /*-----------------------------.
1439 | yyreduce -- Do a reduction. |
1440 `-----------------------------*/
1442 /* yyn is the number of a rule to reduce with. */
1445 /* If YYLEN is nonzero, implement the default value of the action:
1448 Otherwise, the following line sets YYVAL to garbage.
1449 This behavior is undocumented and Bison
1450 users should not rely upon it. Assigning to YYVAL
1451 unconditionally makes the parser a bit smaller, and it avoids a
1452 GCC warning that YYVAL may be used uninitialized. */
1453 yyval = yyvsp[1-yylen];
1456 YY_REDUCE_PRINT (yyn);
1461 { g_resultValue = (yyvsp[(1) - (1)]); return 0; ;}
1466 { (yyval) = (yyvsp[(1) - (1)]); ;}
1472 bool c = ((yyvsp[(1) - (5)]).isInt() ? ((long)(yyvsp[(1) - (5)]) != 0) : ((double)(yyvsp[(1) - (5)]) != 0.0));
1473 (yyval) = c ? (yyvsp[(3) - (5)]) : (yyvsp[(5) - (5)]);
1479 { (yyval) = (yyvsp[(1) - (1)]); ;}
1485 (yyval) = CPPValue( (long)((long)(yyvsp[(1) - (3)]) || (long)(yyvsp[(3) - (3)])) );
1491 { (yyval) = (yyvsp[(1) - (1)]); ;}
1497 (yyval) = CPPValue( (long)((long)(yyvsp[(1) - (3)]) && (long)(yyvsp[(3) - (3)])) );
1503 { (yyval) = (yyvsp[(1) - (1)]); ;}
1509 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) | (long)(yyvsp[(3) - (3)]) );
1515 { (yyval) = (yyvsp[(1) - (1)]); ;}
1521 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) ^ (long)(yyvsp[(3) - (3)]) );
1527 { (yyval) = (yyvsp[(1) - (1)]); ;}
1533 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) & (long)(yyvsp[(3) - (3)]) );
1539 { (yyval) = (yyvsp[(1) - (1)]); ;}
1545 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) == (double)(yyvsp[(3) - (3)])) );
1552 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) != (double)(yyvsp[(3) - (3)])) );
1558 { (yyval) = (yyvsp[(1) - (1)]); ;}
1564 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) < (double)(yyvsp[(3) - (3)])) );
1571 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) > (double)(yyvsp[(3) - (3)])) );
1578 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) <= (double)(yyvsp[(3) - (3)])) );
1585 (yyval) = CPPValue( (long)((double)(yyvsp[(1) - (3)]) >= (double)(yyvsp[(3) - (3)])) );
1591 { (yyval) = (yyvsp[(1) - (1)]); ;}
1597 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) << (long)(yyvsp[(3) - (3)]) );
1604 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) >> (long)(yyvsp[(3) - (3)]) );
1610 { (yyval) = (yyvsp[(1) - (1)]); ;}
1616 if (!(yyvsp[(1) - (3)]).isInt() || !(yyvsp[(3) - (3)]).isInt())
1618 (yyval) = CPPValue( (double)(yyvsp[(1) - (3)]) + (double)(yyvsp[(3) - (3)]) );
1622 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) + (long)(yyvsp[(3) - (3)]) );
1630 if (!(yyvsp[(1) - (3)]).isInt() || !(yyvsp[(3) - (3)]).isInt())
1632 (yyval) = CPPValue( (double)(yyvsp[(1) - (3)]) - (double)(yyvsp[(3) - (3)]) );
1636 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) - (long)(yyvsp[(3) - (3)]) );
1643 { (yyval) = (yyvsp[(1) - (1)]); ;}
1649 if (!(yyvsp[(1) - (3)]).isInt() || !(yyvsp[(3) - (3)]).isInt())
1651 (yyval) = CPPValue( (double)(yyvsp[(1) - (3)]) * (double)(yyvsp[(3) - (3)]) );
1655 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) * (long)(yyvsp[(3) - (3)]) );
1663 if (!(yyvsp[(1) - (3)]).isInt() || !(yyvsp[(3) - (3)]).isInt())
1665 (yyval) = CPPValue( (double)(yyvsp[(1) - (3)]) / (double)(yyvsp[(3) - (3)]) );
1669 long value = (yyvsp[(3) - (3)]);
1670 if (value==0) value=1;
1671 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) / value );
1679 long value = (yyvsp[(3) - (3)]);
1680 if (value==0) value=1;
1681 (yyval) = CPPValue( (long)(yyvsp[(1) - (3)]) % value );
1687 { (yyval) = (yyvsp[(1) - (1)]); ;}
1692 { (yyval) = (yyvsp[(1) - (2)]); ;}
1698 if ((yyvsp[(2) - (2)]).isInt())
1699 (yyval) = CPPValue(-(long)(yyvsp[(2) - (2)]));
1701 (yyval) = CPPValue(-(double)(yyvsp[(2) - (2)]));
1708 (yyval) = CPPValue(~(long)(yyvsp[(2) - (2)]));
1715 (yyval) = CPPValue((long)!(long)(yyvsp[(2) - (2)]));
1721 { (yyval) = (yyvsp[(1) - (1)]); ;}
1726 { (yyval) = (yyvsp[(2) - (3)]); ;}
1731 { (yyval) = parseOctal(); ;}
1736 { (yyval) = parseDecimal(); ;}
1741 { (yyval) = parseHexadecimal(); ;}
1746 { (yyval) = parseCharacter(); ;}
1751 { (yyval) = parseFloat(); ;}
1755 /* Line 1267 of yacc.c. */
1759 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
1763 YY_STACK_PRINT (yyss, yyssp);
1768 /* Now `shift' the result of the reduction. Determine what state
1769 that goes to, based on the state we popped back to and the rule
1770 number reduced by. */
1774 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1775 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1776 yystate = yytable[yystate];
1778 yystate = yydefgoto[yyn - YYNTOKENS];
1783 /*------------------------------------.
1784 | yyerrlab -- here on detecting error |
1785 `------------------------------------*/
1787 /* If not already recovering from an error, report this error. */
1791 #if ! YYERROR_VERBOSE
1792 yyerror (YY_("syntax error"));
1795 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
1796 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
1798 YYSIZE_T yyalloc = 2 * yysize;
1799 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
1800 yyalloc = YYSTACK_ALLOC_MAXIMUM;
1801 if (yymsg != yymsgbuf)
1802 YYSTACK_FREE (yymsg);
1803 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
1805 yymsg_alloc = yyalloc;
1809 yymsg_alloc = sizeof yymsgbuf;
1813 if (0 < yysize && yysize <= yymsg_alloc)
1815 (void) yysyntax_error (yymsg, yystate, yychar);
1820 yyerror (YY_("syntax error"));
1822 goto yyexhaustedlab;
1830 if (yyerrstatus == 3)
1832 /* If just tried and failed to reuse look-ahead token after an
1833 error, discard it. */
1835 if (yychar <= YYEOF)
1837 /* Return failure if at end of input. */
1838 if (yychar == YYEOF)
1843 yydestruct ("Error: discarding",
1849 /* Else will try to reuse look-ahead token after shifting the error
1854 /*---------------------------------------------------.
1855 | yyerrorlab -- error raised explicitly by YYERROR. |
1856 `---------------------------------------------------*/
1859 /* Pacify compilers like GCC when the user code never invokes
1860 YYERROR and the label yyerrorlab therefore never appears in user
1862 if (/*CONSTCOND*/ 0)
1865 /* Do not reclaim the symbols of the rule which action triggered
1869 YY_STACK_PRINT (yyss, yyssp);
1874 /*-------------------------------------------------------------.
1875 | yyerrlab1 -- common code for both syntax error and YYERROR. |
1876 `-------------------------------------------------------------*/
1878 yyerrstatus = 3; /* Each real token shifted decrements this. */
1882 yyn = yypact[yystate];
1883 if (yyn != YYPACT_NINF)
1886 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1894 /* Pop the current state because it cannot handle the error token. */
1899 yydestruct ("Error: popping",
1900 yystos[yystate], yyvsp);
1903 YY_STACK_PRINT (yyss, yyssp);
1912 /* Shift the error token. */
1913 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
1919 /*-------------------------------------.
1920 | yyacceptlab -- YYACCEPT comes here. |
1921 `-------------------------------------*/
1926 /*-----------------------------------.
1927 | yyabortlab -- YYABORT comes here. |
1928 `-----------------------------------*/
1934 /*-------------------------------------------------.
1935 | yyexhaustedlab -- memory exhaustion comes here. |
1936 `-------------------------------------------------*/
1938 yyerror (YY_("memory exhausted"));
1944 if (yychar != YYEOF && yychar != YYEMPTY)
1945 yydestruct ("Cleanup: discarding lookahead",
1947 /* Do not reclaim the symbols of the rule which action triggered
1948 this YYABORT or YYACCEPT. */
1950 YY_STACK_PRINT (yyss, yyssp);
1951 while (yyssp != yyss)
1953 yydestruct ("Cleanup: popping",
1954 yystos[*yyssp], yyvsp);
1959 YYSTACK_FREE (yyss);
1962 if (yymsg != yymsgbuf)
1963 YYSTACK_FREE (yymsg);
1965 /* Make sure YYID is used. */
1966 return YYID (yyresult);