52#define YYBISON_VERSION "3.8.2"
55#define YYSKELETON_NAME "yacc.c"
88#define parse_type(ps) builtin_type (ps->gdbarch ())
92#define GDB_YY_REMAP_PREFIX go_
102static int yylex (
void);
104static void yyerror (
const char *);
107#line 108 "go-exp.c.tmp"
111# define YY_CAST(Type, Val) static_cast<Type> (Val)
112# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
114# define YY_CAST(Type, Val) ((Type) (Val))
115# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
118# ifndef YY_NULLPTRPTR
119# if defined __cplusplus
120# if 201103L <= __cplusplus
121# define YY_NULLPTRPTR nullptr
123# define YY_NULLPTRPTR 0
126# define YY_NULLPTRPTR ((void*)0)
200#define RAW_STRING 260
206#define NAME_OR_INT 266
207#define TRUE_KEYWORD 267
208#define FALSE_KEYWORD 268
209#define STRUCT_KEYWORD 269
210#define INTERFACE_KEYWORD 270
211#define TYPE_KEYWORD 271
212#define CHAN_KEYWORD 272
213#define SIZEOF_KEYWORD 273
214#define LEN_KEYWORD 274
215#define CAP_KEYWORD 275
216#define NEW_KEYWORD 276
217#define IOTA_KEYWORD 277
218#define NIL_KEYWORD 278
219#define CONST_KEYWORD 279
223#define BYTE_KEYWORD 283
224#define DOLLAR_VARIABLE 284
225#define ASSIGN_MODIFY 285
226#define ABOVE_COMMA 286
239#define LEFT_ARROW 299
242#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
267#line 268 "go-exp.c.tmp"
271# define YYSTYPE_IS_TRIVIAL 1
272# define YYSTYPE_IS_DECLARED 1
377 const char *,
int,
int,
YYSTYPE *);
381#line 382 "go-exp.c.tmp"
392#ifndef __PTRDIFF_MAX__
394# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
405#ifdef __INT_LEAST8_MAX__
407#elif defined YY_STDINT_H
413#ifdef __INT_LEAST16_MAX__
415#elif defined YY_STDINT_H
427# undef UINT_LEAST8_MAX
428# undef UINT_LEAST16_MAX
429# define UINT_LEAST8_MAX 255
430# define UINT_LEAST16_MAX 65535
433#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
435#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
436 && UINT_LEAST8_MAX <= INT_MAX)
438#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
444#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
446#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
447 && UINT_LEAST16_MAX <= INT_MAX)
449#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
456# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
457# define YYPTRDIFF_T __PTRDIFF_TYPE__
458# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
459# elif defined PTRDIFF_MAX
463# define YYPTRDIFF_T ptrdiff_t
464# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
466# define YYPTRDIFF_T long
467# define YYPTRDIFF_MAXIMUM LONG_MAX
473# define YYSIZE_T __SIZE_TYPE__
475# define YYSIZE_T size_t
476# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
478# define YYSIZE_T size_t
480# define YYSIZE_T unsigned
484#define YYSIZE_MAXIMUM \
485 YY_CAST (YYPTRDIFF_T, \
486 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
487 ? YYPTRDIFF_MAXIMUM \
488 : YY_CAST (YYSIZE_T, -1)))
490#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
500# if defined YYENABLE_NLS && YYENABLE_NLS
503# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
507# define YY_(Msgid) Msgid
512#ifndef YY_ATTRIBUTE_PURE
513# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
514# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
516# define YY_ATTRIBUTE_PURE
520#ifndef YY_ATTRIBUTE_UNUSED
521# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
522# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
524# define YY_ATTRIBUTE_UNUSED
529#if ! defined lint || defined __GNUC__
530# define YY_USE(E) ((void) (E))
536#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
537# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
538# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
539 _Pragma ("GCC diagnostic push") \
540 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
542# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
543 _Pragma ("GCC diagnostic push") \
544 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
545 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
547# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
548 _Pragma ("GCC diagnostic pop")
550# define YY_INITIAL_VALUE(Value) Value
552#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
553# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
554# define YY_IGNORE_MAYBE_UNINITIALIZED_END
556#ifndef YY_INITIAL_VALUE
557# define YY_INITIAL_VALUE(Value)
560#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
561# define YY_IGNORE_USELESS_CAST_BEGIN \
562 _Pragma ("GCC diagnostic push") \
563 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
564# define YY_IGNORE_USELESS_CAST_END \
565 _Pragma ("GCC diagnostic pop")
567#ifndef YY_IGNORE_USELESS_CAST_BEGIN
568# define YY_IGNORE_USELESS_CAST_BEGIN
569# define YY_IGNORE_USELESS_CAST_END
573#define YY_ASSERT(E) ((void) (0 && (E)))
575#if !defined yyoverflow
579# ifdef YYSTACK_USE_ALLOCA
580# if YYSTACK_USE_ALLOCA
582# define YYSTACK_ALLOC __builtin_alloca
583# elif defined __BUILTIN_VA_ARG_INCR
586# define YYSTACK_ALLOC __alloca
587# elif defined _MSC_VER
588# define alloca _alloca
590# define YYSTACK_ALLOC alloca
591# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
595# define EXIT_SUCCESS 0
604# define YYSTACK_FREE(Ptr) do { ; } while (0)
605# ifndef YYSTACK_ALLOC_MAXIMUM
610# define YYSTACK_ALLOC_MAXIMUM 4032
613# define YYSTACK_ALLOC YYMALLOC
614# define YYSTACK_FREE YYFREE
615# ifndef YYSTACK_ALLOC_MAXIMUM
616# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
618# if (defined __cplusplus && ! defined EXIT_SUCCESS \
619 && ! ((defined YYMALLOC || defined xmalloc) \
620 && (defined YYFREE || defined xfree)))
623# define EXIT_SUCCESS 0
627# define YYMALLOC xmalloc
628# if ! defined xmalloc && ! defined EXIT_SUCCESS
634# if ! defined xfree && ! defined EXIT_SUCCESS
641#if (! defined yyoverflow \
642 && (! defined __cplusplus \
643 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
653# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
657# define YYSTACK_BYTES(N) \
658 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
659 + YYSTACK_GAP_MAXIMUM)
661# define YYCOPY_NEEDED 1
668# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
671 YYPTRDIFF_T yynewbytes; \
672 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
673 Stack = &yyptr->Stack_alloc; \
674 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
675 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
681#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
685# if defined __GNUC__ && 1 < __GNUC__
686# define YYCOPY(Dst, Src, Count) \
687 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
689# define YYCOPY(Dst, Src, Count) \
693 for (yyi = 0; yyi < (Count); yyi++) \
694 (Dst)[yyi] = (Src)[yyi]; \
721#define YYTRANSLATE(YYX) \
722 (0 <= (YYX) && (YYX) <= YYMAXUTOK \
723 ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
730 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
731 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
732 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
733 2, 2, 2, 62, 2, 2, 2, 54, 39, 2,
734 61, 64, 52, 50, 31, 51, 59, 53, 2, 2,
735 2, 2, 2, 2, 2, 2, 2, 2, 67, 2,
736 43, 33, 44, 34, 49, 2, 2, 2, 2, 2,
737 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
738 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
739 2, 60, 2, 63, 38, 2, 2, 2, 2, 2,
740 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
741 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
742 2, 2, 2, 65, 37, 66, 2, 2, 2, 2,
743 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
744 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
745 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
746 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
747 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
748 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
749 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
750 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
751 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
752 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
753 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
754 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
755 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
756 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
757 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
758 25, 26, 27, 28, 29, 30, 32, 35, 36, 40,
759 41, 42, 45, 46, 47, 48, 55, 56, 57, 58
766 0, 194, 194, 195, 198, 203, 204, 209, 213, 217,
767 221, 225, 229, 233, 237, 243, 250, 260, 269, 276,
768 273, 286, 290, 293, 297, 301, 305, 312, 319, 325,
769 329, 333, 337, 341, 345, 349, 353, 357, 361, 365,
770 369, 373, 377, 381, 385, 389, 393, 397, 401, 412,
771 416, 425, 432, 441, 452, 461, 464, 470, 482, 489,
772 506, 524, 536, 540, 544, 558, 603, 605, 612, 625
777#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
788 "\"end of file\"",
"error",
"\"invalid token\"",
"INT",
"FLOAT",
789 "RAW_STRING",
"STRING",
"CHAR",
"NAME",
"TYPENAME",
"COMPLETE",
790 "NAME_OR_INT",
"TRUE_KEYWORD",
"FALSE_KEYWORD",
"STRUCT_KEYWORD",
791 "INTERFACE_KEYWORD",
"TYPE_KEYWORD",
"CHAN_KEYWORD",
"SIZEOF_KEYWORD",
792 "LEN_KEYWORD",
"CAP_KEYWORD",
"NEW_KEYWORD",
"IOTA_KEYWORD",
793 "NIL_KEYWORD",
"CONST_KEYWORD",
"DOTDOTDOT",
"ENTRY",
"ERROR",
794 "BYTE_KEYWORD",
"DOLLAR_VARIABLE",
"ASSIGN_MODIFY",
"','",
"ABOVE_COMMA",
795 "'='",
"'?'",
"OROR",
"ANDAND",
"'|'",
"'^'",
"'&'",
"ANDNOT",
"EQUAL",
796 "NOTEQUAL",
"'<'",
"'>'",
"LEQ",
"GEQ",
"LSH",
"RSH",
"'@'",
"'+'",
797 "'-'",
"'*'",
"'/'",
"'%'",
"UNARY",
"INCREMENT",
"DECREMENT",
798 "LEFT_ARROW",
"'.'",
"'['",
"'('",
"'!'",
"']'",
"')'",
"'{'",
"'}'",
799 "':'",
"$accept",
"start",
"type_exp",
"exp1",
"exp",
"$@1",
"lcurly",
800 "arglist",
"rcurly",
"string_exp",
"variable",
"type",
811#define YYPACT_NINF (-42)
813#define yypact_value_is_default(Yyn) \
814 ((Yyn) == YYPACT_NINF)
816#define YYTABLE_NINF (-1)
818#define yytable_value_is_error(Yyn) \
825 49, -42, -42, -42, -42, -42, -42, -42, -42, -42,
826 -38, -42, -42, 49, 49, 49, 49, 49, 49, 49,
827 -42, 27, -42, 34, 187, 45, 16, -42, 11, 53,
828 49, -35, 11, -35, -35, -35, -35, 11, 38, -35,
829 -42, 49, 49, 49, 49, 49, 49, 49, 49, 49,
830 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
831 49, 49, 49, 49, -42, -42, -3, 49, -42, 45,
832 9, 74, 49, -42, 123, 10, -42, 187, 187, 187,
833 88, 241, 266, 290, 313, 334, 353, 353, 368, 368,
834 368, 368, -41, -41, 380, 390, 390, -35, -35, -35,
835 -42, 72, 33, 49, -42, -42, 49, -42, 155, -42,
836 -42, 49, -42, -42, 187, 39, -35, -42, 215, 49,
845 0, 51, 54, 59, 52, 69, 67, 53, 62, 63,
846 0, 68, 56, 0, 0, 0, 0, 0, 0, 0,
847 21, 0, 3, 2, 5, 0, 61, 55, 4, 65,
848 0, 12, 0, 8, 10, 9, 7, 66, 0, 11,
849 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
850 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
851 0, 0, 0, 0, 13, 14, 0, 0, 19, 0,
852 0, 0, 0, 64, 0, 0, 28, 6, 50, 49,
853 0, 47, 46, 45, 44, 43, 37, 38, 41, 42,
854 39, 40, 35, 36, 29, 33, 34, 30, 31, 32,
855 17, 15, 0, 22, 66, 25, 0, 60, 0, 58,
856 57, 0, 16, 18, 23, 0, 26, 27, 48, 0,
863 -42, -42, -42, -4, -13, -42, -42, -42, -42, -42,
870 0, 21, 22, 23, 24, 103, 25, 115, 106, 26,
879 31, 33, 34, 35, 36, 5, 39, 100, 58, 59,
880 60, 61, 62, 63, 38, 64, 65, 74, 66, 67,
881 68, 64, 65, 30, 66, 67, 68, 40, 77, 78,
882 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
883 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,
884 99, 28, 1, 2, 6, 3, 4, 5, 6, 108,
885 7, 8, 9, 102, 41, 41, 71, 10, 37, 41,
886 119, 72, 72, 11, 110, 105, 70, 11, 12, 73,
887 107, 75, 112, 101, 0, 0, 0, 13, 14, 0,
888 114, 0, 0, 116, 0, 0, 113, 69, 118, 15,
889 16, 17, 76, 120, 0, 0, 121, 0, 0, 0,
890 18, 19, 0, 0, 20, 0, 0, 0, 42, 0,
891 104, 43, 44, 45, 46, 47, 48, 49, 0, 50,
892 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
893 61, 62, 63, 0, 64, 65, 0, 66, 67, 68,
894 0, 0, 0, 42, 0, 111, 43, 44, 45, 46,
895 47, 48, 49, 0, 50, 51, 52, 53, 54, 55,
896 56, 57, 58, 59, 60, 61, 62, 63, 0, 64,
897 65, 0, 66, 67, 68, 42, 0, 109, 43, 44,
898 45, 46, 47, 48, 49, 0, 50, 51, 52, 53,
899 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
900 0, 64, 65, 0, 66, 67, 68, 42, 0, 117,
901 43, 44, 45, 46, 47, 48, 49, 0, 50, 51,
902 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
903 62, 63, 0, 64, 65, 0, 66, 67, 68, 44,
904 45, 46, 47, 48, 49, 0, 50, 51, 52, 53,
905 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
906 0, 64, 65, 0, 66, 67, 68, 46, 47, 48,
907 49, 0, 50, 51, 52, 53, 54, 55, 56, 57,
908 58, 59, 60, 61, 62, 63, 0, 64, 65, 0,
909 66, 67, 68, 47, 48, 49, 0, 50, 51, 52,
910 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
911 63, 0, 64, 65, 0, 66, 67, 68, 48, 49,
912 0, 50, 51, 52, 53, 54, 55, 56, 57, 58,
913 59, 60, 61, 62, 63, 0, 64, 65, 0, 66,
914 67, 68, 49, 0, 50, 51, 52, 53, 54, 55,
915 56, 57, 58, 59, 60, 61, 62, 63, 0, 64,
916 65, 0, 66, 67, 68, 50, 51, 52, 53, 54,
917 55, 56, 57, 58, 59, 60, 61, 62, 63, 0,
918 64, 65, 0, 66, 67, 68, 52, 53, 54, 55,
919 56, 57, 58, 59, 60, 61, 62, 63, 0, 64,
920 65, 0, 66, 67, 68, 56, 57, 58, 59, 60,
921 61, 62, 63, 0, 64, 65, 0, 66, 67, 68,
922 59, 60, 61, 62, 63, 0, 64, 65, 0, 66,
923 67, 68, 61, 62, 63, 0, 64, 65, 0, 66,
929 13, 14, 15, 16, 17, 8, 19, 10, 49, 50,
930 51, 52, 53, 54, 18, 56, 57, 30, 59, 60,
931 61, 56, 57, 61, 59, 60, 61, 0, 41, 42,
932 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
933 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
934 63, 0, 3, 4, 9, 6, 7, 8, 9, 72,
935 11, 12, 13, 67, 31, 31, 50, 18, 17, 31,
936 31, 61, 61, 28, 64, 66, 25, 28, 29, 26,
937 6, 30, 10, 66, -1, -1, -1, 38, 39, -1,
938 103, -1, -1, 106, -1, -1, 63, 52, 111, 50,
939 51, 52, 64, 64, -1, -1, 119, -1, -1, -1,
940 61, 62, -1, -1, 65, -1, -1, -1, 30, -1,
941 69, 33, 34, 35, 36, 37, 38, 39, -1, 41,
942 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
943 52, 53, 54, -1, 56, 57, -1, 59, 60, 61,
944 -1, -1, -1, 30, -1, 67, 33, 34, 35, 36,
945 37, 38, 39, -1, 41, 42, 43, 44, 45, 46,
946 47, 48, 49, 50, 51, 52, 53, 54, -1, 56,
947 57, -1, 59, 60, 61, 30, -1, 64, 33, 34,
948 35, 36, 37, 38, 39, -1, 41, 42, 43, 44,
949 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
950 -1, 56, 57, -1, 59, 60, 61, 30, -1, 64,
951 33, 34, 35, 36, 37, 38, 39, -1, 41, 42,
952 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
953 53, 54, -1, 56, 57, -1, 59, 60, 61, 34,
954 35, 36, 37, 38, 39, -1, 41, 42, 43, 44,
955 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
956 -1, 56, 57, -1, 59, 60, 61, 36, 37, 38,
957 39, -1, 41, 42, 43, 44, 45, 46, 47, 48,
958 49, 50, 51, 52, 53, 54, -1, 56, 57, -1,
959 59, 60, 61, 37, 38, 39, -1, 41, 42, 43,
960 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
961 54, -1, 56, 57, -1, 59, 60, 61, 38, 39,
962 -1, 41, 42, 43, 44, 45, 46, 47, 48, 49,
963 50, 51, 52, 53, 54, -1, 56, 57, -1, 59,
964 60, 61, 39, -1, 41, 42, 43, 44, 45, 46,
965 47, 48, 49, 50, 51, 52, 53, 54, -1, 56,
966 57, -1, 59, 60, 61, 41, 42, 43, 44, 45,
967 46, 47, 48, 49, 50, 51, 52, 53, 54, -1,
968 56, 57, -1, 59, 60, 61, 43, 44, 45, 46,
969 47, 48, 49, 50, 51, 52, 53, 54, -1, 56,
970 57, -1, 59, 60, 61, 47, 48, 49, 50, 51,
971 52, 53, 54, -1, 56, 57, -1, 59, 60, 61,
972 50, 51, 52, 53, 54, -1, 56, 57, -1, 59,
973 60, 61, 52, 53, 54, -1, 56, 57, -1, 59,
981 0, 3, 4, 6, 7, 8, 9, 11, 12, 13,
982 18, 28, 29, 38, 39, 50, 51, 52, 61, 62,
983 65, 69, 70, 71, 72, 74, 77, 78, 79, 80,
984 61, 72, 79, 72, 72, 72, 72, 79, 71, 72,
985 0, 31, 30, 33, 34, 35, 36, 37, 38, 39,
986 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
987 51, 52, 53, 54, 56, 57, 59, 60, 61, 52,
988 79, 50, 61, 26, 72, 79, 64, 72, 72, 72,
989 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
990 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
991 10, 80, 71, 73, 79, 66, 76, 6, 72, 64,
992 64, 67, 10, 63, 72, 75, 72, 64, 72, 31,
999 0, 68, 69, 69, 70, 71, 71, 72, 72, 72,
1000 72, 72, 72, 72, 72, 72, 72, 72, 72, 73,
1001 72, 74, 75, 75, 75, 76, 72, 72, 72, 72,
1002 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
1003 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
1004 72, 72, 72, 72, 72, 72, 72, 72, 72, 77,
1005 77, 72, 72, 72, 78, 78, 79, 79, 79, 80
1011 0, 2, 1, 1, 1, 1, 3, 2, 2, 2,
1012 2, 2, 2, 2, 2, 3, 4, 3, 4, 0,
1013 5, 1, 0, 1, 3, 1, 4, 4, 3, 3,
1014 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1015 3, 3, 3, 3, 3, 3, 3, 3, 5, 3,
1016 3, 1, 1, 1, 1, 1, 1, 4, 4, 1,
1017 3, 1, 1, 1, 2, 1, 2, 1, 1, 1
1023#define yyerrok (yyerrstatus = 0)
1024#define yyclearin (yychar = YYEMPTY)
1026#define YYACCEPT goto yyacceptlab
1027#define YYABORT goto yyabortlab
1028#define YYERROR goto yyerrorlab
1029#define YYNOMEM goto yyexhaustedlab
1032#define YYRECOVERING() (!!yyerrstatus)
1034#define YYBACKUP(Token, Value) \
1036 if (yychar == YYEMPTY) \
1040 YYPOPSTACK (yylen); \
1046 yyerror (YY_("syntax error: cannot back up")); \
1053#define YYERRCODE YYUNDEF
1061# define YYFPRINTF fprintf
1064# define YYDPRINTF(Args) \
1073# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1077 YYFPRINTF (stderr, "%s ", Title); \
1078 yy_symbol_print (stderr, \
1080 YYFPRINTF (stderr, "\n"); \
1093 FILE *yyoutput = yyo;
1127 for (; yybottom <= yytop; yybottom++)
1129 int yybot = *yybottom;
1135# define YY_STACK_PRINT(Bottom, Top) \
1138 yy_stack_print ((Bottom), (Top)); \
1153 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %d):\n",
1156 for (yyi = 0; yyi < yynrhs; yyi++)
1161 &
yyvsp[(yyi + 1) - (yynrhs)]);
1166# define YY_REDUCE_PRINT(Rule) \
1169 yy_reduce_print (yyssp, yyvsp, Rule); \
1176# define YYDPRINTF(Args) ((void) 0)
1177# define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1178# define YY_STACK_PRINT(Bottom, Top)
1179# define YY_REDUCE_PRINT(Rule)
1185# define YYINITDEPTH 200
1196# define YYMAXDEPTH 10000
1243 int yyerrstatus = 0;
1272#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1278 YYDPRINTF ((stderr,
"Starting parse\n"));
1306#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1313# if defined yyoverflow
1325 yyoverflow (
YY_(
"memory exhausted"),
1349# undef YYSTACK_RELOCATE
1359 YYDPRINTF ((stderr,
"Stack size increased to %ld\n",
1392 YYDPRINTF ((stderr,
"Reading a token\n"));
1400 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1483#line 1485 "go-exp.c.tmp"
1489#line 1491 "go-exp.c.tmp"
1495#line 1497 "go-exp.c.tmp"
1501#line 1503 "go-exp.c.tmp"
1507#line 1509 "go-exp.c.tmp"
1513#line 1515 "go-exp.c.tmp"
1519#line 1521 "go-exp.c.tmp"
1525#line 1527 "go-exp.c.tmp"
1531#line 1533 "go-exp.c.tmp"
1537#line 1539 "go-exp.c.tmp"
1546#line 1548 "go-exp.c.tmp"
1558#line 1560 "go-exp.c.tmp"
1569#line 1571 "go-exp.c.tmp"
1575#line 1577 "go-exp.c.tmp"
1581#line 1583 "go-exp.c.tmp"
1587 std::vector<operation_up> args
1592#line 1594 "go-exp.c.tmp"
1598#line 1600 "go-exp.c.tmp"
1604#line 1606 "go-exp.c.tmp"
1610#line 1612 "go-exp.c.tmp"
1616#line 1618 "go-exp.c.tmp"
1625#line 1627 "go-exp.c.tmp"
1634#line 1636 "go-exp.c.tmp"
1640#line 1642 "go-exp.c.tmp"
1646#line 1648 "go-exp.c.tmp"
1652#line 1654 "go-exp.c.tmp"
1658#line 1660 "go-exp.c.tmp"
1664#line 1666 "go-exp.c.tmp"
1670#line 1672 "go-exp.c.tmp"
1676#line 1678 "go-exp.c.tmp"
1682#line 1684 "go-exp.c.tmp"
1688#line 1690 "go-exp.c.tmp"
1694#line 1696 "go-exp.c.tmp"
1700#line 1702 "go-exp.c.tmp"
1706#line 1708 "go-exp.c.tmp"
1712#line 1714 "go-exp.c.tmp"
1718#line 1720 "go-exp.c.tmp"
1724#line 1726 "go-exp.c.tmp"
1730#line 1732 "go-exp.c.tmp"
1736#line 1738 "go-exp.c.tmp"
1742#line 1744 "go-exp.c.tmp"
1748#line 1750 "go-exp.c.tmp"
1754#line 1756 "go-exp.c.tmp"
1764 (std::move (first), std::move (mid),
1767#line 1769 "go-exp.c.tmp"
1773#line 1775 "go-exp.c.tmp"
1782 ((
yyvsp[-1].opcode), std::move (lhs), std::move (rhs));
1784#line 1786 "go-exp.c.tmp"
1793#line 1795 "go-exp.c.tmp"
1804#line 1806 "go-exp.c.tmp"
1811 (
yyvsp[0].ssym).stoken.length, 0, &val);
1816#line 1818 "go-exp.c.tmp"
1827#line 1829 "go-exp.c.tmp"
1835#line 1837 "go-exp.c.tmp"
1843 struct type *size_type
1847 (size_type, (LONGEST) (
yyvsp[-1].tval)->
length ());
1849#line 1851 "go-exp.c.tmp"
1858#line 1860 "go-exp.c.tmp"
1870 (
yyval.svec).len = 1;
1871 (
yyval.svec).tokens = vec;
1876 memcpy (vec->
ptr, (
yyvsp[0].tsval).ptr, (
yyvsp[0].tsval).length + 1);
1878#line 1880 "go-exp.c.tmp"
1896 (
yyval.svec).tokens[(
yyval.svec).len - 1].ptr = p;
1898#line 1900 "go-exp.c.tmp"
1908 for (i = 0; i < (
yyvsp[0].svec).len; ++i)
1912#line 1914 "go-exp.c.tmp"
1918#line 1920 "go-exp.c.tmp"
1924#line 1926 "go-exp.c.tmp"
1934 error (_(
"@entry can be used only for function "
1935 "parameters, not for \"%s\""),
1940#line 1942 "go-exp.c.tmp"
1954 else if ((
yyvsp[0].ssym).is_a_field_of_this)
1958 gdb_assert_not_reached (
"go with `this' field");
1967 if (msymbol.
minsym != NULL)
1972 error (_(
"No symbol table is loaded. "
1973 "Use the \"file\" command."));
1975 error (_(
"No symbol \"%s\" in current context."),
1979#line 1981 "go-exp.c.tmp"
1985#line 1987 "go-exp.c.tmp"
1991#line 1993 "go-exp.c.tmp"
1998#line 2000 "go-exp.c.tmp"
2002#line 2004 "go-exp.c.tmp"
2052 if (yyerrstatus == 3)
2209 const char *p,
int len,
int parsed_float,
YYSTYPE *putithere)
2223 int found_suffix = 0;
2232 if (len >= 1 && tolower (p[len - 1]) ==
'f')
2238 else if (len >= 1 && tolower (p[len - 1]) ==
'l')
2241 =
parse_type (par_state)->builtin_long_double;
2259 if (p[0] ==
'0' && len > 1)
2302 if (c >=
'A' && c <=
'Z')
2304 if (c !=
'l' && c !=
'u')
2306 if (c >=
'0' && c <=
'9')
2314 if (base > 10 && c >=
'a' && c <=
'f')
2318 n += i = c -
'a' + 10;
2336 if (c !=
'l' && c !=
'u')
2339 if (n == 0 && prevn == 0)
2341 else if (prevn >= n)
2342 error (_(
"Numeric constant too large."));
2362 bool have_signed = !unsigned_p;
2363 bool have_int = long_p == 0;
2364 bool have_long = long_p <= 1;
2365 if (have_int && have_signed &&
fits_in_type (1, n, int_bits,
true))
2367 else if (have_int &&
fits_in_type (1, n, int_bits,
false))
2369 =
parse_type (par_state)->builtin_unsigned_int;
2370 else if (have_long && have_signed &&
fits_in_type (1, n, long_bits,
true))
2372 else if (have_long &&
fits_in_type (1, n, long_bits,
false))
2374 =
parse_type (par_state)->builtin_unsigned_long;
2375 else if (have_signed &&
fits_in_type (1, n, long_long_bits,
true))
2380 =
parse_type (par_state)->builtin_unsigned_long_long;
2382 error (_(
"Numeric constant too large."));
2417 obstack_free (&
tempbuf, NULL);
2434 else if (c == quote)
2447 if (*tokptr != quote)
2450 error (_(
"Unterminated string in expression."));
2452 error (_(
"Unmatched single quote."));
2495 {
"||",
OROR, OP_NULL},
2496 {
"<<",
LSH, OP_NULL},
2497 {
">>",
RSH, OP_NULL},
2498 {
"==",
EQUAL, OP_NULL},
2500 {
"<=",
LEQ, OP_NULL},
2501 {
">=",
GEQ, OP_NULL},
2543 const char *tokstart;
2552 tokstart = par_state->
lexptr;
2555 if (strncmp (tokstart,
token.
oper, 3) == 0)
2564 if (strncmp (tokstart,
token.
oper, 2) == 0)
2573 switch (c = *tokstart)
2581 else if (saw_structop)
2615 if (par_state->
lexptr[1] <
'0' || par_state->
lexptr[1] >
'9')
2635 int got_dot = 0, got_e = 0, toktype;
2636 const char *p = tokstart;
2639 if (c ==
'0' && (p[1] ==
'x' || p[1] ==
'X'))
2650 if (!hex && !got_e && (*p ==
'e' || *p ==
'E'))
2651 got_dot = got_e = 1;
2654 else if (!got_dot && *p ==
'.')
2656 else if (got_e && (p[-1] ==
'e' || p[-1] ==
'E')
2657 && (*p ==
'-' || *p ==
'+'))
2663 else if ((*p <
'0' || *p >
'9')
2664 && ((*p <
'a' || *p >
'z')
2665 && (*p <
'A' || *p >
'Z')))
2668 toktype =
parse_number (par_state, tokstart, p - tokstart,
2670 if (toktype ==
ERROR)
2672 char *err_copy = (
char *) alloca (p - tokstart + 1);
2674 memcpy (err_copy, tokstart, p - tokstart);
2675 err_copy[p - tokstart] = 0;
2676 error (_(
"Invalid number \"%s\"."), err_copy);
2684 const char *p = &tokstart[1];
2685 size_t len = strlen (
"entry");
2687 while (isspace (*p))
2689 if (strncmp (p,
"entry", len) == 0 && !isalnum (p[len])
2692 par_state->
lexptr = &p[len];
2728 error (_(
"Empty character constant."));
2729 else if (host_len > 2 && c ==
'\'')
2732 namelen = par_state->
lexptr - tokstart - 1;
2735 else if (host_len > 1)
2736 error (_(
"Invalid character constant."));
2742 if (!(c ==
'_' || c ==
'$'
2743 || (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z')))
2745 error (_(
"Invalid character '%c' in expression."), c);
2749 for (c = tokstart[namelen];
2750 (c ==
'_' || c ==
'$' || (c >=
'0' && c <=
'9')
2751 || (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z'));)
2753 c = tokstart[++namelen];
2760 && tokstart[0] ==
'i'
2761 && tokstart[1] ==
'f')
2774 && strncmp (tokstart,
"thread", namelen) == 0
2775 && (tokstart[namelen] ==
' ' || tokstart[namelen] ==
'\t'))
2777 const char *p = tokstart + namelen + 1;
2779 while (*p ==
' ' || *p ==
'\t')
2781 if (*p >=
'0' && *p <=
'9')
2785 par_state->
lexptr += namelen;
2803 if (*tokstart ==
'$')
2835 const char *
name,
int name_len)
2864 && sym->
type ()->
code () == TYPE_CODE_MODULE)
2877 std::string copy =
copy_name (function_name);
2879 if (copy ==
"Sizeof")
2885 error (_(
"Unknown function in `unsafe' package: %s"), copy.c_str ());
2962 if (current_package_name != NULL)
2966 strlen (current_package_name),
2967 copy.c_str (), copy.size ());
2969 xfree (current_package_name);
2971 &is_a_field_of_this);
2985 if ((copy[0] >=
'a' && copy[0] <
'a' +
input_radix - 10)
2986 || (copy[0] >=
'A' && copy[0] <
'A' +
input_radix - 10))
3031 return current.
token;
3039 if (next.
token ==
'.')
3051 if (copy ==
"unsafe")
3087 scoped_restore pstate_restore = make_scoped_restore (&
pstate);
3088 gdb_assert (par_state != NULL);
3091 scoped_restore restore_yydebug = make_scoped_restore (&
yydebug,
3115 error (_(
"A %s in expression, near `%s'."), msg,
pstate->
lexptr);
static struct parser_state * pstate
static auto_obstack name_obstack
int c_parse_escape(const char **ptr, struct obstack *output)
static bool last_was_structop
static int saw_name_at_eof
static std::vector< token_and_value > token_fifo
int parser(struct parser_state *ps) const override
void update(const struct block *b, innermost_block_tracker_types t)
int symbol_read_needs_frame(struct symbol *sym)
int gdbarch_long_long_bit(struct gdbarch *gdbarch)
int gdbarch_int_bit(struct gdbarch *gdbarch)
int gdbarch_long_bit(struct gdbarch *gdbarch)
struct type * lookup_pointer_type(struct type *type)
struct type * check_typedef(struct type *type)
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
static const yytype_int8 yytranslate[]
@ YYSYMBOL_name_not_typename
@ YYSYMBOL_INTERFACE_KEYWORD
@ YYSYMBOL_STRUCT_KEYWORD
@ YYSYMBOL_SIZEOF_KEYWORD
@ YYSYMBOL_DOLLAR_VARIABLE
static void yy_symbol_print(FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const *const yyvaluep)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static const yytype_int8 yydefact[]
#define YY_IGNORE_USELESS_CAST_END
static int classify_packaged_name(const struct block *block)
#define INTERFACE_KEYWORD
static int classify_name(struct parser_state *par_state, const struct block *block)
static const yytype_int16 yyrline[]
static const yytype_int8 yycheck[]
#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 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 const yytype_int8 yytable[]
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 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
static struct stoken build_packaged_name(const char *package, int package_len, const char *name, int name_len)
static const yytype_int8 yydefgoto[]
static int classify_unsafe_function(struct stoken function_name)
static int package_name_p(const char *name, const struct block *block)
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
#define yypact_value_is_default(Yyn)
static int last_was_structop
static void yy_stack_print(yy_state_t *yybottom, yy_state_t *yytop)
char * go_block_package_name(const struct block *block)
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)
bool fits_in_type(int n_sign, ULONGEST n, int type_bits, bool type_signed_p)
std::string copy_name(struct stoken token)
const struct block * block
struct minimal_symbol * minsym
struct type * builtin_float64
struct type * builtin_float32
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)
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
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 internalvar * ivar
struct stoken_vector svec
struct typed_stoken tsval