47 #define YYBISON_VERSION "3.0.4" 50 #define YYSKELETON_NAME "yacc.c" 81 #define parse_type(ps) builtin_type (parse_gdbarch (ps)) 85 #define GDB_YY_REMAP_PREFIX pascal_ 95 static int yylex (
void);
99 static char *
uptok (
const char *,
int);
103 # ifndef YY_NULLPTRPTR 104 # if defined __cplusplus && 201103L <= __cplusplus 105 # define YY_NULLPTRPTR nullptr 107 # define YY_NULLPTRPTR 0 112 #ifdef YYERROR_VERBOSE 113 # undef YYERROR_VERBOSE 114 # define YYERROR_VERBOSE 1 116 # define YYERROR_VERBOSE 0 174 #define FIELDNAME 261 178 #define NAME_OR_INT 265 182 #define COLONCOLON 269 186 #define TRUEKEYWORD 273 187 #define FALSEKEYWORD 274 188 #define ABOVE_COMMA 275 202 #define INCREMENT 289 203 #define DECREMENT 290 205 #define BLOCKNAME 292 208 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 241 # define YYSTYPE_IS_TRIVIAL 1 242 # define YYSTYPE_IS_DECLARED 1 257 const char *,
int,
int,
YYSTYPE *);
297 # ifdef __SIZE_TYPE__ 298 # define YYSIZE_T __SIZE_TYPE__ 299 # elif defined size_t 300 # define YYSIZE_T size_t 301 # elif ! defined YYSIZE_T 303 # define YYSIZE_T size_t 305 # define YYSIZE_T unsigned int 309 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 312 # if defined YYENABLE_NLS && YYENABLE_NLS 314 # include <libintl.h> 315 # define YY_(Msgid) dgettext ("bison-runtime", Msgid) 319 # define YY_(Msgid) Msgid 324 # if (defined __GNUC__ \ 325 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ 326 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C 327 # define YY_ATTRIBUTE(Spec) __attribute__(Spec) 329 # define YY_ATTRIBUTE(Spec) 333 #ifndef YY_ATTRIBUTE_PURE 334 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) 337 #ifndef YY_ATTRIBUTE_UNUSED 338 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) 341 #if !defined _Noreturn \ 342 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) 343 # if defined _MSC_VER && 1200 <= _MSC_VER 344 # define _Noreturn __declspec (noreturn) 346 # define _Noreturn YY_ATTRIBUTE ((__noreturn__)) 351 #if ! defined lint || defined __GNUC__ 352 # define YYUSE(E) ((void) (E)) 357 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 359 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 360 _Pragma ("GCC diagnostic push") \ 361 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 362 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 363 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 364 _Pragma ("GCC diagnostic pop") 366 # define YY_INITIAL_VALUE(Value) Value 368 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 369 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 370 # define YY_IGNORE_MAYBE_UNINITIALIZED_END 372 #ifndef YY_INITIAL_VALUE 373 # define YY_INITIAL_VALUE(Value) 377 #if ! defined yyoverflow || YYERROR_VERBOSE 381 # ifdef YYSTACK_USE_ALLOCA 382 # if YYSTACK_USE_ALLOCA 384 # define YYSTACK_ALLOC __builtin_alloca 385 # elif defined __BUILTIN_VA_ARG_INCR 388 # define YYSTACK_ALLOC __alloca 389 # elif defined _MSC_VER 390 # define alloca _alloca 392 # define YYSTACK_ALLOC alloca 393 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS 396 # ifndef EXIT_SUCCESS 397 # define EXIT_SUCCESS 0 404 # ifdef YYSTACK_ALLOC 406 # define YYSTACK_FREE(Ptr) do { ; } while (0) 407 # ifndef YYSTACK_ALLOC_MAXIMUM 412 # define YYSTACK_ALLOC_MAXIMUM 4032 415 # define YYSTACK_ALLOC YYMALLOC 416 # define YYSTACK_FREE YYFREE 417 # ifndef YYSTACK_ALLOC_MAXIMUM 418 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 420 # if (defined __cplusplus && ! defined EXIT_SUCCESS \ 421 && ! ((defined YYMALLOC || defined xmalloc) \ 422 && (defined YYFREE || defined xfree))) 424 # ifndef EXIT_SUCCESS 425 # define EXIT_SUCCESS 0 429 # define YYMALLOC xmalloc 430 # if ! defined xmalloc && ! defined EXIT_SUCCESS 435 # define YYFREE xfree 436 # if ! defined xfree && ! defined EXIT_SUCCESS 444 #if (! defined yyoverflow \ 445 && (! defined __cplusplus \ 446 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 456 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 460 # define YYSTACK_BYTES(N) \ 461 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 462 + YYSTACK_GAP_MAXIMUM) 464 # define YYCOPY_NEEDED 1 471 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 474 YYSIZE_T yynewbytes; \ 475 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 476 Stack = &yyptr->Stack_alloc; \ 477 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 478 yyptr += yynewbytes / sizeof (*yyptr); \ 484 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED 488 # if defined __GNUC__ && 1 < __GNUC__ 489 # define YYCOPY(Dst, Src, Count) \ 490 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 492 # define YYCOPY(Dst, Src, Count) \ 496 for (yyi = 0; yyi < (Count); yyi++) \ 497 (Dst)[yyi] = (Src)[yyi]; \ 516 #define YYNSTATES 126 521 #define YYMAXUTOK 292 523 #define YYTRANSLATE(YYX) \ 524 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 530 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
533 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
534 48, 51, 40, 38, 20, 39, 46, 41, 2, 2,
535 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
536 29, 27, 30, 2, 37, 2, 2, 2, 2, 2,
537 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
538 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
539 2, 47, 2, 52, 49, 2, 2, 2, 2, 2,
540 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
541 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
542 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
543 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
544 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
545 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
546 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
547 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
548 2, 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, 2, 2, 2, 2, 2, 2, 2,
552 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
553 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
554 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
555 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
556 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
557 15, 16, 17, 18, 19, 21, 22, 23, 24, 25,
558 26, 28, 31, 32, 33, 34, 35, 36, 42, 43,
566 0, 191, 191, 191, 200, 201, 204, 211, 212, 217,
567 223, 229, 233, 237, 241, 246, 250, 268, 284, 290,
568 302, 300, 333, 330, 346, 347, 349, 353, 368, 374,
569 378, 378, 401, 405, 409, 413, 417, 421, 425, 431,
570 437, 443, 449, 455, 461, 465, 469, 473, 477, 484,
571 491, 499, 513, 521, 524, 539, 550, 554, 586, 614,
572 632, 643, 658, 674, 675, 706, 775, 786, 790, 792,
573 794, 797, 805, 806, 807, 808, 811, 812
577 #if YYDEBUG || YYERROR_VERBOSE || 0 582 "$end",
"error",
"$undefined",
"INT",
"FLOAT",
"STRING",
"FIELDNAME",
583 "COMPLETE",
"NAME",
"TYPENAME",
"NAME_OR_INT",
"STRUCT",
"CLASS",
584 "SIZEOF",
"COLONCOLON",
"ERROR",
"VARIABLE",
"THIS",
"TRUEKEYWORD",
585 "FALSEKEYWORD",
"','",
"ABOVE_COMMA",
"ASSIGN",
"NOT",
"OR",
"XOR",
586 "ANDAND",
"'='",
"NOTEQUAL",
"'<'",
"'>'",
"LEQ",
"GEQ",
"LSH",
"RSH",
587 "DIV",
"MOD",
"'@'",
"'+'",
"'-'",
"'*'",
"'/'",
"UNARY",
"INCREMENT",
588 "DECREMENT",
"ARROW",
"'.'",
"'['",
"'('",
"'^'",
"BLOCKNAME",
"')'",
589 "']'",
"$accept",
"start",
"$@1",
"normal_start",
"type_exp",
"exp1",
590 "exp",
"field_exp",
"$@2",
"$@3",
"arglist",
"$@4",
"block",
"variable",
591 "qualified_name",
"ptype",
"type",
"typebase",
"name",
601 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
602 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
603 44, 275, 276, 277, 278, 279, 280, 61, 281, 60,
604 62, 282, 283, 284, 285, 286, 287, 64, 43, 45,
605 42, 47, 288, 289, 290, 291, 46, 91, 40, 94,
610 #define YYPACT_NINF -44 612 #define yypact_value_is_default(Yystate) \ 613 (!!((Yystate) == (-44))) 615 #define YYTABLE_NINF -61 617 #define yytable_value_is_error(Yytable_value) \ 624 -44, 20, 90, -44, -44, -44, -44, -44, -44, -44,
625 7, 7, -41, 7, -44, -44, -44, -44, 90, 90,
626 90, -39, -24, 90, 10, 13, -44, -44, 8, 231,
627 4, 21, -44, -44, -44, -14, 41, -44, -44, -44,
628 -44, -44, -44, -44, 90, -44, 35, -14, 35, 35,
629 90, 90, 5, -44, 90, 90, 90, 90, 90, 90,
630 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
631 90, 90, -44, -44, -44, -44, -44, -44, -44, 23,
632 7, 90, 7, 119, -43, 147, 175, -44, 231, 231,
633 256, 280, 303, 324, 324, 31, 31, 31, 31, 76,
634 76, 76, 76, 328, 328, 35, 90, 90, 90, -44,
635 44, 203, -44, -44, -44, -44, -44, 35, 9, 231,
636 11, -44, -44, 90, -44, 231
644 2, 0, 0, 1, 50, 52, 57, 76, 69, 51,
645 0, 0, 0, 0, 54, 58, 48, 49, 0, 0,
646 0, 0, 0, 0, 0, 77, 3, 5, 4, 7,
647 0, 0, 53, 63, 67, 6, 66, 65, 72, 74,
648 75, 73, 70, 71, 0, 64, 12, 0, 10, 11,
649 0, 0, 0, 68, 0, 0, 0, 0, 0, 0,
650 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
651 0, 0, 30, 15, 20, 22, 9, 16, 19, 17,
652 0, 0, 0, 0, 0, 0, 0, 28, 8, 47,
653 46, 45, 44, 38, 39, 42, 43, 40, 41, 36,
654 37, 32, 33, 34, 35, 29, 0, 0, 24, 18,
655 61, 0, 62, 56, 55, 13, 14, 31, 0, 25,
662 -44, -44, -44, -44, -44, -20, -18, -44, -44, -44,
663 -44, -44, -44, -44, -44, -44, 16, 50, -7, -44
669 -1, 1, 2, 26, 27, 28, 29, 30, 107, 108,
670 120, 106, 31, 32, 33, 34, 47, 36, 42, 37
678 46, 48, 49, 52, 43, 81, 45, 44, 114, 50,
679 77, 78, 38, 39, 40, 38, 39, 40, 35, 8,
680 3, 10, 11, 79, 51, 54, 83, -59, 54, 54,
681 109, 123, 85, 86, 81, 80, 88, 89, 90, 91,
682 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
683 102, 103, 104, 105, 41, 82, 87, 41, -60, 24,
684 84, 122, 124, 111, 65, 66, 67, 68, 0, 69,
685 70, 71, 72, 110, 53, 112, 0, 73, 74, 75,
686 76, 73, 74, 75, 76, 0, 0, 118, 117, 0,
687 119, 0, 0, 4, 5, 6, 0, 0, 7, 8,
688 9, 10, 11, 12, 13, 125, 14, 15, 16, 17,
689 0, 0, 0, 18, 69, 70, 71, 72, 0, 0,
690 0, 0, 73, 74, 75, 76, 0, 19, 0, 20,
691 0, 0, 0, 21, 22, 0, 0, 0, 23, 24,
692 25, 55, 0, 56, 57, 58, 59, 60, 61, 62,
693 63, 64, 65, 66, 67, 68, 0, 69, 70, 71,
694 72, 0, 0, 0, 0, 73, 74, 75, 76, 55,
695 113, 56, 57, 58, 59, 60, 61, 62, 63, 64,
696 65, 66, 67, 68, 0, 69, 70, 71, 72, 0,
697 0, 0, 0, 73, 74, 75, 76, 55, 115, 56,
698 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
699 67, 68, 0, 69, 70, 71, 72, 0, 0, 0,
700 0, 73, 74, 75, 76, 55, 116, 56, 57, 58,
701 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
702 0, 69, 70, 71, 72, 0, 0, 0, 0, 73,
703 74, 75, 76, 55, 121, 56, 57, 58, 59, 60,
704 61, 62, 63, 64, 65, 66, 67, 68, 0, 69,
705 70, 71, 72, 0, 0, 0, 0, 73, 74, 75,
706 76, 57, 58, 59, 60, 61, 62, 63, 64, 65,
707 66, 67, 68, 0, 69, 70, 71, 72, 0, 0,
708 0, 0, 73, 74, 75, 76, 58, 59, 60, 61,
709 62, 63, 64, 65, 66, 67, 68, 0, 69, 70,
710 71, 72, 0, 0, 0, 0, 73, 74, 75, 76,
711 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
712 0, 69, 70, 71, 72, 0, 0, 0, 0, 73,
713 74, 75, 76, 61, 62, 63, 64, 65, 66, 67,
714 68, 0, 69, 70, 71, 72, 0, 0, 71, 72,
715 73, 74, 75, 76, 73, 74, 75, 76
720 18, 19, 20, 23, 11, 48, 13, 48, 51, 48,
721 6, 7, 8, 9, 10, 8, 9, 10, 2, 9,
722 0, 11, 12, 30, 48, 20, 44, 14, 20, 20,
723 7, 20, 50, 51, 48, 14, 54, 55, 56, 57,
724 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
725 68, 69, 70, 71, 50, 14, 51, 50, 14, 49,
726 44, 52, 51, 81, 33, 34, 35, 36, -1, 38,
727 39, 40, 41, 80, 24, 82, -1, 46, 47, 48,
728 49, 46, 47, 48, 49, -1, -1, 107, 106, -1,
729 108, -1, -1, 3, 4, 5, -1, -1, 8, 9,
730 10, 11, 12, 13, 14, 123, 16, 17, 18, 19,
731 -1, -1, -1, 23, 38, 39, 40, 41, -1, -1,
732 -1, -1, 46, 47, 48, 49, -1, 37, -1, 39,
733 -1, -1, -1, 43, 44, -1, -1, -1, 48, 49,
734 50, 22, -1, 24, 25, 26, 27, 28, 29, 30,
735 31, 32, 33, 34, 35, 36, -1, 38, 39, 40,
736 41, -1, -1, -1, -1, 46, 47, 48, 49, 22,
737 51, 24, 25, 26, 27, 28, 29, 30, 31, 32,
738 33, 34, 35, 36, -1, 38, 39, 40, 41, -1,
739 -1, -1, -1, 46, 47, 48, 49, 22, 51, 24,
740 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
741 35, 36, -1, 38, 39, 40, 41, -1, -1, -1,
742 -1, 46, 47, 48, 49, 22, 51, 24, 25, 26,
743 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
744 -1, 38, 39, 40, 41, -1, -1, -1, -1, 46,
745 47, 48, 49, 22, 51, 24, 25, 26, 27, 28,
746 29, 30, 31, 32, 33, 34, 35, 36, -1, 38,
747 39, 40, 41, -1, -1, -1, -1, 46, 47, 48,
748 49, 25, 26, 27, 28, 29, 30, 31, 32, 33,
749 34, 35, 36, -1, 38, 39, 40, 41, -1, -1,
750 -1, -1, 46, 47, 48, 49, 26, 27, 28, 29,
751 30, 31, 32, 33, 34, 35, 36, -1, 38, 39,
752 40, 41, -1, -1, -1, -1, 46, 47, 48, 49,
753 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
754 -1, 38, 39, 40, 41, -1, -1, -1, -1, 46,
755 47, 48, 49, 29, 30, 31, 32, 33, 34, 35,
756 36, -1, 38, 39, 40, 41, -1, -1, 40, 41,
757 46, 47, 48, 49, 46, 47, 48, 49
764 0, 54, 55, 0, 3, 4, 5, 8, 9, 10,
765 11, 12, 13, 14, 16, 17, 18, 19, 23, 37,
766 39, 43, 44, 48, 49, 50, 56, 57, 58, 59,
767 60, 65, 66, 67, 68, 69, 70, 72, 8, 9,
768 10, 50, 71, 71, 48, 71, 59, 69, 59, 59,
769 48, 48, 58, 70, 20, 22, 24, 25, 26, 27,
770 28, 29, 30, 31, 32, 33, 34, 35, 36, 38,
771 39, 40, 41, 46, 47, 48, 49, 6, 7, 71,
772 14, 48, 14, 59, 69, 59, 59, 51, 59, 59,
773 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
774 59, 59, 59, 59, 59, 59, 64, 61, 62, 7,
775 71, 59, 71, 51, 51, 51, 51, 59, 58, 59,
776 63, 51, 52, 20, 51, 59
782 0, 53, 55, 54, 56, 56, 57, 58, 58, 59,
783 59, 59, 59, 59, 59, 60, 59, 59, 59, 59,
784 61, 59, 62, 59, 63, 63, 63, 59, 59, 59,
785 64, 59, 59, 59, 59, 59, 59, 59, 59, 59,
786 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
787 59, 59, 59, 59, 59, 59, 59, 59, 59, 65,
788 65, 66, 67, 66, 66, 66, 68, 69, 70, 70,
789 70, 70, 71, 71, 71, 71, 72, 72
795 0, 2, 0, 2, 1, 1, 1, 1, 3, 2,
796 2, 2, 2, 4, 4, 2, 2, 2, 3, 2,
797 0, 5, 0, 5, 0, 1, 3, 4, 3, 3,
798 0, 4, 3, 3, 3, 3, 3, 3, 3, 3,
799 3, 3, 3, 3, 3, 3, 3, 3, 1, 1,
800 1, 1, 1, 1, 1, 4, 4, 1, 1, 1,
801 3, 3, 3, 1, 2, 1, 1, 1, 2, 1,
802 2, 2, 1, 1, 1, 1, 1, 1
806 #define yyerrok (yyerrstatus = 0) 807 #define yyclearin (yychar = YYEMPTY) 811 #define YYACCEPT goto yyacceptlab 812 #define YYABORT goto yyabortlab 813 #define YYERROR goto yyerrorlab 816 #define YYRECOVERING() (!!yyerrstatus) 818 #define YYBACKUP(Token, Value) \ 820 if (yychar == YYEMPTY) \ 824 YYPOPSTACK (yylen); \ 830 yyerror (YY_("syntax error: cannot back up")); \ 837 #define YYERRCODE 256 846 # define YYFPRINTF fprintf 849 # define YYDPRINTF(Args) \ 856 #ifndef YY_LOCATION_PRINT 857 # define YY_LOCATION_PRINT(File, Loc) ((void) 0) 861 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 865 YYFPRINTF (stderr, "%s ", Title); \ 866 yy_symbol_print (stderr, \ 868 YYFPRINTF (stderr, "\n"); \ 880 FILE *yyo = yyoutput;
915 for (; yybottom <= yytop; yybottom++)
917 int yybot = *yybottom;
923 # define YY_STACK_PRINT(Bottom, Top) \ 926 yy_stack_print ((Bottom), (Top)); \ 940 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
943 for (yyi = 0; yyi < yynrhs; yyi++)
948 &(
yyvsp[(yyi + 1) - (yynrhs)])
954 # define YY_REDUCE_PRINT(Rule) \ 957 yy_reduce_print (yyssp, yyvsp, Rule); \ 964 # define YYDPRINTF(Args) 965 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) 966 # define YY_STACK_PRINT(Bottom, Top) 967 # define YY_REDUCE_PRINT(Rule) 973 # define YYINITDEPTH 200 984 # define YYMAXDEPTH 10000 991 # if defined __GLIBC__ && defined _STRING_H 992 # define yystrlen strlen 996 yystrlen (
const char *yystr)
1007 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 1008 # define yystpcpy stpcpy 1013 yystpcpy (
char *yydest,
const char *yysrc)
1016 const char *
yys = yysrc;
1018 while ((*yyd++ = *
yys++) !=
'\0')
1035 yytnamerr (
char *yyres,
const char *yystr)
1040 char const *yyp = yystr;
1047 goto do_not_strip_quotes;
1051 goto do_not_strip_quotes;
1064 do_not_strip_quotes: ;
1068 return yystrlen (yystr);
1070 return yystpcpy (yyres, yystr) - yyres;
1083 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
1088 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1092 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1123 yyarg[yycount++] =
yytname[yytoken];
1129 int yyxbegin = yyn < 0 ? -yyn : 0;
1131 int yychecklim =
YYLAST - yyn + 1;
1135 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1139 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1145 yyarg[yycount++] =
yytname[yyx];
1148 if (! (yysize <= yysize1
1159 # define YYCASE_(N, S) \ 1163 YYCASE_(0,
YY_(
"syntax error"));
1164 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1165 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1166 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1167 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1168 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1173 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1179 if (*yymsg_alloc < yysize)
1181 *yymsg_alloc = 2 * yysize;
1182 if (! (yysize <= *yymsg_alloc
1194 while ((*yyp = *yyformat) !=
'\0')
1195 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1197 yyp += yytnamerr (yyp, yyarg[yyi++]);
1280 char *yymsg = yymsgbuf;
1281 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1284 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 1294 YYDPRINTF ((stderr,
"Starting parse\n"));
1330 yyoverflow (
YY_(
"memory exhausted"),
1331 &yyss1, yysize *
sizeof (*
yyssp),
1332 &yyvs1, yysize *
sizeof (*
yyvsp),
1339 # ifndef YYSTACK_RELOCATE 1340 goto yyexhaustedlab;
1344 goto yyexhaustedlab;
1354 goto yyexhaustedlab;
1357 # undef YYSTACK_RELOCATE 1367 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1399 YYDPRINTF ((stderr,
"Reading a token: "));
1406 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1485 #line 1487 "p-exp.c" 1491 #line 1493 "p-exp.c" 1500 #line 1502 "p-exp.c" 1506 #line 1508 "p-exp.c" 1514 #line 1516 "p-exp.c" 1522 #line 1524 "p-exp.c" 1528 #line 1530 "p-exp.c" 1534 #line 1536 "p-exp.c" 1540 #line 1542 "p-exp.c" 1546 #line 1548 "p-exp.c" 1552 #line 1554 "p-exp.c" 1571 #line 1573 "p-exp.c" 1590 #line 1592 "p-exp.c" 1599 #line 1601 "p-exp.c" 1611 #line 1613 "p-exp.c" 1616 {
const char *arrayname;
1617 int arrayfieldindex;
1620 NULL, NULL, &arrayname);
1621 if (arrayfieldindex)
1623 struct stoken stringsval;
1626 buf = (
char *) alloca (strlen (arrayname) + 1);
1627 stringsval.
ptr = buf;
1628 stringsval.
length = strlen (arrayname);
1629 strcpy (buf, arrayname);
1631 arrayfieldindex - 1);
1637 #line 1639 "p-exp.c" 1646 #line 1648 "p-exp.c" 1653 #line 1655 "p-exp.c" 1666 #line 1668 "p-exp.c" 1672 #line 1674 "p-exp.c" 1678 #line 1680 "p-exp.c" 1695 #line 1697 "p-exp.c" 1701 #line 1703 "p-exp.c" 1707 #line 1709 "p-exp.c" 1716 #line 1718 "p-exp.c" 1728 ->builtin_long_double);
1737 #line 1739 "p-exp.c" 1743 #line 1745 "p-exp.c" 1749 #line 1751 "p-exp.c" 1755 #line 1757 "p-exp.c" 1761 #line 1763 "p-exp.c" 1767 #line 1769 "p-exp.c" 1773 #line 1775 "p-exp.c" 1781 #line 1783 "p-exp.c" 1789 #line 1791 "p-exp.c" 1797 #line 1799 "p-exp.c" 1805 #line 1807 "p-exp.c" 1813 #line 1815 "p-exp.c" 1821 #line 1823 "p-exp.c" 1827 #line 1829 "p-exp.c" 1833 #line 1835 "p-exp.c" 1839 #line 1841 "p-exp.c" 1845 #line 1847 "p-exp.c" 1854 #line 1856 "p-exp.c" 1863 #line 1865 "p-exp.c" 1873 #line 1875 "p-exp.c" 1880 (
yyvsp[0].ssym).stoken.length, 0, &val);
1888 #line 1890 "p-exp.c" 1898 #line 1900 "p-exp.c" 1904 struct value * val, * mark;
1913 #line 1915 "p-exp.c" 1926 #line 1928 "p-exp.c" 1933 #line 1935 "p-exp.c" 1943 const char *sp = (
yyvsp[0].sval).ptr;
int count = (
yyvsp[0].sval).length;
1966 #line 1968 "p-exp.c" 1972 struct value * this_val;
1973 struct type * this_type;
1994 #line 1996 "p-exp.c" 2000 if ((
yyvsp[0].ssym).sym.symbol != 0)
2010 error (
_(
"No file or function \"%s\"."),
2014 #line 2016 "p-exp.c" 2024 error (
_(
"No function \"%s\" in specified context."),
2027 #line 2029 "p-exp.c" 2036 if (sym.symbol == 0)
2037 error (
_(
"No symbol \"%s\" in specified context."),
2044 #line 2046 "p-exp.c" 2054 error (
_(
"`%s' is not defined as an aggregate type."),
2062 #line 2064 "p-exp.c" 2085 if (msymbol.
minsym != NULL)
2089 error (
_(
"No symbol table is loaded. " 2090 "Use the \"file\" command."));
2092 error (
_(
"No symbol \"%s\" in current context."),
2095 #line 2097 "p-exp.c" 2117 else if ((
yyvsp[0].ssym).is_a_field_of_this)
2119 struct value * this_val;
2120 struct type * this_type;
2154 if (msymbol.
minsym != NULL)
2158 error (
_(
"No symbol table is loaded. " 2159 "Use the \"file\" command."));
2161 error (
_(
"No symbol \"%s\" in current context."),
2165 #line 2167 "p-exp.c" 2171 #line 2173 "p-exp.c" 2177 #line 2179 "p-exp.c" 2184 #line 2186 "p-exp.c" 2191 #line 2193 "p-exp.c" 2197 #line 2199 "p-exp.c" 2203 #line 2205 "p-exp.c" 2209 #line 2211 "p-exp.c" 2215 #line 2217 "p-exp.c" 2219 #line 2221 "p-exp.c" 2268 #if ! YYERROR_VERBOSE 2271 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 2274 char const *yymsgp =
YY_(
"syntax error");
2275 int yysyntax_error_status;
2276 yysyntax_error_status = YYSYNTAX_ERROR;
2277 if (yysyntax_error_status == 0)
2279 else if (yysyntax_error_status == 1)
2281 if (yymsg != yymsgbuf)
2287 yymsg_alloc =
sizeof yymsgbuf;
2288 yysyntax_error_status = 2;
2292 yysyntax_error_status = YYSYNTAX_ERROR;
2297 if (yysyntax_error_status == 2)
2298 goto yyexhaustedlab;
2300 # undef YYSYNTAX_ERROR 2306 if (yyerrstatus == 3)
2408 #if !defined yyoverflow || YYERROR_VERBOSE 2442 if (yymsg != yymsgbuf)
2458 const char *p,
int len,
int parsed_float,
YYSTYPE *putithere)
2475 int found_suffix = 0;
2478 struct type *signed_type;
2479 struct type *unsigned_type;
2485 if (len >= 1 && tolower (p[len - 1]) ==
'f')
2491 else if (len >= 1 && tolower (p[len - 1]) ==
'l')
2494 =
parse_type (par_state)->builtin_long_double;
2545 if (c >=
'A' && c <=
'Z')
2547 if (c !=
'l' && c !=
'u')
2549 if (c >=
'0' && c <=
'9')
2557 if (base > 10 && c >=
'a' && c <=
'f')
2561 n += i = c -
'a' + 10;
2582 if (c !=
'l' && c !=
'u' && (prevn >= n) && n != 0)
2588 if (c !=
'l' && c !=
'u' && n != 0)
2591 error (
_(
"Numeric constant too large."));
2621 unsigned_type =
parse_type (par_state)->builtin_unsigned_int;
2622 signed_type =
parse_type (par_state)->builtin_int;
2624 else if (long_p <= 1
2629 unsigned_type =
parse_type (par_state)->builtin_unsigned_long;
2630 signed_type =
parse_type (par_state)->builtin_long;
2642 unsigned_type =
parse_type (par_state)->builtin_unsigned_long_long;
2643 signed_type =
parse_type (par_state)->builtin_long_long;
2651 if (unsigned_p || (n & high_bit))
2704 {
"shr",
RSH, BINOP_END},
2705 {
"shl",
LSH, BINOP_END},
2706 {
"and",
ANDAND, BINOP_END},
2707 {
"div",
DIV, BINOP_END},
2708 {
"not",
NOT, BINOP_END},
2709 {
"mod",
MOD, BINOP_END},
2712 {
"xor",
XOR, BINOP_END}
2717 {
"or",
OR, BINOP_END},
2719 {
"<=",
LEQ, BINOP_END},
2720 {
">=",
GEQ, BINOP_END},
2721 {
":=",
ASSIGN, BINOP_END},
2727 uptok (
const char *tokstart,
int namelen)
2730 char *uptokstart = (
char *)
xmalloc(namelen+1);
2731 for (i = 0;i <= namelen;i++)
2733 if ((tokstart[i]>=
'a' && tokstart[i]<=
'z'))
2734 uptokstart[i] = tokstart[i]-(
'a'-
'A');
2736 uptokstart[i] = tokstart[i];
2738 uptokstart[namelen]=
'\0';
2750 const char *tokstart;
2762 explen = strlen (
lexptr);
2769 || (!isalpha (tokstart[3])
2770 && !isdigit (tokstart[3]) && tokstart[3] !=
'_')))
2782 || (!isalpha (tokstart[2])
2783 && !isdigit (tokstart[2]) && tokstart[2] !=
'_')))
2790 switch (c = *tokstart)
2813 error (
_(
"Empty character constant."));
2824 lexptr = tokstart + namelen;
2826 error (
_(
"Unmatched single quote."));
2829 uptokstart =
uptok(tokstart,namelen);
2832 error (
_(
"Invalid character constant."));
2875 int got_dot = 0, got_e = 0, toktype;
2876 const char *p = tokstart;
2879 if (c ==
'0' && (p[1] ==
'x' || p[1] ==
'X'))
2884 else if (c ==
'0' && (p[1]==
't' || p[1]==
'T' 2885 || p[1]==
'd' || p[1]==
'D'))
2896 if (!hex && !got_e && (*p ==
'e' || *p ==
'E'))
2897 got_dot = got_e = 1;
2900 else if (!got_dot && *p ==
'.')
2902 else if (got_e && (p[-1] ==
'e' || p[-1] ==
'E')
2903 && (*p ==
'-' || *p ==
'+'))
2909 else if ((*p < '0' || *p >
'9')
2910 && ((*p < 'a' || *p >
'z')
2911 && (*p < 'A' || *p >
'Z')))
2915 p - tokstart, got_dot | got_e, &
yylval);
2916 if (toktype ==
ERROR)
2918 char *err_copy = (
char *) alloca (p - tokstart + 1);
2920 memcpy (err_copy, tokstart, p - tokstart);
2921 err_copy[p - tokstart] = 0;
2922 error (
_(
"Invalid number \"%s\"."), err_copy);
2962 tokptr = ++tokstart;
2992 }
while ((*tokptr !=
'"') && (*tokptr !=
'\0'));
2993 if (*tokptr++ !=
'"')
2995 error (
_(
"Unterminated string in expression."));
3004 if (!(c ==
'_' || c ==
'$' 3005 || (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z')))
3007 error (
_(
"Invalid character '%c' in expression."), c);
3011 for (c = tokstart[namelen];
3012 (c ==
'_' || c ==
'$' || (c >=
'0' && c <=
'9')
3013 || (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z') || c ==
'<');)
3020 int nesting_level = 1;
3021 while (tokstart[++i])
3023 if (tokstart[i] ==
'<')
3025 else if (tokstart[i] ==
'>')
3027 if (--nesting_level == 0)
3031 if (tokstart[i] ==
'>')
3038 c = tokstart[++namelen];
3041 uptokstart =
uptok(tokstart,namelen);
3045 if (namelen == 2 && uptokstart[0] ==
'I' && uptokstart[1] ==
'F')
3059 if (strcmp (uptokstart,
"OBJECT") == 0)
3064 if (strcmp (uptokstart,
"RECORD") == 0)
3069 if (strcmp (uptokstart,
"SIZEOF") == 0)
3076 if (strcmp (uptokstart,
"CLASS") == 0)
3081 if (strcmp (uptokstart,
"FALSE") == 0)
3089 if (strcmp (uptokstart,
"TRUE") == 0)
3095 if (strcmp (uptokstart,
"SELF") == 0)
3099 static const char this_name[] =
"this";
3116 if (*tokstart ==
'$')
3125 tmp = (
char *) alloca (namelen + 1);
3126 memcpy (tmp, tokstart, namelen);
3127 tmp[namelen] =
'\0';
3145 is_a_field_of_this.
type = NULL;
3154 if (!sym && is_a_field_of_this.
type == NULL && !is_a_field)
3156 for (i = 0; i <= namelen; i++)
3158 if ((tmp[i] >=
'a' && tmp[i] <=
'z'))
3159 tmp[i] -= (
'a'-
'A');
3170 if (!sym && is_a_field_of_this.
type == NULL && !is_a_field)
3172 for (i = 0; i <= namelen; i++)
3176 if ((tmp[i] >=
'a' && tmp[i] <=
'z'))
3177 tmp[i] -= (
'a'-
'A');
3180 if ((tmp[i] >=
'A' && tmp[i] <=
'Z'))
3181 tmp[i] -= (
'A'-
'a');
3192 if (is_a_field || (is_a_field_of_this.
type != NULL))
3195 strncpy (
tempbuf, tmp, namelen);
3233 const char *namestart;
3252 while (*p ==
' ' || *p ==
'\t' || *p ==
'\n')
3254 if (*p ==
':' && p[1] ==
':')
3259 while (*p ==
' ' || *p ==
'\t' || *p ==
'\n')
3262 while (*p ==
'_' || *p ==
'$' || (*p >=
'0' && *p <=
'9')
3263 || (*p >=
'a' && *p <=
'z')
3264 || (*p >=
'A' && *p <=
'Z'))
3272 = (
char *) alloca (strlen (tmp) + strlen (namestart)
3277 memcpy (tmp1, tmp, strlen (tmp));
3278 tmp1 += strlen (tmp);
3279 memcpy (tmp1,
"::", 2);
3281 memcpy (tmp1, namestart, p - namestart);
3282 tmp1[p - namestart] =
'\0';
3325 && ((tokstart[0] >=
'a' && tokstart[0] <
'a' +
input_radix - 10)
3326 || (tokstart[0] >=
'A' && tokstart[0] <
'A' +
input_radix - 10)))
3365 error (
_(
"A %s in expression, near `%s'."), (msg ? msg :
"error"),
lexptr);
static void push_current_type(void)
struct internalvar * ivar
struct value * value_mark(void)
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
static const yytype_int16 yypact[]
void write_exp_elt_sym(struct parser_state *ps, struct symbol *expelt)
#define parse_language(ps)
static int leftdiv_is_integer
struct YYSTYPE::@18 typed_val_int
#define parse_gdbarch(ps)
static int parse_number(struct parser_state *, const char *, int, int, YYSTYPE *)
bool parse_float(const char *p, int len, const struct type *type, gdb_byte *data)
int gdbarch_int_bit(struct gdbarch *gdbarch)
static const struct token tokentab2[]
static const yytype_uint8 yyr2[]
#define TYPE_NAME(thistype)
static struct type * current_type
struct value * value_of_this_silent(const struct language_defn *lang)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static const yytype_uint8 yyr1[]
struct internalvar * lookup_only_internalvar(const char *name)
unsigned char yytype_uint8
static const yytype_int8 yypgoto[]
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_STACK_PRINT(Bottom, Top)
static struct type_push * tp_top
struct symtab * lookup_symtab(const char *name)
#define SYMBOL_CLASS(symbol)
int gdbarch_long_bit(struct gdbarch *gdbarch)
const struct block * innermost_block
int have_partial_symbols(void)
#define BLOCKVECTOR_BLOCK(blocklist, n)
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)
int is_pascal_string_type(struct type *type, int *length_pos, int *length_size, int *string_pos, struct type **char_type, const char **arrayname)
static const struct token tokentab3[]
#define YYPRINT(FILE, TYPE, VALUE)
void yyerror(const char *)
#define TYPE_FIELD_TYPE(thistype, n)
scoped_restore_tmpl< T > make_scoped_restore(T *var)
static char * uptok(const char *, int)
#define yytable_value_is_error(Yytable_value)
unsigned short int yytype_uint16
void write_exp_elt_block(struct parser_state *ps, const struct block *b)
#define SYMTAB_BLOCKVECTOR(symtab)
static const yytype_uint8 yytranslate[]
void write_exp_elt_longcst(struct parser_state *ps, LONGEST expelt)
int pascal_parse(struct parser_state *par_state)
static const yytype_int8 yycheck[]
static struct parser_state * pstate
struct type * check_typedef(struct type *type)
int contained_in(const struct block *a, const struct block *b)
const char * skip_quoted(const char *str)
static struct obstack tempbuf
static void pop_current_type(void)
struct type * lookup_struct(const char *name, const struct block *block)
const struct block * block
struct YYSTYPE::@2 typed_val_float
int symbol_read_needs_frame(struct symbol *sym)
int is_integral_type(struct type *t)
static struct internalvar * intvar
static const yytype_uint16 yytoknum[]
void write_dollar_variable(struct parser_state *ps, struct stoken str)
void mark_struct_expression(struct parser_state *ps)
unsigned short int yytype_uint16
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
const struct block * bval
struct type * lookup_struct_elt_type(struct type *type, const char *name, int noerr)
void write_exp_msymbol(struct parser_state *ps, struct bound_minimal_symbol bound_msym)
struct value * value_of_internalvar(struct gdbarch *gdbarch, struct internalvar *var)
int parse_escape(struct gdbarch *gdbarch, const char **string_ptr)
struct value * value_release_to_mark(const struct value *mark)
PTR xrealloc(PTR ptr, size_t size)
void write_exp_elt_opcode(struct parser_state *ps, enum exp_opcode expelt)
static const char * lexptr
unsigned char yytype_uint8
#define TYPE_TARGET_TYPE(thistype)
static const yytype_uint16 yyrline[]
static const yytype_uint8 yydefact[]
#define SYMBOL_BLOCK_VALUE(symbol)
#define TYPE_CODE(thistype)
struct minimal_symbol * minsym
int gdbarch_long_long_bit(struct gdbarch *gdbarch)
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
struct bound_minimal_symbol lookup_bound_minimal_symbol(const char *name)
int have_full_symbols(void)
const struct block * expression_context_block
unsigned long long ULONGEST
#define YYSTACK_ALLOC_MAXIMUM
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
#define YY_REDUCE_PRINT(Rule)
struct type * value_type(const struct value *value)
#define SYMBOL_TYPE(symbol)
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
#define TYPE_LENGTH(thistype)
struct type * language_lookup_primitive_type(const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
static const yytype_int8 yydefgoto[]
#define TYPE_POINTER_TYPE(thistype)
static const char * prev_lexptr
void write_exp_elt_floatcst(struct parser_state *ps, const gdb_byte expelt[16])
void write_exp_string(struct parser_state *ps, struct stoken str)
void write_exp_elt_type(struct parser_state *ps, struct type *expelt)
static const char *const yytname[]
static const yytype_int8 yytable[]
#define yypact_value_is_default(Yystate)
void error(const char *fmt,...)
struct type * lookup_pointer_type(struct type *type)
static const yytype_uint8 yystos[]
char * copy_name(struct stoken token)