47 #define YYBISON_VERSION "3.0.4" 50 #define YYSKELETON_NAME "yacc.c" 82 #define parse_type(ps) builtin_type (parse_gdbarch (ps)) 83 #define parse_d_type(ps) builtin_d_type (parse_gdbarch (ps)) 87 #define GDB_YY_REMAP_PREFIX d_ 97 static int yylex (
void);
106 # ifndef YY_NULLPTRPTR 107 # if defined __cplusplus && 201103L <= __cplusplus 108 # define YY_NULLPTRPTR nullptr 110 # define YY_NULLPTRPTR 0 115 #ifdef YYERROR_VERBOSE 116 # undef YYERROR_VERBOSE 117 # define YYERROR_VERBOSE 1 119 # define YYERROR_VERBOSE 0 186 #define IDENTIFIER 258 187 #define UNKNOWN_NAME 259 190 #define NAME_OR_INT 262 191 #define INTEGER_LITERAL 263 192 #define FLOAT_LITERAL 264 193 #define CHARACTER_LITERAL 265 194 #define STRING_LITERAL 266 197 #define TRUE_KEYWORD 269 198 #define FALSE_KEYWORD 270 199 #define NULL_KEYWORD 271 200 #define SUPER_KEYWORD 272 201 #define CAST_KEYWORD 273 202 #define SIZEOF_KEYWORD 274 203 #define TYPEOF_KEYWORD 275 204 #define TYPEID_KEYWORD 276 205 #define INIT_KEYWORD 277 206 #define IMMUTABLE_KEYWORD 278 207 #define CONST_KEYWORD 279 208 #define SHARED_KEYWORD 280 209 #define STRUCT_KEYWORD 281 210 #define UNION_KEYWORD 282 211 #define CLASS_KEYWORD 283 212 #define INTERFACE_KEYWORD 284 213 #define ENUM_KEYWORD 285 214 #define TEMPLATE_KEYWORD 286 215 #define DELEGATE_KEYWORD 287 216 #define FUNCTION_KEYWORD 288 217 #define DOLLAR_VARIABLE 289 218 #define ASSIGN_MODIFY 290 229 #define NOTIDENTITY 301 230 #define INCREMENT 302 231 #define DECREMENT 303 235 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 266 # define YYSTYPE_IS_TRIVIAL 1 267 # define YYSTYPE_IS_DECLARED 1 315 # ifdef __SIZE_TYPE__ 316 # define YYSIZE_T __SIZE_TYPE__ 317 # elif defined size_t 318 # define YYSIZE_T size_t 319 # elif ! defined YYSIZE_T 321 # define YYSIZE_T size_t 323 # define YYSIZE_T unsigned int 327 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 330 # if defined YYENABLE_NLS && YYENABLE_NLS 332 # include <libintl.h> 333 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 337 # define YY_(Msgid) Msgid 342 # if (defined __GNUC__ \ 343 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 344 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 345 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 347 # define YY_ATTRIBUTE(Spec) 351 #ifndef YY_ATTRIBUTE_PURE 352 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 355 #ifndef YY_ATTRIBUTE_UNUSED 356 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 359 #if !defined _Noreturn \ 360 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 361 # if defined _MSC_VER && 1200 <= _MSC_VER 362 # define _Noreturn __declspec (noreturn) 364 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 369 #if ! defined lint || defined __GNUC__ 370 # define YYUSE(E) ((void) (E)) 375 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 377 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 378 _Pragma ("GCC diagnostic push") \ 379 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 380 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 381 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 382 _Pragma ("GCC diagnostic pop") 384 # define YY_INITIAL_VALUE(Value) Value 386 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 387 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 388 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 390 #ifndef YY_INITIAL_VALUE 391 # define YY_INITIAL_VALUE(Value) 395 #if ! defined yyoverflow || YYERROR_VERBOSE 399 # ifdef YYSTACK_USE_ALLOCA 400 # if YYSTACK_USE_ALLOCA 402 # define YYSTACK_ALLOC __builtin_alloca 403 # elif defined __BUILTIN_VA_ARG_INCR 406 # define YYSTACK_ALLOC __alloca 407 # elif defined _MSC_VER 408 # define alloca _alloca 410 # define YYSTACK_ALLOC alloca 411 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 414 # ifndef EXIT_SUCCESS 415 # define EXIT_SUCCESS 0 422 # ifdef YYSTACK_ALLOC 424 # define YYSTACK_FREE(Ptr) do { ; } while (0) 425 # ifndef YYSTACK_ALLOC_MAXIMUM 430 # define YYSTACK_ALLOC_MAXIMUM 4032 433 # define YYSTACK_ALLOC YYMALLOC 434 # define YYSTACK_FREE YYFREE 435 # ifndef YYSTACK_ALLOC_MAXIMUM 436 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 438 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 439 && ! ((defined YYMALLOC || defined xmalloc) \ 440 && (defined YYFREE || defined xfree))) 442 # ifndef EXIT_SUCCESS 443 # define EXIT_SUCCESS 0 447 # define YYMALLOC xmalloc 448 # if ! defined xmalloc && ! defined EXIT_SUCCESS 453 # define YYFREE xfree 454 # if ! defined xfree && ! defined EXIT_SUCCESS 462 #if (! defined yyoverflow \ 463 && (! defined __cplusplus \ 464 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 474 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 478 # define YYSTACK_BYTES(N) \ 479 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 480 + YYSTACK_GAP_MAXIMUM) 482 # define YYCOPY_NEEDED 1 489 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 492 YYSIZE_T yynewbytes; \ 493 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 494 Stack = &yyptr->Stack_alloc; \ 495 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 496 yyptr += yynewbytes / sizeof (*yyptr); \ 502 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 506 # if defined __GNUC__ && 1 < __GNUC__ 507 # define YYCOPY(Dst, Src, Count) \ 508 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 510 # define YYCOPY(Dst, Src, Count) \ 514 for (yyi = 0; yyi < (Count); yyi++) \ 515 (Dst)[yyi] = (Src)[yyi]; \ 534 #define YYNSTATES 169 539 #define YYMAXUTOK 304 541 #define YYTRANSLATE(YYX) \ 542 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 548 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
549 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
550 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
551 2, 2, 2, 68, 2, 2, 2, 56, 43, 2,
552 64, 69, 54, 52, 36, 53, 62, 55, 2, 2,
553 2, 2, 2, 2, 2, 2, 2, 2, 66, 2,
554 46, 37, 47, 38, 2, 2, 2, 2, 2, 2,
555 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
556 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
557 2, 63, 2, 70, 42, 2, 2, 2, 2, 2,
558 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
559 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
560 2, 2, 2, 2, 41, 2, 67, 2, 2, 2,
561 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
562 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
563 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
564 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
565 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
566 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
567 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
568 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
569 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
570 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
571 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
572 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
573 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
574 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
575 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
576 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
577 35, 39, 40, 44, 45, 48, 49, 50, 51, 57,
585 0, 178, 178, 179, 185, 189, 190, 195, 196, 198,
586 205, 206, 211, 212, 217, 218, 223, 224, 229, 230,
587 235, 236, 241, 242, 243, 244, 248, 250, 255, 257,
588 262, 264, 266, 268, 273, 274, 276, 281, 282, 284,
589 286, 291, 292, 294, 296, 300, 302, 304, 306, 308,
590 310, 312, 314, 316, 318, 319, 323, 327, 333, 334,
591 339, 340, 348, 352, 357, 359, 361, 363, 364, 365,
592 369, 371, 377, 378, 383, 382, 391, 404, 406, 411,
593 413, 461, 512, 514, 522, 529, 533, 537, 542, 547,
594 552, 558, 563, 568, 573, 577, 592, 610, 612, 616,
595 625, 627, 629, 632, 638
599 #if YYDEBUG || YYERROR_VERBOSE || 0 604 "$end",
"error",
"$undefined",
"IDENTIFIER",
"UNKNOWN_NAME",
"TYPENAME",
605 "COMPLETE",
"NAME_OR_INT",
"INTEGER_LITERAL",
"FLOAT_LITERAL",
606 "CHARACTER_LITERAL",
"STRING_LITERAL",
"ENTRY",
"ERROR",
"TRUE_KEYWORD",
607 "FALSE_KEYWORD",
"NULL_KEYWORD",
"SUPER_KEYWORD",
"CAST_KEYWORD",
608 "SIZEOF_KEYWORD",
"TYPEOF_KEYWORD",
"TYPEID_KEYWORD",
"INIT_KEYWORD",
609 "IMMUTABLE_KEYWORD",
"CONST_KEYWORD",
"SHARED_KEYWORD",
"STRUCT_KEYWORD",
610 "UNION_KEYWORD",
"CLASS_KEYWORD",
"INTERFACE_KEYWORD",
"ENUM_KEYWORD",
611 "TEMPLATE_KEYWORD",
"DELEGATE_KEYWORD",
"FUNCTION_KEYWORD",
612 "DOLLAR_VARIABLE",
"ASSIGN_MODIFY",
"','",
"'='",
"'?'",
"OROR",
613 "ANDAND",
"'|'",
"'^'",
"'&'",
"EQUAL",
"NOTEQUAL",
"'<'",
"'>'",
"LEQ",
614 "GEQ",
"LSH",
"RSH",
"'+'",
"'-'",
"'*'",
"'/'",
"'%'",
"HATHAT",
615 "IDENTITY",
"NOTIDENTITY",
"INCREMENT",
"DECREMENT",
"'.'",
"'['",
"'('",
616 "DOTDOT",
"':'",
"'~'",
"'!'",
"')'",
"']'",
"$accept",
"start",
617 "Expression",
"CommaExpression",
"AssignExpression",
618 "ConditionalExpression",
"OrOrExpression",
"AndAndExpression",
619 "OrExpression",
"XorExpression",
"AndExpression",
"CmpExpression",
620 "EqualExpression",
"IdentityExpression",
"RelExpression",
621 "ShiftExpression",
"AddExpression",
"MulExpression",
"UnaryExpression",
622 "CastExpression",
"PowExpression",
"PostfixExpression",
"ArgumentList",
623 "ArgumentList_opt",
"CallExpression",
"$@1",
"IndexExpression",
624 "SliceExpression",
"PrimaryExpression",
"ArrayLiteral",
"IdentifierExp",
625 "StringExp",
"TypeExp",
"BasicType2",
"BasicType",
YY_NULLPTRPTR 634 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
635 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
636 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
637 285, 286, 287, 288, 289, 290, 44, 61, 63, 291,
638 292, 124, 94, 38, 293, 294, 60, 62, 295, 296,
639 297, 298, 43, 45, 42, 47, 37, 299, 300, 301,
640 302, 303, 46, 91, 40, 304, 58, 126, 33, 41,
645 #define YYPACT_NINF -91 647 #define yypact_value_is_default(Yystate) \ 648 (!!((Yystate) == (-91))) 650 #define YYTABLE_NINF -1 652 #define yytable_value_is_error(Yytable_value) \ 659 132, -91, -91, -91, -91, -91, -91, -91, -91, -91,
660 -91, -43, -27, -91, 132, 132, 132, 132, 132, 132,
661 132, 132, 132, 132, 30, -91, -91, 17, -8, 0,
662 14, 21, 35, 12, -91, -91, -91, -91, -1, -34,
663 -31, -91, -91, -91, 43, -91, -91, -91, -91, -91,
664 -91, 72, 22, -37, 6, 132, -91, 22, -91, -91,
665 -91, -91, -91, -91, 49, 16, 19, -49, -91, -91,
666 -91, 132, 132, 132, 132, 132, 132, 132, 132, 132,
667 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
668 132, 132, 132, 132, 132, 132, 132, -91, -91, 9,
669 58, -91, -91, 13, -37, 81, -91, 6, 24, 25,
670 132, -91, -91, 132, -91, -91, -91, 29, 14, 21,
671 35, 12, -91, -9, -9, -9, -9, -9, -9, -34,
672 -34, -9, -9, -31, -31, -31, -91, -91, -91, -91,
673 84, -91, -91, -91, 26, -30, 132, -91, -91, -91,
674 28, 27, 132, -91, -91, -91, 132, -91, 132, -91,
675 33, -37, -91, -91, -91, 38, -91, -91, -91
683 0, 94, 104, 83, 87, 88, 89, 95, 85, 86,
684 84, 0, 0, 82, 0, 0, 0, 0, 0, 0,
685 72, 0, 0, 0, 0, 2, 4, 5, 7, 10,
686 12, 14, 16, 18, 20, 23, 24, 25, 22, 34,
687 37, 41, 54, 55, 58, 67, 68, 69, 60, 91,
688 80, 90, 3, 98, 0, 0, 45, 0, 50, 49,
689 48, 46, 47, 70, 73, 0, 0, 0, 52, 51,
690 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
691 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
692 0, 0, 0, 0, 0, 0, 0, 65, 66, 0,
693 0, 74, 96, 0, 100, 0, 99, 0, 0, 0,
694 0, 93, 79, 97, 6, 9, 8, 0, 13, 15,
695 17, 19, 21, 26, 27, 30, 32, 31, 33, 35,
696 36, 28, 29, 38, 39, 40, 42, 43, 44, 59,
697 62, 61, 64, 77, 70, 0, 72, 53, 81, 101,
698 0, 0, 0, 92, 71, 57, 0, 63, 0, 76,
699 0, 102, 97, 56, 11, 0, 75, 103, 78
705 -91, -91, 1, 42, -13, -47, -91, 39, 40, 46,
706 37, 41, -91, -91, -91, 73, -35, -56, -14, -91,
707 -91, -91, 31, -22, -91, -91, -91, -91, -91, -91,
708 48, -91, 10, -90, -91
714 -1, 24, 25, 26, 27, 28, 29, 30, 31, 32,
715 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
716 43, 44, 64, 65, 45, 146, 46, 47, 48, 49,
725 56, 58, 59, 60, 61, 62, 110, 63, 68, 69,
726 52, 2, 140, 103, 149, 141, 1, 104, 90, 91,
727 113, 54, 66, 93, 94, 95, 105, 72, 142, 73,
728 70, 67, 147, 92, 133, 134, 135, 55, 74, 75,
729 159, 86, 87, 80, 81, 82, 83, 84, 85, 86,
730 87, 129, 130, 71, 76, 79, 109, 88, 89, 115,
731 116, 1, 77, 2, 108, 3, 4, 5, 6, 7,
732 107, 167, 8, 9, 10, 117, 11, 78, 12, 136,
733 137, 138, 139, 102, 103, 110, 111, 144, 112, 150,
734 157, 158, 13, 152, 153, 156, 162, 154, 161, 155,
735 96, 14, 166, 97, 98, 99, 100, 101, 168, 164,
736 15, 16, 17, 114, 118, 121, 119, 151, 18, 19,
737 122, 20, 21, 120, 160, 22, 23, 0, 143, 0,
738 0, 145, 0, 63, 0, 1, 0, 2, 163, 3,
739 4, 5, 6, 7, 0, 165, 8, 9, 10, 0,
740 11, 148, 12, 123, 124, 125, 126, 127, 128, 0,
741 0, 131, 132, 0, 0, 0, 13, 0, 0, 0,
742 0, 0, 0, 0, 0, 14, 0, 0, 0, 0,
743 0, 0, 0, 0, 15, 16, 17, 0, 0, 0,
744 0, 0, 18, 19, 0, 20, 21, 0, 0, 22,
750 14, 15, 16, 17, 18, 19, 36, 20, 22, 23,
751 0, 5, 3, 62, 104, 6, 3, 54, 52, 53,
752 69, 64, 21, 54, 55, 56, 63, 35, 19, 37,
753 0, 21, 19, 67, 90, 91, 92, 64, 38, 39,
754 70, 50, 51, 44, 45, 46, 47, 48, 49, 50,
755 51, 86, 87, 36, 40, 43, 55, 58, 59, 72,
756 73, 3, 41, 5, 54, 7, 8, 9, 10, 11,
757 64, 161, 14, 15, 16, 74, 18, 42, 20, 93,
758 94, 95, 96, 11, 62, 36, 70, 100, 69, 8,
759 6, 65, 34, 69, 69, 66, 69, 110, 70, 113,
760 57, 43, 69, 60, 61, 62, 63, 64, 70, 156,
761 52, 53, 54, 71, 75, 78, 76, 107, 60, 61,
762 79, 63, 64, 77, 146, 67, 68, -1, 70, -1,
763 -1, 100, -1, 146, -1, 3, -1, 5, 152, 7,
764 8, 9, 10, 11, -1, 158, 14, 15, 16, -1,
765 18, 103, 20, 80, 81, 82, 83, 84, 85, -1,
766 -1, 88, 89, -1, -1, -1, 34, -1, -1, -1,
767 -1, -1, -1, -1, -1, 43, -1, -1, -1, -1,
768 -1, -1, -1, -1, 52, 53, 54, -1, -1, -1,
769 -1, -1, 60, 61, -1, 63, 64, -1, -1, 67,
777 0, 3, 5, 7, 8, 9, 10, 11, 14, 15,
778 16, 18, 20, 34, 43, 52, 53, 54, 60, 61,
779 63, 64, 67, 68, 72, 73, 74, 75, 76, 77,
780 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
781 88, 89, 90, 91, 92, 95, 97, 98, 99, 100,
782 101, 102, 103, 105, 64, 64, 89, 103, 89, 89,
783 89, 89, 89, 75, 93, 94, 73, 103, 89, 89,
784 0, 36, 35, 37, 38, 39, 40, 41, 42, 43,
785 44, 45, 46, 47, 48, 49, 50, 51, 58, 59,
786 52, 53, 67, 54, 55, 56, 57, 60, 61, 62,
787 63, 64, 11, 62, 54, 63, 104, 64, 103, 73,
788 36, 70, 69, 69, 74, 75, 75, 73, 78, 79,
789 80, 81, 82, 86, 86, 86, 86, 86, 86, 87,
790 87, 86, 86, 88, 88, 88, 89, 89, 89, 89,
791 3, 6, 19, 70, 75, 93, 96, 19, 101, 104,
792 8, 103, 69, 69, 75, 89, 66, 6, 65, 70,
793 94, 70, 69, 89, 76, 75, 69, 104, 70
799 0, 71, 72, 72, 73, 74, 74, 75, 75, 75,
800 76, 76, 77, 77, 78, 78, 79, 79, 80, 80,
801 81, 81, 82, 82, 82, 82, 83, 83, 84, 84,
802 85, 85, 85, 85, 86, 86, 86, 87, 87, 87,
803 87, 88, 88, 88, 88, 89, 89, 89, 89, 89,
804 89, 89, 89, 89, 89, 89, 90, 90, 91, 91,
805 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
806 93, 93, 94, 94, 96, 95, 97, 98, 98, 99,
807 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
808 99, 99, 99, 100, 101, 102, 102, 103, 103, 103,
809 104, 104, 104, 104, 105
815 0, 2, 1, 1, 1, 1, 3, 1, 3, 3,
816 1, 5, 1, 3, 1, 3, 1, 3, 1, 3,
817 1, 3, 1, 1, 1, 1, 3, 3, 3, 3,
818 3, 3, 3, 3, 1, 3, 3, 1, 3, 3,
819 3, 1, 3, 3, 3, 2, 2, 2, 2, 2,
820 2, 2, 2, 3, 1, 1, 5, 4, 1, 3,
821 1, 3, 3, 4, 3, 2, 2, 1, 1, 1,
822 1, 3, 0, 1, 0, 5, 4, 3, 6, 3,
823 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
824 1, 1, 4, 3, 1, 1, 2, 3, 1, 2,
829 #define yyerrok (yyerrstatus = 0) 830 #define yyclearin (yychar = YYEMPTY) 834 #define YYACCEPT goto yyacceptlab 835 #define YYABORT goto yyabortlab 836 #define YYERROR goto yyerrorlab 839 #define YYRECOVERING() (!!yyerrstatus) 841 #define YYBACKUP(Token, Value) \ 843 if (yychar == YYEMPTY) \ 847 YYPOPSTACK (yylen); \ 853 yyerror (YY_("syntax error: cannot back up")); \ 860 #define YYERRCODE 256 869 # define YYFPRINTF fprintf 872 # define YYDPRINTF(Args) \ 879 #ifndef YY_LOCATION_PRINT 880 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 884 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 888 YYFPRINTF (stderr, "%s ", Title); \ 889 yy_symbol_print (stderr, \ 891 YYFPRINTF (stderr, "\n"); \ 903 FILE *yyo = yyoutput;
938 for (; yybottom <= yytop; yybottom++)
940 int yybot = *yybottom;
946 # define YY_STACK_PRINT(Bottom, Top) \ 949 yy_stack_print ((Bottom), (Top)); \ 963 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
966 for (yyi = 0; yyi < yynrhs; yyi++)
971 &(
yyvsp[(yyi + 1) - (yynrhs)])
977 # define YY_REDUCE_PRINT(Rule) \ 980 yy_reduce_print (yyssp, yyvsp, Rule); \ 987 # define YYDPRINTF(Args) 988 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 989 # define YY_STACK_PRINT(Bottom, Top) 990 # define YY_REDUCE_PRINT(Rule) 996 # define YYINITDEPTH 200 1007 # define YYMAXDEPTH 10000 1014 # if defined __GLIBC__ && defined _STRING_H 1015 # define yystrlen strlen 1019 yystrlen (
const char *yystr)
1030 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1031 # define yystpcpy stpcpy 1036 yystpcpy (
char *yydest,
const char *yysrc)
1039 const char *
yys = yysrc;
1041 while ((*yyd++ = *
yys++) !=
'\0')
1058 yytnamerr (
char *yyres,
const char *yystr)
1063 char const *yyp = yystr;
1070 goto do_not_strip_quotes;
1074 goto do_not_strip_quotes;
1087 do_not_strip_quotes: ;
1091 return yystrlen (yystr);
1093 return yystpcpy (yyres, yystr) - yyres;
1106 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
1111 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1115 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1146 yyarg[yycount++] =
yytname[yytoken];
1152 int yyxbegin = yyn < 0 ? -yyn : 0;
1154 int yychecklim =
YYLAST - yyn + 1;
1158 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1162 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1168 yyarg[yycount++] =
yytname[yyx];
1171 if (! (yysize <= yysize1
1182 # define YYCASE_(N, S) \ 1186 YYCASE_(0,
YY_(
"syntax error"));
1187 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1188 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1189 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1190 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1191 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1196 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1202 if (*yymsg_alloc < yysize)
1204 *yymsg_alloc = 2 * yysize;
1205 if (! (yysize <= *yymsg_alloc
1217 while ((*yyp = *yyformat) !=
'\0')
1218 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1220 yyp += yytnamerr (yyp, yyarg[yyi++]);
1303 char *yymsg = yymsgbuf;
1304 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1307 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1317 YYDPRINTF ((stderr,
"Starting parse\n"));
1353 yyoverflow (
YY_(
"memory exhausted"),
1354 &yyss1, yysize *
sizeof (*
yyssp),
1355 &yyvs1, yysize *
sizeof (*
yyvsp),
1362 # ifndef YYSTACK_RELOCATE 1363 goto yyexhaustedlab;
1367 goto yyexhaustedlab;
1377 goto yyexhaustedlab;
1380 # undef YYSTACK_RELOCATE 1390 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1422 YYDPRINTF ((stderr,
"Reading a token: "));
1429 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1504 #line 1506 "d-exp.c" 1510 #line 1512 "d-exp.c" 1518 #line 1520 "d-exp.c" 1524 #line 1526 "d-exp.c" 1530 #line 1532 "d-exp.c" 1536 #line 1538 "d-exp.c" 1542 #line 1544 "d-exp.c" 1548 #line 1550 "d-exp.c" 1554 #line 1556 "d-exp.c" 1560 #line 1562 "d-exp.c" 1566 #line 1568 "d-exp.c" 1572 #line 1574 "d-exp.c" 1578 #line 1580 "d-exp.c" 1584 #line 1586 "d-exp.c" 1590 #line 1592 "d-exp.c" 1596 #line 1598 "d-exp.c" 1602 #line 1604 "d-exp.c" 1608 #line 1610 "d-exp.c" 1614 #line 1616 "d-exp.c" 1620 #line 1622 "d-exp.c" 1626 #line 1628 "d-exp.c" 1632 #line 1634 "d-exp.c" 1638 #line 1640 "d-exp.c" 1644 #line 1646 "d-exp.c" 1650 #line 1652 "d-exp.c" 1656 #line 1658 "d-exp.c" 1662 #line 1664 "d-exp.c" 1668 #line 1670 "d-exp.c" 1674 #line 1676 "d-exp.c" 1680 #line 1682 "d-exp.c" 1686 #line 1688 "d-exp.c" 1692 #line 1694 "d-exp.c" 1698 #line 1700 "d-exp.c" 1704 #line 1706 "d-exp.c" 1710 #line 1712 "d-exp.c" 1716 #line 1718 "d-exp.c" 1722 #line 1724 "d-exp.c" 1734 #line 1736 "d-exp.c" 1742 #line 1744 "d-exp.c" 1751 #line 1753 "d-exp.c" 1757 #line 1759 "d-exp.c" 1763 #line 1765 "d-exp.c" 1769 #line 1771 "d-exp.c" 1775 #line 1777 "d-exp.c" 1781 #line 1783 "d-exp.c" 1787 #line 1789 "d-exp.c" 1793 #line 1795 "d-exp.c" 1801 #line 1803 "d-exp.c" 1815 #line 1817 "d-exp.c" 1821 #line 1823 "d-exp.c" 1827 #line 1829 "d-exp.c" 1833 #line 1835 "d-exp.c" 1845 &is_a_field_of_this);
1860 else if (is_a_field_of_this.
type != NULL)
1877 if (msymbol.
minsym != NULL)
1880 error (
_(
"No symbol table is loaded. Use the \"file\" command"));
1882 error (
_(
"No symbol \"%s\" in current context."), copy);
1885 #line 1887 "d-exp.c" 1900 int type_name_len = strlen (type_name);
1903 type_name_len, type_name,
1904 (
yyvsp[0].sval).length, (
yyvsp[0].sval).ptr);
1908 (
const struct block *) NULL,
1920 if (msymbol.
minsym != NULL)
1923 error (
_(
"No symbol table is loaded. Use the \"file\" command."));
1925 error (
_(
"No symbol \"%s\" in current context."),
1932 error (
_(
"`%s' is not defined as an aggregate type."),
1940 #line 1942 "d-exp.c" 1946 #line 1948 "d-exp.c" 1958 #line 1960 "d-exp.c" 1969 #line 1971 "d-exp.c" 1977 #line 1979 "d-exp.c" 1985 #line 1987 "d-exp.c" 1994 #line 1996 "d-exp.c" 2003 #line 2005 "d-exp.c" 2012 #line 2014 "d-exp.c" 2019 for (i = 0; i < (
yyvsp[0].svec).
len; ++i)
2022 #line 2024 "d-exp.c" 2031 #line 2033 "d-exp.c" 2037 #line 2039 "d-exp.c" 2043 #line 2045 "d-exp.c" 2054 (
yyval.svec).len = 1;
2055 (
yyval.svec).tokens = vec;
2060 memcpy (vec->
ptr, (
yyvsp[0].tsval).ptr, (
yyvsp[0].tsval).length + 1);
2062 #line 2064 "d-exp.c" 2079 (
yyval.svec).tokens[(
yyval.svec).len - 1].ptr = p;
2081 #line 2083 "d-exp.c" 2087 #line 2089 "d-exp.c" 2095 #line 2097 "d-exp.c" 2105 #line 2107 "d-exp.c" 2111 #line 2113 "d-exp.c" 2117 #line 2119 "d-exp.c" 2124 #line 2126 "d-exp.c" 2131 #line 2133 "d-exp.c" 2137 #line 2139 "d-exp.c" 2141 #line 2143 "d-exp.c" 2190 #if ! YYERROR_VERBOSE 2193 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 2196 char const *yymsgp =
YY_(
"syntax error");
2197 int yysyntax_error_status;
2198 yysyntax_error_status = YYSYNTAX_ERROR;
2199 if (yysyntax_error_status == 0)
2201 else if (yysyntax_error_status == 1)
2203 if (yymsg != yymsgbuf)
2209 yymsg_alloc =
sizeof yymsgbuf;
2210 yysyntax_error_status = 2;
2214 yysyntax_error_status = YYSYNTAX_ERROR;
2219 if (yysyntax_error_status == 2)
2220 goto yyexhaustedlab;
2222 # undef YYSYNTAX_ERROR 2228 if (yyerrstatus == 3)
2330 #if !defined yyoverflow || YYERROR_VERBOSE 2364 if (yymsg != yymsgbuf)
2392 int len,
int parsed_float,
YYSTYPE *putithere)
2405 int found_suffix = 0;
2408 struct type *signed_type;
2409 struct type *unsigned_type;
2416 s = (
char *) alloca (len + 1);
2428 if (len >= 1 && tolower (s[len - 1]) ==
'i')
2430 if (len >= 2 && tolower (s[len - 2]) ==
'f')
2436 else if (len >= 2 && tolower (s[len - 2]) ==
'l')
2450 else if (len >= 1 && tolower (s[len - 1]) ==
'f')
2456 else if (len >= 1 && tolower (s[len - 1]) ==
'l')
2511 if (c >=
'A' && c <=
'Z')
2513 if (c !=
'l' && c !=
'u')
2515 if (c >=
'0' && c <=
'9')
2523 if (base > 10 && c >=
'a' && c <=
'f')
2527 n += i = c -
'a' + 10;
2529 else if (c ==
'l' && long_p == 0)
2534 else if (c ==
'u' && unsigned_p == 0)
2545 if (c !=
'l' && c !=
'u')
2548 if ((n2 / base != prevn) || (n2 + i < prevn))
2549 error (
_(
"Numeric constant too large."));
2563 if (long_p == 0 && (un >> 30) == 0)
2568 if (base == 10 && !unsigned_p)
2590 if (unsigned_p || (n & high_bit))
2627 obstack_free (&
tempbuf, NULL);
2644 else if (c == quote)
2657 if (*tokptr != quote)
2659 if (quote ==
'"' || quote ==
'`')
2660 error (
_(
"Unterminated string in expression."));
2662 error (
_(
"Unmatched single quote."));
2707 {
"&&",
ANDAND, BINOP_END},
2708 {
"||",
OROR, BINOP_END},
2709 {
"^^",
HATHAT, BINOP_END},
2710 {
"<<",
LSH, BINOP_END},
2711 {
">>",
RSH, BINOP_END},
2712 {
"==",
EQUAL, BINOP_END},
2714 {
"<=",
LEQ, BINOP_END},
2715 {
">=",
GEQ, BINOP_END},
2716 {
"..",
DOTDOT, BINOP_END},
2767 const char *tokstart;
2796 switch (c = *tokstart)
2808 else if (saw_structop)
2861 int got_dot = 0, got_e = 0, toktype;
2862 const char *p = tokstart;
2865 if (c ==
'0' && (p[1] ==
'x' || p[1] ==
'X'))
2876 if ((!hex && !got_e && tolower (p[0]) ==
'e')
2877 || (hex && !got_e && tolower (p[0] ==
'p')))
2878 got_dot = got_e = 1;
2882 else if (!got_dot && (p[0] ==
'.' && p[1] !=
'.'))
2885 else if (got_e && (tolower (p[-1]) ==
'e' || tolower (p[-1]) ==
'p')
2886 && (*p ==
'-' || *p ==
'+'))
2891 else if ((*p < '0' || *p >
'9') && (*p !=
'_')
2892 && ((*p < 'a' || *p >
'z') && (*p < 'A' || *p >
'Z')))
2896 toktype =
parse_number (par_state, tokstart, p - tokstart,
2898 if (toktype ==
ERROR)
2900 char *err_copy = (
char *) alloca (p - tokstart + 1);
2902 memcpy (err_copy, tokstart, p - tokstart);
2903 err_copy[p - tokstart] = 0;
2904 error (
_(
"Invalid number \"%s\"."), err_copy);
2912 const char *p = &tokstart[1];
2913 size_t len = strlen (
"entry");
2915 while (isspace (*p))
2917 if (strncmp (p,
"entry", len) == 0 && !isalnum (p[len])
2956 error (
_(
"Empty character constant."));
2957 else if (host_len > 2 && c ==
'\'')
2960 namelen =
lexptr - tokstart - 1;
2963 else if (host_len > 1)
2964 error (
_(
"Invalid character constant."));
2970 if (!(c ==
'_' || c ==
'$' 2971 || (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z')))
2973 error (
_(
"Invalid character '%c' in expression"), c);
2977 for (c = tokstart[namelen];
2978 (c ==
'_' || c ==
'$' || (c >=
'0' && c <=
'9')
2979 || (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z'));)
2980 c = tokstart[++namelen];
2984 if (namelen == 2 && tokstart[0] ==
'i' && tokstart[1] ==
'f')
2993 && (strncmp (tokstart,
"thread", namelen) == 0
2994 || strncmp (tokstart,
"task", namelen) == 0)
2995 && (tokstart[namelen] ==
' ' || tokstart[namelen] ==
'\t'))
2997 const char *p = tokstart + namelen + 1;
2999 while (*p ==
' ' || *p ==
'\t')
3001 if (*p >=
'0' && *p <=
'9')
3023 if (*tokstart ==
'$')
3035 if ((tokstart[0] >=
'a' && tokstart[0] <
'a' +
input_radix - 10)
3036 || (tokstart[0] >=
'A' && tokstart[0] <
'A' +
input_radix - 10))
3039 int hextype =
parse_number (par_state, tokstart, namelen, 0, &newlval);
3089 else if (sym.
symbol == NULL)
3119 if (context == NULL)
3153 struct type *context_type = NULL;
3154 int last_to_examine, next_to_examine, checkpoint;
3155 const struct block *search_block;
3164 return current.
token;
3170 last_was_dot = current.
token ==
'.';
3179 || (!last_was_dot && current.
token !=
'.'))
3182 last_was_dot = !last_was_dot;
3189 next_to_examine = 0;
3206 name_obstack.
clear ();
3212 while (next_to_examine <= last_to_examine)
3238 next_to_examine - 1);
3242 else if (next->
token ==
'.' && !last_was_dot)
3254 next_to_examine = 1;
3259 name_obstack.
clear ();
3261 if (current.
token ==
'.')
3262 search_block = NULL;
3273 last_was_dot = current.
token ==
'.';
3275 while (next_to_examine <= last_to_examine)
3295 checkpoint = next_to_examine;
3298 if (context_type != NULL)
3309 current.
token = classification;
3318 else if (next->
token ==
'.' && !last_was_dot)
3340 return current.
token;
3360 name_obstack.
clear ();
3371 error (
_(
"A %s in expression, near `%s'."), (msg ? msg :
"error"),
lexptr);
#define YYSTACK_ALLOC_MAXIMUM
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define YY_STACK_PRINT(Bottom, Top)
void write_exp_elt_sym(struct parser_state *ps, struct symbol *expelt)
#define parse_language(ps)
#define VEC_replace(T, V, I, O)
static VEC(token_and_value)
struct YYSTYPE::@18 typed_val_int
#define parse_gdbarch(ps)
bool parse_float(const char *p, int len, const struct type *type, gdb_byte *data)
#define yypact_value_is_default(Yystate)
static const yytype_uint8 yydefact[]
#define CHARACTER_LITERAL
#define SYMBOL_CLASS(symbol)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define VEC_block_remove(T, V, I, L)
DEF_VEC_O(token_and_value)
#define INTERFACE_KEYWORD
const struct block * innermost_block
int have_partial_symbols(void)
#define VEC_safe_push(T, V, O)
#define YY_REDUCE_PRINT(Rule)
struct block_symbol lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
void push_type(enum type_pieces tp)
int c_parse_escape(const char **ptr, struct obstack *output)
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
#define YYPRINT(FILE, TYPE, VALUE)
static int saw_name_at_eof
scoped_restore_tmpl< T > make_scoped_restore(T *var)
void push_type_int(int n)
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
struct typed_stoken tsval
void write_exp_elt_block(struct parser_state *ps, const struct block *b)
void write_exp_elt_longcst(struct parser_state *ps, LONGEST expelt)
struct type * check_typedef(struct type *type)
int contained_in(const struct block *a, const struct block *b)
static const yytype_uint8 yystos[]
unsigned short int yytype_uint16
struct type * follow_types(struct type *follow_type)
struct stoken_vector svec
const struct block * block
struct YYSTYPE::@2 typed_val_float
int symbol_read_needs_frame(struct symbol *sym)
static const yytype_int16 yypact[]
int d_parse(struct parser_state *par_state)
#define VEC_index(T, V, I)
struct block_symbol d_lookup_nested_symbol(struct type *, const char *, const struct block *)
static const yytype_uint16 yytoknum[]
void write_dollar_variable(struct parser_state *ps, struct stoken str)
void mark_struct_expression(struct parser_state *ps)
static const char *const yytname[]
static int last_was_structop
unsigned short int yytype_uint16
static const struct token tokentab2[]
static int classify_name(struct parser_state *par_state, const struct block *block)
static const yytype_uint8 yyr2[]
void yyerror(const char *)
#define XRESIZEVEC(T, P, N)
static const yytype_int8 yypgoto[]
void write_exp_msymbol(struct parser_state *ps, struct bound_minimal_symbol bound_msym)
void write_exp_elt_opcode(struct parser_state *ps, enum exp_opcode expelt)
static const struct token tokentab3[]
static const char * lexptr
static int classify_inner_name(struct parser_state *par_state, const struct block *block, struct type *context)
unsigned char yytype_uint8
static int parse_number(struct parser_state *, const char *, int, int, YYSTYPE *)
#define TYPE_CODE(thistype)
static int lex_one_token(struct parser_state *par_state)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
struct minimal_symbol * minsym
#define IMMUTABLE_KEYWORD
static const yytype_int16 yycheck[]
static int type_aggregate_p(struct type *)
struct bound_minimal_symbol lookup_bound_minimal_symbol(const char *name)
#define obstack_grow_str(OBSTACK, STRING)
std::string string_printf(const char *fmt,...)
int have_full_symbols(void)
static const yytype_uint8 yytranslate[]
const struct block * expression_context_block
unsigned long long ULONGEST
struct typed_stoken * tokens
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
unsigned char yytype_uint8
#define SYMBOL_TYPE(symbol)
static const yytype_uint8 yyr1[]
static const yytype_uint16 yyrline[]
struct type * language_lookup_primitive_type(const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
static const yytype_int16 yydefgoto[]
static int parse_string_or_char(const char *tokptr, const char **outptr, struct typed_stoken *value, int *host_chars)
#define TYPE_DECLARED_CLASS(t)
static const char * prev_lexptr
void write_exp_elt_floatcst(struct parser_state *ps, const gdb_byte expelt[16])
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
void write_exp_string(struct parser_state *ps, struct stoken str)
void write_exp_elt_type(struct parser_state *ps, struct type *expelt)
#define yytable_value_is_error(Yytable_value)
void error(const char *fmt,...)
void write_exp_string_vector(struct parser_state *ps, int type, struct stoken_vector *vec)
struct type * lookup_pointer_type(struct type *type)
static struct obstack tempbuf
static const yytype_uint8 yytable[]
static const struct token ident_tokens[]
#define TYPE_SAFE_NAME(type)
char * copy_name(struct stoken token)
static struct parser_state * pstate
#define VEC_ordered_remove(T, V, I)
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)