52#define YYBISON_VERSION "3.8.2"
55#define YYSKELETON_NAME "yacc.c"
89#define parse_type(ps) builtin_type (ps->gdbarch ())
90#define parse_d_type(ps) builtin_d_type (ps->gdbarch ())
94#define GDB_YY_REMAP_PREFIX d_
107static int yylex (
void);
109static void yyerror (
const char *);
116#line 117 "d-exp.c.tmp"
120# define YY_CAST(Type, Val) static_cast<Type> (Val)
121# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
123# define YY_CAST(Type, Val) ((Type) (Val))
124# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
127# ifndef YY_NULLPTRPTR
128# if defined __cplusplus
129# if 201103L <= __cplusplus
130# define YY_NULLPTRPTR nullptr
132# define YY_NULLPTRPTR 0
135# define YY_NULLPTRPTR ((void*)0)
212#define IDENTIFIER 258
213#define UNKNOWN_NAME 259
216#define NAME_OR_INT 262
217#define INTEGER_LITERAL 263
218#define FLOAT_LITERAL 264
219#define CHARACTER_LITERAL 265
220#define STRING_LITERAL 266
223#define TRUE_KEYWORD 269
224#define FALSE_KEYWORD 270
225#define NULL_KEYWORD 271
226#define SUPER_KEYWORD 272
227#define CAST_KEYWORD 273
228#define SIZEOF_KEYWORD 274
229#define TYPEOF_KEYWORD 275
230#define TYPEID_KEYWORD 276
231#define INIT_KEYWORD 277
232#define IMMUTABLE_KEYWORD 278
233#define CONST_KEYWORD 279
234#define SHARED_KEYWORD 280
235#define STRUCT_KEYWORD 281
236#define UNION_KEYWORD 282
237#define CLASS_KEYWORD 283
238#define INTERFACE_KEYWORD 284
239#define ENUM_KEYWORD 285
240#define TEMPLATE_KEYWORD 286
241#define DELEGATE_KEYWORD 287
242#define FUNCTION_KEYWORD 288
243#define DOLLAR_VARIABLE 289
244#define ASSIGN_MODIFY 290
255#define NOTIDENTITY 301
261#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
286#line 287 "d-exp.c.tmp"
290# define YYSTYPE_IS_TRIVIAL 1
291# define YYSTYPE_IS_DECLARED 1
423#line 424 "d-exp.c.tmp"
434#ifndef __PTRDIFF_MAX__
436# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
447#ifdef __INT_LEAST8_MAX__
449#elif defined YY_STDINT_H
455#ifdef __INT_LEAST16_MAX__
457#elif defined YY_STDINT_H
469# undef UINT_LEAST8_MAX
470# undef UINT_LEAST16_MAX
471# define UINT_LEAST8_MAX 255
472# define UINT_LEAST16_MAX 65535
475#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
477#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
478 && UINT_LEAST8_MAX <= INT_MAX)
480#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
486#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
488#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
489 && UINT_LEAST16_MAX <= INT_MAX)
491#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
498# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
499# define YYPTRDIFF_T __PTRDIFF_TYPE__
500# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
501# elif defined PTRDIFF_MAX
505# define YYPTRDIFF_T ptrdiff_t
506# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
508# define YYPTRDIFF_T long
509# define YYPTRDIFF_MAXIMUM LONG_MAX
515# define YYSIZE_T __SIZE_TYPE__
517# define YYSIZE_T size_t
518# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
520# define YYSIZE_T size_t
522# define YYSIZE_T unsigned
526#define YYSIZE_MAXIMUM \
527 YY_CAST (YYPTRDIFF_T, \
528 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
529 ? YYPTRDIFF_MAXIMUM \
530 : YY_CAST (YYSIZE_T, -1)))
532#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
542# if defined YYENABLE_NLS && YYENABLE_NLS
545# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
549# define YY_(Msgid) Msgid
554#ifndef YY_ATTRIBUTE_PURE
555# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
556# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
558# define YY_ATTRIBUTE_PURE
562#ifndef YY_ATTRIBUTE_UNUSED
563# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
564# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
566# define YY_ATTRIBUTE_UNUSED
571#if ! defined lint || defined __GNUC__
572# define YY_USE(E) ((void) (E))
578#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
579# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
580# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
581 _Pragma ("GCC diagnostic push") \
582 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
584# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
585 _Pragma ("GCC diagnostic push") \
586 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
587 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
589# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
590 _Pragma ("GCC diagnostic pop")
592# define YY_INITIAL_VALUE(Value) Value
594#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
595# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
596# define YY_IGNORE_MAYBE_UNINITIALIZED_END
598#ifndef YY_INITIAL_VALUE
599# define YY_INITIAL_VALUE(Value)
602#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
603# define YY_IGNORE_USELESS_CAST_BEGIN \
604 _Pragma ("GCC diagnostic push") \
605 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
606# define YY_IGNORE_USELESS_CAST_END \
607 _Pragma ("GCC diagnostic pop")
609#ifndef YY_IGNORE_USELESS_CAST_BEGIN
610# define YY_IGNORE_USELESS_CAST_BEGIN
611# define YY_IGNORE_USELESS_CAST_END
615#define YY_ASSERT(E) ((void) (0 && (E)))
617#if !defined yyoverflow
621# ifdef YYSTACK_USE_ALLOCA
622# if YYSTACK_USE_ALLOCA
624# define YYSTACK_ALLOC __builtin_alloca
625# elif defined __BUILTIN_VA_ARG_INCR
628# define YYSTACK_ALLOC __alloca
629# elif defined _MSC_VER
630# define alloca _alloca
632# define YYSTACK_ALLOC alloca
633# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
637# define EXIT_SUCCESS 0
646# define YYSTACK_FREE(Ptr) do { ; } while (0)
647# ifndef YYSTACK_ALLOC_MAXIMUM
652# define YYSTACK_ALLOC_MAXIMUM 4032
655# define YYSTACK_ALLOC YYMALLOC
656# define YYSTACK_FREE YYFREE
657# ifndef YYSTACK_ALLOC_MAXIMUM
658# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
660# if (defined __cplusplus && ! defined EXIT_SUCCESS \
661 && ! ((defined YYMALLOC || defined xmalloc) \
662 && (defined YYFREE || defined xfree)))
665# define EXIT_SUCCESS 0
669# define YYMALLOC xmalloc
670# if ! defined xmalloc && ! defined EXIT_SUCCESS
676# if ! defined xfree && ! defined EXIT_SUCCESS
683#if (! defined yyoverflow \
684 && (! defined __cplusplus \
685 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
695# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
699# define YYSTACK_BYTES(N) \
700 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
701 + YYSTACK_GAP_MAXIMUM)
703# define YYCOPY_NEEDED 1
710# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
713 YYPTRDIFF_T yynewbytes; \
714 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
715 Stack = &yyptr->Stack_alloc; \
716 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
717 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
723#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
727# if defined __GNUC__ && 1 < __GNUC__
728# define YYCOPY(Dst, Src, Count) \
729 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
731# define YYCOPY(Dst, Src, Count) \
735 for (yyi = 0; yyi < (Count); yyi++) \
736 (Dst)[yyi] = (Src)[yyi]; \
763#define YYTRANSLATE(YYX) \
764 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
765 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
772 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
773 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
774 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
775 2, 2, 2, 68, 2, 2, 2, 56, 43, 2,
776 64, 69, 54, 52, 36, 53, 62, 55, 2, 2,
777 2, 2, 2, 2, 2, 2, 2, 2, 66, 2,
778 46, 37, 47, 38, 2, 2, 2, 2, 2, 2,
779 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
780 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
781 2, 63, 2, 70, 42, 2, 2, 2, 2, 2,
782 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
783 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
784 2, 2, 2, 2, 41, 2, 67, 2, 2, 2,
785 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
786 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
787 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
788 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
789 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
790 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
791 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
792 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
793 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
794 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
795 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
796 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
797 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
798 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
799 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
800 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
801 35, 39, 40, 44, 45, 48, 49, 50, 51, 57,
809 0, 184, 184, 185, 191, 195, 196, 201, 202, 204,
810 214, 215, 227, 228, 233, 234, 239, 240, 245, 246,
811 251, 252, 257, 258, 259, 260, 264, 266, 271, 273,
812 278, 280, 282, 284, 289, 290, 292, 297, 298, 300,
813 302, 307, 308, 310, 312, 316, 318, 320, 322, 324,
814 326, 328, 330, 332, 334, 335, 339, 343, 348, 349,
815 354, 355, 362, 367, 374, 376, 378, 380, 381, 382,
816 386, 388, 394, 395, 400, 399, 411, 425, 427, 439,
817 441, 480, 514, 516, 521, 525, 527, 529, 531, 538,
818 543, 549, 556, 561, 566, 570, 585, 603, 605, 607,
819 614, 616, 618, 621, 627
824#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
835 "\"end of file\"",
"error",
"\"invalid token\"",
"IDENTIFIER",
836 "UNKNOWN_NAME",
"TYPENAME",
"COMPLETE",
"NAME_OR_INT",
"INTEGER_LITERAL",
837 "FLOAT_LITERAL",
"CHARACTER_LITERAL",
"STRING_LITERAL",
"ENTRY",
"ERROR",
838 "TRUE_KEYWORD",
"FALSE_KEYWORD",
"NULL_KEYWORD",
"SUPER_KEYWORD",
839 "CAST_KEYWORD",
"SIZEOF_KEYWORD",
"TYPEOF_KEYWORD",
"TYPEID_KEYWORD",
840 "INIT_KEYWORD",
"IMMUTABLE_KEYWORD",
"CONST_KEYWORD",
"SHARED_KEYWORD",
841 "STRUCT_KEYWORD",
"UNION_KEYWORD",
"CLASS_KEYWORD",
"INTERFACE_KEYWORD",
842 "ENUM_KEYWORD",
"TEMPLATE_KEYWORD",
"DELEGATE_KEYWORD",
843 "FUNCTION_KEYWORD",
"DOLLAR_VARIABLE",
"ASSIGN_MODIFY",
"','",
"'='",
844 "'?'",
"OROR",
"ANDAND",
"'|'",
"'^'",
"'&'",
"EQUAL",
"NOTEQUAL",
"'<'",
845 "'>'",
"LEQ",
"GEQ",
"LSH",
"RSH",
"'+'",
"'-'",
"'*'",
"'/'",
"'%'",
846 "HATHAT",
"IDENTITY",
"NOTIDENTITY",
"INCREMENT",
"DECREMENT",
"'.'",
847 "'['",
"'('",
"DOTDOT",
"':'",
"'~'",
"'!'",
"')'",
"']'",
"$accept",
848 "start",
"Expression",
"CommaExpression",
"AssignExpression",
849 "ConditionalExpression",
"OrOrExpression",
"AndAndExpression",
850 "OrExpression",
"XorExpression",
"AndExpression",
"CmpExpression",
851 "EqualExpression",
"IdentityExpression",
"RelExpression",
852 "ShiftExpression",
"AddExpression",
"MulExpression",
"UnaryExpression",
853 "CastExpression",
"PowExpression",
"PostfixExpression",
"ArgumentList",
854 "ArgumentList_opt",
"CallExpression",
"$@1",
"IndexExpression",
855 "SliceExpression",
"PrimaryExpression",
"ArrayLiteral",
"IdentifierExp",
856 "StringExp",
"TypeExp",
"BasicType2",
"BasicType",
YY_NULLPTRPTR
866#define YYPACT_NINF (-91)
868#define yypact_value_is_default(Yyn) \
869 ((Yyn) == YYPACT_NINF)
871#define YYTABLE_NINF (-1)
873#define yytable_value_is_error(Yyn) \
880 132, -91, -91, -91, -91, -91, -91, -91, -91, -91,
881 -91, -43, -27, -91, 132, 132, 132, 132, 132, 132,
882 132, 132, 132, 132, 30, -91, -91, 17, -8, 0,
883 14, 21, 35, 12, -91, -91, -91, -91, -1, -34,
884 -31, -91, -91, -91, 43, -91, -91, -91, -91, -91,
885 -91, 72, 22, -37, 6, 132, -91, 22, -91, -91,
886 -91, -91, -91, -91, 49, 16, 19, -49, -91, -91,
887 -91, 132, 132, 132, 132, 132, 132, 132, 132, 132,
888 132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
889 132, 132, 132, 132, 132, 132, 132, -91, -91, 9,
890 58, -91, -91, 13, -37, 81, -91, 6, 24, 25,
891 132, -91, -91, 132, -91, -91, -91, 29, 14, 21,
892 35, 12, -91, -9, -9, -9, -9, -9, -9, -34,
893 -34, -9, -9, -31, -31, -31, -91, -91, -91, -91,
894 84, -91, -91, -91, 26, -30, 132, -91, -91, -91,
895 28, 27, 132, -91, -91, -91, 132, -91, 132, -91,
896 33, -37, -91, -91, -91, 38, -91, -91, -91
904 0, 94, 104, 83, 87, 88, 89, 95, 85, 86,
905 84, 0, 0, 82, 0, 0, 0, 0, 0, 0,
906 72, 0, 0, 0, 0, 2, 4, 5, 7, 10,
907 12, 14, 16, 18, 20, 23, 24, 25, 22, 34,
908 37, 41, 54, 55, 58, 67, 68, 69, 60, 91,
909 80, 90, 3, 98, 0, 0, 45, 0, 50, 49,
910 48, 46, 47, 70, 73, 0, 0, 0, 52, 51,
911 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
912 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
913 0, 0, 0, 0, 0, 0, 0, 65, 66, 0,
914 0, 74, 96, 0, 100, 0, 99, 0, 0, 0,
915 0, 93, 79, 97, 6, 9, 8, 0, 13, 15,
916 17, 19, 21, 26, 27, 30, 32, 31, 33, 35,
917 36, 28, 29, 38, 39, 40, 42, 43, 44, 59,
918 62, 61, 64, 77, 70, 0, 72, 53, 81, 101,
919 0, 0, 0, 92, 71, 57, 0, 63, 0, 76,
920 0, 102, 97, 56, 11, 0, 75, 103, 78
926 -91, -91, 1, 42, -13, -47, -91, 39, 40, 46,
927 37, 41, -91, -91, -91, 73, -35, -56, -14, -91,
928 -91, -91, 31, -22, -91, -91, -91, -91, -91, -91,
929 48, -91, 10, -90, -91
935 0, 24, 25, 26, 27, 28, 29, 30, 31, 32,
936 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
937 43, 44, 64, 65, 45, 146, 46, 47, 48, 49,
946 56, 58, 59, 60, 61, 62, 110, 63, 68, 69,
947 52, 2, 140, 103, 149, 141, 1, 104, 90, 91,
948 113, 54, 66, 93, 94, 95, 105, 72, 142, 73,
949 70, 67, 147, 92, 133, 134, 135, 55, 74, 75,
950 159, 86, 87, 80, 81, 82, 83, 84, 85, 86,
951 87, 129, 130, 71, 76, 79, 109, 88, 89, 115,
952 116, 1, 77, 2, 108, 3, 4, 5, 6, 7,
953 107, 167, 8, 9, 10, 117, 11, 78, 12, 136,
954 137, 138, 139, 102, 103, 110, 111, 144, 112, 150,
955 157, 158, 13, 152, 153, 156, 162, 154, 161, 155,
956 96, 14, 166, 97, 98, 99, 100, 101, 168, 164,
957 15, 16, 17, 114, 118, 121, 119, 151, 18, 19,
958 122, 20, 21, 120, 160, 22, 23, 0, 143, 0,
959 0, 145, 0, 63, 0, 1, 0, 2, 163, 3,
960 4, 5, 6, 7, 0, 165, 8, 9, 10, 0,
961 11, 148, 12, 123, 124, 125, 126, 127, 128, 0,
962 0, 131, 132, 0, 0, 0, 13, 0, 0, 0,
963 0, 0, 0, 0, 0, 14, 0, 0, 0, 0,
964 0, 0, 0, 0, 15, 16, 17, 0, 0, 0,
965 0, 0, 18, 19, 0, 20, 21, 0, 0, 22,
971 14, 15, 16, 17, 18, 19, 36, 20, 22, 23,
972 0, 5, 3, 62, 104, 6, 3, 54, 52, 53,
973 69, 64, 21, 54, 55, 56, 63, 35, 19, 37,
974 0, 21, 19, 67, 90, 91, 92, 64, 38, 39,
975 70, 50, 51, 44, 45, 46, 47, 48, 49, 50,
976 51, 86, 87, 36, 40, 43, 55, 58, 59, 72,
977 73, 3, 41, 5, 54, 7, 8, 9, 10, 11,
978 64, 161, 14, 15, 16, 74, 18, 42, 20, 93,
979 94, 95, 96, 11, 62, 36, 70, 100, 69, 8,
980 6, 65, 34, 69, 69, 66, 69, 110, 70, 113,
981 57, 43, 69, 60, 61, 62, 63, 64, 70, 156,
982 52, 53, 54, 71, 75, 78, 76, 107, 60, 61,
983 79, 63, 64, 77, 146, 67, 68, -1, 70, -1,
984 -1, 100, -1, 146, -1, 3, -1, 5, 152, 7,
985 8, 9, 10, 11, -1, 158, 14, 15, 16, -1,
986 18, 103, 20, 80, 81, 82, 83, 84, 85, -1,
987 -1, 88, 89, -1, -1, -1, 34, -1, -1, -1,
988 -1, -1, -1, -1, -1, 43, -1, -1, -1, -1,
989 -1, -1, -1, -1, 52, 53, 54, -1, -1, -1,
990 -1, -1, 60, 61, -1, 63, 64, -1, -1, 67,
998 0, 3, 5, 7, 8, 9, 10, 11, 14, 15,
999 16, 18, 20, 34, 43, 52, 53, 54, 60, 61,
1000 63, 64, 67, 68, 72, 73, 74, 75, 76, 77,
1001 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
1002 88, 89, 90, 91, 92, 95, 97, 98, 99, 100,
1003 101, 102, 103, 105, 64, 64, 89, 103, 89, 89,
1004 89, 89, 89, 75, 93, 94, 73, 103, 89, 89,
1005 0, 36, 35, 37, 38, 39, 40, 41, 42, 43,
1006 44, 45, 46, 47, 48, 49, 50, 51, 58, 59,
1007 52, 53, 67, 54, 55, 56, 57, 60, 61, 62,
1008 63, 64, 11, 62, 54, 63, 104, 64, 103, 73,
1009 36, 70, 69, 69, 74, 75, 75, 73, 78, 79,
1010 80, 81, 82, 86, 86, 86, 86, 86, 86, 87,
1011 87, 86, 86, 88, 88, 88, 89, 89, 89, 89,
1012 3, 6, 19, 70, 75, 93, 96, 19, 101, 104,
1013 8, 103, 69, 69, 75, 89, 66, 6, 65, 70,
1014 94, 70, 69, 89, 76, 75, 69, 104, 70
1020 0, 71, 72, 72, 73, 74, 74, 75, 75, 75,
1021 76, 76, 77, 77, 78, 78, 79, 79, 80, 80,
1022 81, 81, 82, 82, 82, 82, 83, 83, 84, 84,
1023 85, 85, 85, 85, 86, 86, 86, 87, 87, 87,
1024 87, 88, 88, 88, 88, 89, 89, 89, 89, 89,
1025 89, 89, 89, 89, 89, 89, 90, 90, 91, 91,
1026 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,
1027 93, 93, 94, 94, 96, 95, 97, 98, 98, 99,
1028 99, 99, 99, 99, 99, 99, 99, 99, 99, 99,
1029 99, 99, 99, 100, 101, 102, 102, 103, 103, 103,
1030 104, 104, 104, 104, 105
1036 0, 2, 1, 1, 1, 1, 3, 1, 3, 3,
1037 1, 5, 1, 3, 1, 3, 1, 3, 1, 3,
1038 1, 3, 1, 1, 1, 1, 3, 3, 3, 3,
1039 3, 3, 3, 3, 1, 3, 3, 1, 3, 3,
1040 3, 1, 3, 3, 3, 2, 2, 2, 2, 2,
1041 2, 2, 2, 3, 1, 1, 5, 4, 1, 3,
1042 1, 3, 3, 4, 3, 2, 2, 1, 1, 1,
1043 1, 3, 0, 1, 0, 5, 4, 3, 6, 3,
1044 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
1045 1, 1, 4, 3, 1, 1, 2, 3, 1, 2,
1052#define yyerrok (yyerrstatus = 0)
1053#define yyclearin (yychar = YYEMPTY)
1055#define YYACCEPT goto yyacceptlab
1056#define YYABORT goto yyabortlab
1057#define YYERROR goto yyerrorlab
1058#define YYNOMEM goto yyexhaustedlab
1061#define YYRECOVERING() (!!yyerrstatus)
1063#define YYBACKUP(Token, Value) \
1065 if (yychar == YYEMPTY) \
1069 YYPOPSTACK (yylen); \
1075 yyerror (YY_("syntax error: cannot back up")); \
1082#define YYERRCODE YYUNDEF
1090# define YYFPRINTF fprintf
1093# define YYDPRINTF(Args) \
1102# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1106 YYFPRINTF (stderr, "%s ", Title); \
1107 yy_symbol_print (stderr, \
1109 YYFPRINTF (stderr, "\n"); \
1122 FILE *yyoutput = yyo;
1156 for (; yybottom <= yytop; yybottom++)
1158 int yybot = *yybottom;
1164# define YY_STACK_PRINT(Bottom, Top) \
1167 yy_stack_print ((Bottom), (Top)); \
1182 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %d):\n",
1185 for (yyi = 0; yyi < yynrhs; yyi++)
1190 &
yyvsp[(yyi + 1) - (yynrhs)]);
1195# define YY_REDUCE_PRINT(Rule) \
1198 yy_reduce_print (yyssp, yyvsp, Rule); \
1205# define YYDPRINTF(Args) ((void) 0)
1206# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1207# define YY_STACK_PRINT(Bottom, Top)
1208# define YY_REDUCE_PRINT(Rule)
1214# define YYINITDEPTH 200
1225# define YYMAXDEPTH 10000
1272 int yyerrstatus = 0;
1301#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1307 YYDPRINTF ((stderr,
"Starting parse\n"));
1335#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1342# if defined yyoverflow
1354 yyoverflow (
YY_(
"memory exhausted"),
1378# undef YYSTACK_RELOCATE
1388 YYDPRINTF ((stderr,
"Stack size increased to %ld\n",
1421 YYDPRINTF ((stderr,
"Reading a token\n"));
1429 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1512#line 1514 "d-exp.c.tmp"
1518#line 1520 "d-exp.c.tmp"
1527 ((
yyvsp[-1].opcode), std::move (lhs), std::move (rhs));
1529#line 1531 "d-exp.c.tmp"
1539 (std::move (first), std::move (mid),
1542#line 1544 "d-exp.c.tmp"
1548#line 1550 "d-exp.c.tmp"
1554#line 1556 "d-exp.c.tmp"
1560#line 1562 "d-exp.c.tmp"
1566#line 1568 "d-exp.c.tmp"
1572#line 1574 "d-exp.c.tmp"
1578#line 1580 "d-exp.c.tmp"
1584#line 1586 "d-exp.c.tmp"
1590#line 1592 "d-exp.c.tmp"
1596#line 1598 "d-exp.c.tmp"
1602#line 1604 "d-exp.c.tmp"
1608#line 1610 "d-exp.c.tmp"
1614#line 1616 "d-exp.c.tmp"
1620#line 1622 "d-exp.c.tmp"
1626#line 1628 "d-exp.c.tmp"
1632#line 1634 "d-exp.c.tmp"
1638#line 1640 "d-exp.c.tmp"
1644#line 1646 "d-exp.c.tmp"
1650#line 1652 "d-exp.c.tmp"
1656#line 1658 "d-exp.c.tmp"
1662#line 1664 "d-exp.c.tmp"
1668#line 1670 "d-exp.c.tmp"
1674#line 1676 "d-exp.c.tmp"
1680#line 1682 "d-exp.c.tmp"
1686#line 1688 "d-exp.c.tmp"
1692#line 1694 "d-exp.c.tmp"
1698#line 1700 "d-exp.c.tmp"
1704#line 1706 "d-exp.c.tmp"
1710#line 1712 "d-exp.c.tmp"
1716#line 1718 "d-exp.c.tmp"
1722#line 1724 "d-exp.c.tmp"
1728#line 1730 "d-exp.c.tmp"
1734#line 1736 "d-exp.c.tmp"
1740#line 1742 "d-exp.c.tmp"
1751#line 1753 "d-exp.c.tmp"
1760#line 1762 "d-exp.c.tmp"
1771#line 1773 "d-exp.c.tmp"
1777#line 1779 "d-exp.c.tmp"
1783#line 1785 "d-exp.c.tmp"
1789#line 1791 "d-exp.c.tmp"
1795#line 1797 "d-exp.c.tmp"
1801#line 1803 "d-exp.c.tmp"
1807#line 1809 "d-exp.c.tmp"
1813#line 1815 "d-exp.c.tmp"
1819 std::vector<operation_up> args
1824#line 1826 "d-exp.c.tmp"
1831 std::vector<operation_up> args
1839#line 1841 "d-exp.c.tmp"
1845#line 1847 "d-exp.c.tmp"
1855 (std::move (first), std::move (mid),
1858#line 1860 "d-exp.c.tmp"
1864#line 1866 "d-exp.c.tmp"
1884 else if (is_a_field_of_this.
type != NULL)
1890 = make_operation<op_this_operation> ();
1892 (std::move (thisop), std::move (copy));
1898 if (msymbol.
minsym != NULL)
1901 error (_(
"No symbol table is loaded. Use the \"file\" command"));
1903 error (_(
"No symbol \"%s\" in current context."),
1907#line 1909 "d-exp.c.tmp"
1917 if (
type->
code () == TYPE_CODE_MODULE)
1921 int type_name_len = strlen (type_name);
1923 = string_printf (
"%.*s.%.*s",
1924 type_name_len, type_name,
1925 (
yyvsp[0].sval).length, (
yyvsp[0].sval).ptr);
1929 (
const struct block *) NULL,
1938 error (_(
"`%s' is not defined as an aggregate type."),
1945#line 1947 "d-exp.c.tmp"
1951#line 1953 "d-exp.c.tmp"
1960#line 1962 "d-exp.c.tmp"
1968#line 1970 "d-exp.c.tmp"
1974#line 1976 "d-exp.c.tmp"
1980#line 1982 "d-exp.c.tmp"
1986#line 1988 "d-exp.c.tmp"
1997#line 1999 "d-exp.c.tmp"
2006#line 2008 "d-exp.c.tmp"
2013 for (i = 0; i < (
yyvsp[0].svec).
len; ++i)
2016#line 2018 "d-exp.c.tmp"
2022 std::vector<operation_up> args
2025 (0, (
yyvsp[0].ival) - 1, std::move (args));
2027#line 2029 "d-exp.c.tmp"
2033#line 2035 "d-exp.c.tmp"
2039#line 2041 "d-exp.c.tmp"
2050 (
yyval.svec).len = 1;
2051 (
yyval.svec).tokens = vec;
2056 memcpy (vec->
ptr, (
yyvsp[0].tsval).ptr, (
yyvsp[0].tsval).length + 1);
2058#line 2060 "d-exp.c.tmp"
2075 (
yyval.svec).tokens[(
yyval.svec).len - 1].ptr = p;
2077#line 2079 "d-exp.c.tmp"
2083#line 2085 "d-exp.c.tmp"
2089#line 2091 "d-exp.c.tmp"
2097#line 2099 "d-exp.c.tmp"
2103#line 2105 "d-exp.c.tmp"
2109#line 2111 "d-exp.c.tmp"
2116#line 2118 "d-exp.c.tmp"
2123#line 2125 "d-exp.c.tmp"
2129#line 2131 "d-exp.c.tmp"
2133#line 2135 "d-exp.c.tmp"
2183 if (yyerrstatus == 3)
2334 return (
type->
code () == TYPE_CODE_STRUCT
2335 ||
type->
code () == TYPE_CODE_UNION
2336 ||
type->
code () == TYPE_CODE_MODULE
2337 || (
type->
code () == TYPE_CODE_ENUM
2349 int len,
int parsed_float,
YYSTYPE *putithere)
2362 int found_suffix = 0;
2365 struct type *signed_type;
2366 struct type *unsigned_type;
2373 s = (
char *) alloca (len + 1);
2385 if (len >= 1 && tolower (s[len - 1]) ==
'i')
2387 if (len >= 2 && tolower (s[len - 2]) ==
'f')
2393 else if (len >= 2 && tolower (s[len - 2]) ==
'l')
2407 else if (len >= 1 && tolower (s[len - 1]) ==
'f')
2413 else if (len >= 1 && tolower (s[len - 1]) ==
'l')
2468 if (c >=
'A' && c <=
'Z')
2470 if (c !=
'l' && c !=
'u')
2472 if (c >=
'0' && c <=
'9')
2480 if (base > 10 && c >=
'a' && c <=
'f')
2484 n += i = c -
'a' + 10;
2486 else if (c ==
'l' && long_p == 0)
2491 else if (c ==
'u' && unsigned_p == 0)
2502 if (c !=
'l' && c !=
'u')
2504 ULONGEST
n2 = prevn * base;
2505 if ((
n2 / base != prevn) || (
n2 + i < prevn))
2506 error (_(
"Numeric constant too large."));
2519 un = (ULONGEST) n >> 2;
2520 if (long_p == 0 && (un >> 30) == 0)
2522 high_bit = ((ULONGEST) 1) << 31;
2525 if (base == 10 && !unsigned_p)
2533 if (
sizeof (ULONGEST) * HOST_CHAR_BIT < 64)
2535 shift = (
sizeof (ULONGEST) * HOST_CHAR_BIT - 1);
2538 high_bit = (ULONGEST) 1 << shift;
2547 if (unsigned_p || (n & high_bit))
2584 obstack_free (&
tempbuf, NULL);
2601 else if (c == quote)
2614 if (*tokptr != quote)
2616 if (quote ==
'"' || quote ==
'`')
2617 error (_(
"Unterminated string in expression."));
2619 error (_(
"Unmatched single quote."));
2665 {
"||",
OROR, OP_NULL},
2667 {
"<<",
LSH, OP_NULL},
2668 {
">>",
RSH, OP_NULL},
2669 {
"==",
EQUAL, OP_NULL},
2671 {
"<=",
LEQ, OP_NULL},
2672 {
">=",
GEQ, OP_NULL},
2726 const char *tokstart;
2738 if (strncmp (tokstart,
token.
oper, 3) == 0)
2747 if (strncmp (tokstart,
token.
oper, 2) == 0)
2754 switch (c = *tokstart)
2766 else if (saw_structop)
2819 int got_dot = 0, got_e = 0, toktype;
2820 const char *p = tokstart;
2823 if (c ==
'0' && (p[1] ==
'x' || p[1] ==
'X'))
2834 if ((!hex && !got_e && tolower (p[0]) ==
'e')
2835 || (hex && !got_e && tolower (p[0] ==
'p')))
2836 got_dot = got_e = 1;
2840 else if (!got_dot && (p[0] ==
'.' && p[1] !=
'.'))
2843 else if (got_e && (tolower (p[-1]) ==
'e' || tolower (p[-1]) ==
'p')
2844 && (*p ==
'-' || *p ==
'+'))
2849 else if ((*p <
'0' || *p >
'9') && (*p !=
'_')
2850 && ((*p <
'a' || *p >
'z') && (*p <
'A' || *p >
'Z')))
2854 toktype =
parse_number (par_state, tokstart, p - tokstart,
2856 if (toktype ==
ERROR)
2858 char *err_copy = (
char *) alloca (p - tokstart + 1);
2860 memcpy (err_copy, tokstart, p - tokstart);
2861 err_copy[p - tokstart] = 0;
2862 error (_(
"Invalid number \"%s\"."), err_copy);
2870 const char *p = &tokstart[1];
2871 size_t len = strlen (
"entry");
2873 while (isspace (*p))
2875 if (strncmp (p,
"entry", len) == 0 && !isalnum (p[len])
2914 error (_(
"Empty character constant."));
2915 else if (host_len > 2 && c ==
'\'')
2921 else if (host_len > 1)
2922 error (_(
"Invalid character constant."));
2928 if (!(c ==
'_' || c ==
'$'
2929 || (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z')))
2931 error (_(
"Invalid character '%c' in expression"), c);
2935 for (c = tokstart[namelen];
2936 (c ==
'_' || c ==
'$' || (c >=
'0' && c <=
'9')
2937 || (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z'));)
2938 c = tokstart[++namelen];
2942 if (namelen == 2 && tokstart[0] ==
'i' && tokstart[1] ==
'f')
2951 && (strncmp (tokstart,
"thread", namelen) == 0
2952 || strncmp (tokstart,
"task", namelen) == 0)
2953 && (tokstart[namelen] ==
' ' || tokstart[namelen] ==
'\t'))
2955 const char *p = tokstart + namelen + 1;
2957 while (*p ==
' ' || *p ==
'\t')
2959 if (*p >=
'0' && *p <=
'9')
2981 if (*tokstart ==
'$')
2986 par_state->
gdbarch (), copy.c_str ());
2993 if ((tokstart[0] >=
'a' && tokstart[0] <
'a' +
input_radix - 10)
2994 || (tokstart[0] >=
'A' && tokstart[0] <
'A' +
input_radix - 10))
2997 int hextype =
parse_number (par_state, tokstart, namelen, 0, &newlval);
3045 else if (sym.
symbol == NULL)
3074 if (context == NULL)
3108 struct type *context_type = NULL;
3109 int last_to_examine, next_to_examine, checkpoint;
3110 const struct block *search_block;
3119 return current.
token;
3125 last_was_dot = current.
token ==
'.';
3134 || (!last_was_dot && current.
token !=
'.'))
3137 last_was_dot = !last_was_dot;
3144 next_to_examine = 0;
3167 while (next_to_examine <= last_to_examine)
3198 else if (next.
token ==
'.' && !last_was_dot)
3210 next_to_examine = 1;
3217 if (current.
token ==
'.')
3218 search_block = NULL;
3229 last_was_dot = current.
token ==
'.';
3231 while (next_to_examine <= last_to_examine)
3251 checkpoint = next_to_examine;
3254 if (context_type != NULL)
3265 current.
token = classification;
3274 else if (next.
token ==
'.' && !last_was_dot)
3297 return current.
token;
3304 scoped_restore pstate_restore = make_scoped_restore (&
pstate);
3305 gdb_assert (par_state != NULL);
3308 scoped_restore restore_yydebug = make_scoped_restore (&
yydebug,
3312 scoped_restore restore_type_stack = make_scoped_restore (&
type_stack,
3336 error (_(
"A %s in expression, near `%s'."), msg,
pstate->
lexptr);
int c_parse_escape(const char **ptr, struct obstack *output)
void update(const struct block *b, innermost_block_tracker_types t)
static const char * yysymbol_name(yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED
static auto_obstack name_obstack
static int lex_one_token(struct parser_state *par_state)
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
int d_parse(struct parser_state *par_state)
#define IMMUTABLE_KEYWORD
static const yytype_int8 yytranslate[]
@ YYSYMBOL_EqualExpression
@ YYSYMBOL_AssignExpression
@ YYSYMBOL_DELEGATE_KEYWORD
@ YYSYMBOL_STRING_LITERAL
@ YYSYMBOL_INTEGER_LITERAL
@ YYSYMBOL_UnaryExpression
@ YYSYMBOL_TYPEOF_KEYWORD
@ YYSYMBOL_CastExpression
@ YYSYMBOL_CHARACTER_LITERAL
@ YYSYMBOL_IMMUTABLE_KEYWORD
@ YYSYMBOL_INTERFACE_KEYWORD
@ YYSYMBOL_ShiftExpression
@ YYSYMBOL_AndAndExpression
@ YYSYMBOL_CallExpression
@ YYSYMBOL_FUNCTION_KEYWORD
@ YYSYMBOL_ArgumentList_opt
@ YYSYMBOL_STRUCT_KEYWORD
@ YYSYMBOL_PostfixExpression
@ YYSYMBOL_TEMPLATE_KEYWORD
@ YYSYMBOL_SIZEOF_KEYWORD
@ YYSYMBOL_DOLLAR_VARIABLE
@ YYSYMBOL_CommaExpression
@ YYSYMBOL_OrOrExpression
@ YYSYMBOL_TYPEID_KEYWORD
@ YYSYMBOL_SliceExpression
@ YYSYMBOL_IndexExpression
@ YYSYMBOL_PrimaryExpression
@ YYSYMBOL_IdentityExpression
@ YYSYMBOL_SHARED_KEYWORD
@ YYSYMBOL_ConditionalExpression
static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep)
static struct type_stack * type_stack
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static const yytype_int8 yydefact[]
#define YY_IGNORE_USELESS_CAST_END
#define INTERFACE_KEYWORD
static int classify_name(struct parser_state *par_state, const struct block *block)
static const yytype_int16 yyrline[]
#define YY_REDUCE_PRINT(Rule)
#define YY_CAST(Type, Val)
static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep)
static struct parser_state * pstate
static const yytype_int16 yypact[]
static const yytype_uint8 yydefgoto[]
static int parse_string_or_char(const char *tokptr, const char **outptr, struct typed_stoken *value, int *host_chars)
#define YY_ACCESSING_SYMBOL(State)
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
static int parse_number(struct parser_state *, const char *, int, int, YYSTYPE *)
static const struct token tokentab3[]
#define YY_STACK_PRINT(Bottom, Top)
static void yy_symbol_value_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep)
#define YY_IGNORE_USELESS_CAST_BEGIN
static const yytype_int8 yyr2[]
static void yy_reduce_print(yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule)
#define yytable_value_is_error(Yyn)
static const yytype_int8 yystos[]
#define YY_ATTRIBUTE_UNUSED
static int classify_inner_name(struct parser_state *par_state, const struct block *block, struct type *context)
static const struct token tokentab2[]
static const char *const yytname[]
static const yytype_int8 yypgoto[]
static const yytype_int8 yyr1[]
static int saw_name_at_eof
static const struct token ident_tokens[]
enum yytokentype yytoken_kind_t
static struct obstack tempbuf
static std::vector< token_and_value > token_fifo
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
static int type_aggregate_p(struct type *)
#define CHARACTER_LITERAL
#define yypact_value_is_default(Yyn)
static int last_was_structop
static const yytype_uint8 yytable[]
static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop)
static const yytype_int16 yycheck[]
struct block_symbol d_lookup_nested_symbol(struct type *, const char *, const struct block *)
int symbol_read_needs_frame(struct symbol *sym)
struct type * lookup_pointer_type(struct type *type)
struct type * check_typedef(struct type *type)
#define TYPE_SAFE_NAME(type)
struct type * language_lookup_primitive_type(const struct language_defn *la, struct gdbarch *gdbarch, const char *name)
struct bound_minimal_symbol lookup_bound_minimal_symbol(const char *name)
std::unique_ptr< operation > operation_up
std::array< gdb_byte, 16 > float_data
int have_partial_symbols(void)
int have_full_symbols(void)
bool parse_float(const char *p, int len, const struct type *type, gdb_byte *data)
std::string copy_name(struct stoken token)
struct minimal_symbol * minsym
void set_operation(expr::operation_up &&op)
const struct language_defn * language()
struct gdbarch * gdbarch()
void push_new(Arg... args)
const struct block *const expression_context_block
std::vector< expr::operation_up > pop_vector(int n)
void push_dollar(struct stoken str)
void push_symbol(const char *name, block_symbol sym)
innermost_block_tracker * block_tracker
void push_c_string(int, struct stoken_vector *vec)
void push(expr::operation_up &&op)
void mark_struct_expression(expr::structop_base_operation *op)
struct typed_stoken * tokens
address_class aclass() const
struct type * type() const
void push(enum type_pieces tp)
struct type * follow_types(struct type *follow_type)
bool is_declared_class() const
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)
struct YYSTYPE::@23 typed_val_int
struct YYSTYPE::@3 typed_val_float
struct stoken_vector svec
struct typed_stoken tsval