47 #define YYBISON_VERSION "3.0.2"
50 #define YYSKELETON_NAME "yacc.c"
65 #line 30 "cp-name-parser.y"
71 #include "safe-ctype.h"
89 #define ALLOC_CHUNK 100
91 struct demangle_info {
93 struct demangle_info *
next;
99 static struct demangle_component *
102 struct demangle_info *more;
106 if (demangle_info->
next == NULL)
108 more =
xmalloc (
sizeof (
struct demangle_info));
110 demangle_info->
next = more;
113 more = demangle_info->
next;
116 demangle_info = more;
118 return &demangle_info->
comps[demangle_info->
used++];
129 static struct demangle_component *
d_qualify (
struct demangle_component *,
int,
132 static struct demangle_component *
d_int_type (
int);
134 static struct demangle_component *
d_unary (
const char *,
135 struct demangle_component *);
136 static struct demangle_component *
d_binary (
const char *,
137 struct demangle_component *,
138 struct demangle_component *);
143 #define QUAL_RESTRICT 2
144 #define QUAL_VOLATILE 4
148 #define INT_CHAR (1 << 0)
149 #define INT_SHORT (1 << 1)
150 #define INT_LONG (1 << 2)
151 #define INT_LLONG (1 << 3)
153 #define INT_SIGNED (1 << 4)
154 #define INT_UNSIGNED (1 << 5)
163 #define yymaxdepth cpname_maxdepth
164 #define yyparse cpname_parse
165 #define yylex cpname_lex
166 #define yyerror cpname_error
167 #define yylval cpname_lval
168 #define yychar cpname_char
169 #define yydebug cpname_debug
170 #define yypact cpname_pact
171 #define yyr1 cpname_r1
172 #define yyr2 cpname_r2
173 #define yydef cpname_def
174 #define yychk cpname_chk
175 #define yypgo cpname_pgo
176 #define yyact cpname_act
177 #define yyexca cpname_exca
178 #define yyerrflag cpname_errflag
179 #define yynerrs cpname_nerrs
180 #define yyps cpname_ps
181 #define yypv cpname_pv
183 #define yy_yys cpname_yys
184 #define yystate cpname_state
185 #define yytmp cpname_tmp
187 #define yy_yyv cpname_yyv
188 #define yyval cpname_val
189 #define yylloc cpname_lloc
190 #define yyreds cpname_reds
191 #define yytoks cpname_toks
192 #define yyname cpname_name
193 #define yyrule cpname_rule
194 #define yylhs cpname_yylhs
195 #define yylen cpname_yylen
196 #define yydefred cpname_yydefred
197 #define yydgoto cpname_yydgoto
198 #define yysindex cpname_yysindex
199 #define yyrindex cpname_yyrindex
200 #define yygindex cpname_yygindex
201 #define yytable cpname_yytable
202 #define yycheck cpname_yycheck
203 #define yyss cpname_yyss
204 #define yysslim cpname_yysslim
205 #define yyssp cpname_yyssp
206 #define yystacksize cpname_yystacksize
207 #define yyvs cpname_yyvs
208 #define yyvsp cpname_yyvsp
211 static int yylex (
void);
222 static struct demangle_component *
223 fill_comp (
enum demangle_component_type d_type,
struct demangle_component *lhs,
224 struct demangle_component *rhs)
226 struct demangle_component *ret =
d_grab ();
229 i = cplus_demangle_fill_component (ret, d_type, lhs, rhs);
235 static struct demangle_component *
238 struct demangle_component *ret =
d_grab ();
243 static struct demangle_component *
246 struct demangle_component *ret =
d_grab ();
249 i = cplus_demangle_fill_operator (ret, name, args);
255 static struct demangle_component *
258 struct demangle_component *ret =
d_grab ();
261 i = cplus_demangle_fill_dtor (ret, kind, name);
267 static struct demangle_component *
270 struct demangle_component *ret =
d_grab ();
273 i = cplus_demangle_fill_builtin_type (ret, name);
279 static struct demangle_component *
282 struct demangle_component *ret =
d_grab ();
285 i = cplus_demangle_fill_name (ret, name, len);
291 #define d_left(dc) (dc)->u.s_binary.left
292 #define d_right(dc) (dc)->u.s_binary.right
295 #line 296 "cp-name-parser.c"
298 # if defined __cplusplus && 201103L <= __cplusplus
299 # define YY_NULLPTR nullptr
301 # define YY_NULLPTR 0
306 #ifdef YYERROR_VERBOSE
307 # undef YYERROR_VERBOSE
308 # define YYERROR_VERBOSE 1
310 # define YYERROR_VERBOSE 0
389 #define COLONCOLON 267
395 #define STATIC_CAST 273
396 #define REINTERPRET_CAST 274
397 #define DYNAMIC_CAST 275
398 #define SIGNED_KEYWORD 276
401 #define INT_KEYWORD 279
402 #define CONST_KEYWORD 280
403 #define VOLATILE_KEYWORD 281
404 #define DOUBLE_KEYWORD 282
409 #define FLOAT_KEYWORD 287
412 #define ASSIGN_MODIFY 290
413 #define TRUEKEYWORD 291
414 #define FALSEKEYWORD 292
415 #define DEMANGLER_SPECIAL 293
416 #define CONSTRUCTION_VTABLE 294
417 #define CONSTRUCTION_IN 295
427 #define INCREMENT 305
428 #define DECREMENT 306
432 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
436 #line 261 "cp-name-parser.y"
438 struct demangle_component *
comp;
440 struct demangle_component *
comp;
441 struct demangle_component **
last;
456 #line 457 "cp-name-parser.c"
458 # define YYSTYPE_IS_TRIVIAL 1
459 # define YYSTYPE_IS_DECLARED 1
471 #line 472 "cp-name-parser.c"
502 # ifdef __SIZE_TYPE__
503 # define YYSIZE_T __SIZE_TYPE__
504 # elif defined size_t
505 # define YYSIZE_T size_t
506 # elif ! defined YYSIZE_T
508 # define YYSIZE_T size_t
510 # define YYSIZE_T unsigned int
514 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
517 # if defined YYENABLE_NLS && YYENABLE_NLS
519 # include <libintl.h>
520 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
524 # define YY_(Msgid) Msgid
529 # if (defined __GNUC__ \
530 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
531 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
532 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
534 # define YY_ATTRIBUTE(Spec)
538 #ifndef YY_ATTRIBUTE_PURE
539 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
542 #ifndef YY_ATTRIBUTE_UNUSED
543 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
546 #if !defined _Noreturn \
547 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
548 # if defined _MSC_VER && 1200 <= _MSC_VER
549 # define _Noreturn __declspec (noreturn)
551 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
556 #if ! defined lint || defined __GNUC__
557 # define YYUSE(E) ((void) (E))
562 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
564 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
565 _Pragma ("GCC diagnostic push") \
566 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
567 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
568 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
569 _Pragma ("GCC diagnostic pop")
571 # define YY_INITIAL_VALUE(Value) Value
573 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
574 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
575 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
577 #ifndef YY_INITIAL_VALUE
578 # define YY_INITIAL_VALUE(Value)
582 #if ! defined yyoverflow || YYERROR_VERBOSE
586 # ifdef YYSTACK_USE_ALLOCA
587 # if YYSTACK_USE_ALLOCA
589 # define YYSTACK_ALLOC __builtin_alloca
590 # elif defined __BUILTIN_VA_ARG_INCR
593 # define YYSTACK_ALLOC __alloca
594 # elif defined _MSC_VER
595 # define alloca _alloca
597 # define YYSTACK_ALLOC alloca
598 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
601 # ifndef EXIT_SUCCESS
602 # define EXIT_SUCCESS 0
609 # ifdef YYSTACK_ALLOC
611 # define YYSTACK_FREE(Ptr) do { ; } while (0)
612 # ifndef YYSTACK_ALLOC_MAXIMUM
617 # define YYSTACK_ALLOC_MAXIMUM 4032
620 # define YYSTACK_ALLOC YYMALLOC
621 # define YYSTACK_FREE YYFREE
622 # ifndef YYSTACK_ALLOC_MAXIMUM
623 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
625 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
626 && ! ((defined YYMALLOC || defined xmalloc) \
627 && (defined YYFREE || defined xfree)))
629 # ifndef EXIT_SUCCESS
630 # define EXIT_SUCCESS 0
634 # define YYMALLOC xmalloc
635 # if ! defined xmalloc && ! defined EXIT_SUCCESS
640 # define YYFREE xfree
641 # if ! defined xfree && ! defined EXIT_SUCCESS
649 #if (! defined yyoverflow \
650 && (! defined __cplusplus \
651 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
661 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
665 # define YYSTACK_BYTES(N) \
666 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
667 + YYSTACK_GAP_MAXIMUM)
669 # define YYCOPY_NEEDED 1
676 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
679 YYSIZE_T yynewbytes; \
680 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
681 Stack = &yyptr->Stack_alloc; \
682 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
683 yyptr += yynewbytes / sizeof (*yyptr); \
689 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
693 # if defined __GNUC__ && 1 < __GNUC__
694 # define YYCOPY(Dst, Src, Count) \
695 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
697 # define YYCOPY(Dst, Src, Count) \
701 for (yyi = 0; yyi < (Count); yyi++) \
702 (Dst)[yyi] = (Src)[yyi]; \
721 #define YYNSTATES 324
726 #define YYMAXUTOK 307
728 #define YYTRANSLATE(YYX) \
729 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
735 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
736 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
737 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
738 2, 2, 2, 72, 2, 2, 2, 63, 49, 2,
739 73, 41, 61, 59, 42, 60, 68, 62, 2, 2,
740 2, 2, 2, 2, 2, 2, 2, 2, 74, 2,
741 52, 43, 53, 44, 58, 2, 2, 2, 2, 2,
742 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
743 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
744 2, 69, 2, 70, 48, 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, 47, 2, 71, 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, 2, 2, 2, 2,
756 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
757 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
758 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
759 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
760 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
761 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
762 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
763 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
764 35, 36, 37, 38, 39, 40, 45, 46, 50, 51,
765 54, 55, 56, 57, 64, 65, 66, 67
770 static const yytype_uint16
yyrline[] =
772 0, 375, 375, 379, 381, 383, 388, 389, 396, 405,
773 408, 412, 415, 434, 438, 442, 448, 454, 460, 466,
774 468, 470, 472, 474, 476, 478, 480, 482, 484, 486,
775 488, 490, 492, 494, 496, 498, 500, 502, 504, 506,
776 508, 510, 512, 514, 516, 518, 520, 522, 530, 535,
777 540, 544, 549, 557, 558, 560, 572, 573, 579, 581,
778 582, 584, 587, 588, 591, 592, 596, 598, 601, 607,
779 614, 620, 631, 635, 638, 649, 650, 654, 656, 658,
780 661, 665, 670, 675, 681, 691, 695, 699, 707, 708,
781 711, 713, 715, 719, 720, 727, 729, 731, 733, 735,
782 737, 741, 742, 746, 748, 750, 752, 754, 756, 758,
783 762, 768, 772, 780, 790, 794, 810, 812, 813, 815,
784 818, 820, 821, 823, 826, 828, 830, 832, 837, 840,
785 845, 852, 856, 867, 873, 891, 894, 902, 904, 915,
786 922, 923, 929, 933, 937, 939, 944, 949, 962, 966,
787 971, 979, 984, 993, 997, 1002, 1007, 1011, 1017, 1023,
788 1026, 1033, 1035, 1040, 1044, 1048, 1055, 1071, 1078, 1085,
789 1104, 1108, 1112, 1116, 1120, 1124, 1128, 1132, 1136, 1140,
790 1144, 1148, 1152, 1156, 1160, 1164, 1168, 1173, 1177, 1181,
791 1188, 1192, 1195, 1204, 1213
795 #if YYDEBUG || YYERROR_VERBOSE || 0
798 static const char *
const yytname[] =
800 "$end",
"error",
"$undefined",
"INT",
"FLOAT",
"NAME",
"STRUCT",
801 "CLASS",
"UNION",
"ENUM",
"SIZEOF",
"UNSIGNED",
"COLONCOLON",
"TEMPLATE",
802 "ERROR",
"NEW",
"DELETE",
"OPERATOR",
"STATIC_CAST",
"REINTERPRET_CAST",
803 "DYNAMIC_CAST",
"SIGNED_KEYWORD",
"LONG",
"SHORT",
"INT_KEYWORD",
804 "CONST_KEYWORD",
"VOLATILE_KEYWORD",
"DOUBLE_KEYWORD",
"BOOL",
805 "ELLIPSIS",
"RESTRICT",
"VOID",
"FLOAT_KEYWORD",
"CHAR",
"WCHAR_T",
806 "ASSIGN_MODIFY",
"TRUEKEYWORD",
"FALSEKEYWORD",
"DEMANGLER_SPECIAL",
807 "CONSTRUCTION_VTABLE",
"CONSTRUCTION_IN",
"')'",
"','",
"'='",
"'?'",
808 "OROR",
"ANDAND",
"'|'",
"'^'",
"'&'",
"EQUAL",
"NOTEQUAL",
"'<'",
"'>'",
809 "LEQ",
"GEQ",
"LSH",
"RSH",
"'@'",
"'+'",
"'-'",
"'*'",
"'/'",
"'%'",
810 "UNARY",
"INCREMENT",
"DECREMENT",
"ARROW",
"'.'",
"'['",
"']'",
"'~'",
811 "'!'",
"'('",
"':'",
"$accept",
"result",
"start",
"start_opt",
812 "function",
"demangler_special",
"oper",
"conversion_op",
813 "conversion_op_name",
"unqualified_name",
"colon_name",
"name",
814 "colon_ext_name",
"colon_ext_only",
"ext_only_name",
"nested_name",
815 "templ",
"template_params",
"template_arg",
"function_args",
816 "function_arglist",
"qualifiers_opt",
"qualifier",
"qualifiers",
817 "int_part",
"int_seq",
"builtin_type",
"ptr_operator",
"array_indicator",
818 "typespec_2",
"abstract_declarator",
"direct_abstract_declarator",
819 "abstract_declarator_fn",
"type",
"declarator",
"direct_declarator",
820 "declarator_1",
"direct_declarator_1",
"exp",
"exp1",
YY_NULLPTR
827 static const yytype_uint16
yytoknum[] =
829 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
830 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
831 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
832 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
833 295, 41, 44, 61, 63, 296, 297, 124, 94, 38,
834 298, 299, 60, 62, 300, 301, 302, 303, 64, 43,
835 45, 42, 47, 37, 304, 305, 306, 307, 46, 91,
840 #define YYPACT_NINF -203
842 #define yypact_value_is_default(Yystate) \
843 (!!((Yystate) == (-203)))
845 #define YYTABLE_NINF -1
847 #define yytable_value_is_error(Yytable_value) \
854 769, 18, -203, 15, 545, -203, -16, -203, -203, -203,
855 -203, -203, -203, -203, -203, -203, -203, -203, 769, 769,
856 23, 35, -203, -203, -203, -7, -203, 5, -203, 121,
857 -25, -203, 45, 49, 121, 883, -203, 119, 121, 295,
858 -203, -203, 390, -203, 121, -203, 45, 66, 14, 26,
859 -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
860 -203, -203, -203, -203, -203, -203, -203, -203, -203, -203,
861 -203, -203, -203, 43, 50, -203, -203, 86, 130, -203,
862 -203, -203, 96, -203, -203, 390, 18, 769, -203, 121,
863 6, 608, -203, 8, 49, 133, 52, -203, 38, -203,
864 -203, 512, 133, 28, -203, -203, 147, -203, -203, 66,
865 121, 121, -203, -203, -203, 48, 796, 608, -203, -203,
866 38, -203, 51, 133, 311, -203, 38, -203, 38, -203,
867 -203, 75, 114, 122, 127, -203, -203, 661, 266, 266,
868 266, 454, 10, -203, 285, 899, -203, -203, 110, 111,
869 -203, -203, -203, 769, 57, -203, 67, -203, -203, 113,
870 -203, 66, 143, 121, 285, 21, 17, 285, 285, 144,
871 28, 121, 147, 769, -203, 183, -203, 178, -203, -203,
872 -203, -203, 121, -203, -203, -203, 68, 716, 181, -203,
873 -203, 285, -203, -203, -203, 182, -203, 859, 859, 859,
874 859, 769, -203, 103, 103, 103, 685, 285, 159, 874,
875 161, 390, -203, -203, 266, 266, 266, 266, 266, 266,
876 266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
877 266, 266, 228, 229, -203, -203, -203, -203, 121, -203,
878 32, 121, -203, 121, 793, -203, -203, -203, 37, 769,
879 -203, 716, -203, 716, 196, 38, 769, 769, 199, 189,
880 192, 194, 200, 769, -203, 266, 266, -203, -203, 692,
881 922, 944, 965, 985, 1004, 591, 591, 374, 374, 374,
882 438, 438, 136, 136, 103, 103, 103, -203, -203, -203,
883 -203, -203, -203, 285, -203, 214, -203, -203, -203, -203,
884 -203, -203, -203, 185, 191, 193, -203, 220, 103, 899,
885 266, -203, -203, 492, 492, 492, -203, 899, 221, 224,
886 226, -203, -203, -203
894 0, 59, 97, 0, 0, 96, 99, 100, 95, 92,
895 91, 105, 107, 90, 109, 104, 98, 108, 0, 0,
896 0, 0, 2, 5, 4, 53, 50, 6, 67, 121,
897 0, 64, 0, 61, 93, 0, 101, 103, 117, 140,
898 3, 68, 0, 52, 125, 65, 0, 0, 15, 16,
899 32, 43, 29, 40, 39, 26, 24, 25, 35, 36,
900 30, 31, 37, 38, 33, 34, 19, 20, 21, 22,
901 23, 41, 42, 45, 0, 27, 28, 0, 0, 48,
902 106, 13, 0, 55, 1, 0, 0, 0, 111, 88,
903 0, 0, 11, 0, 0, 6, 135, 134, 137, 12,
904 120, 0, 6, 58, 49, 66, 60, 70, 94, 0,
905 123, 119, 99, 102, 116, 0, 0, 0, 62, 56,
906 149, 63, 0, 6, 128, 141, 130, 8, 150, 190,
907 191, 0, 0, 0, 0, 193, 194, 0, 0, 0,
908 0, 0, 0, 73, 75, 79, 124, 51, 0, 0,
909 44, 47, 46, 0, 0, 7, 0, 110, 89, 0,
910 114, 0, 109, 88, 0, 0, 0, 128, 80, 0,
911 0, 88, 0, 0, 139, 0, 136, 132, 133, 10,
912 69, 71, 127, 122, 118, 57, 0, 128, 156, 157,
913 9, 0, 129, 148, 132, 154, 155, 0, 0, 0,
914 0, 0, 77, 163, 165, 164, 0, 140, 0, 159,
915 0, 0, 72, 76, 0, 0, 0, 0, 0, 0,
916 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
917 0, 0, 0, 0, 17, 18, 14, 54, 88, 115,
918 0, 88, 87, 88, 0, 81, 131, 112, 0, 0,
919 126, 0, 147, 128, 0, 143, 0, 0, 0, 0,
920 0, 0, 0, 0, 161, 0, 0, 158, 74, 0,
921 186, 185, 184, 183, 182, 177, 178, 181, 179, 180,
922 175, 176, 173, 174, 170, 171, 172, 187, 188, 113,
923 86, 85, 84, 82, 138, 0, 142, 153, 145, 146,
924 151, 152, 192, 0, 0, 0, 78, 0, 166, 160,
925 0, 83, 144, 0, 0, 0, 162, 189, 0, 0,
932 -203, -203, 25, -35, -203, -203, -203, 1, -203, 9,
933 -203, -1, -34, -24, 3, 0, 150, 186, 69, -203,
934 -23, -149, -203, 210, 231, -203, 242, -15, -97, 188,
935 -18, -19, 187, 151, -202, -203, 154, -203, -6, -159
941 -1, 21, 155, 92, 23, 24, 25, 26, 27, 28,
942 118, 29, 252, 30, 31, 78, 33, 142, 143, 166,
943 95, 157, 34, 35, 36, 37, 38, 167, 97, 39,
944 169, 126, 99, 40, 254, 255, 127, 128, 209, 210
952 32, 178, 44, 46, 43, 120, 45, 102, 98, 159,
953 86, 80, 96, 170, 242, 121, 123, 87, 32, 32,
954 1, 125, 247, 189, 124, 22, 103, 93, 83, 178,
955 41, 196, 4, 104, 110, 84, 145, 103, 119, 122,
956 180, 105, 170, 81, 82, 85, 44, 147, 101, 295,
957 103, 296, 211, 1, 88, 105, 103, 86, 243, 244,
958 174, 107, 4, 212, 175, 116, 89, 179, 116, 171,
959 42, 1, 103, 103, 90, 177, 160, 98, 91, 145,
960 42, 96, 171, 148, 4, 116, 20, 156, 190, 289,
961 120, 165, 290, 238, 291, 149, 93, 188, 238, 211,
962 121, 88, 187, 194, 150, 195, 192, 90, 182, 124,
963 237, 101, 171, 89, 185, 186, 20, 165, 45, 20,
964 151, 90, 20, 119, 122, 91, 213, 152, 238, 238,
965 2, 105, 203, 204, 205, 103, 153, 32, 20, 20,
966 5, 112, 7, 8, 93, 173, 9, 10, 197, 192,
967 245, 13, 16, 32, 318, 319, 320, 104, 299, 181,
968 44, 240, 202, 121, 93, 105, 198, 93, 93, 192,
969 232, 233, 253, 32, 199, 248, 187, 94, 236, 200,
970 234, 235, 106, 239, 241, 246, 119, 122, 86, 125,
971 249, 93, 79, 256, 257, 105, 106, 229, 230, 231,
972 265, 32, 267, 232, 233, 145, 32, 93, 269, 270,
973 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
974 281, 282, 283, 284, 285, 286, 262, 121, 106, 121,
975 144, 264, 298, 287, 288, 192, 253, 297, 253, 100,
976 302, 306, 303, 172, 108, 304, 94, 305, 114, 32,
977 119, 122, 119, 122, 146, 312, 32, 32, 313, 308,
978 309, 316, 321, 32, 314, 322, 315, 323, 113, 129,
979 130, 154, 106, 144, 294, 311, 131, 111, 193, 168,
980 268, 300, 301, 176, 132, 133, 134, 0, 307, 168,
981 86, 0, 208, 93, 94, 0, 0, 175, 0, 158,
982 1, 0, 135, 136, 317, 168, 106, 115, 0, 0,
983 0, 0, 116, 0, 94, 106, 1, 94, 94, 0,
984 183, 184, 0, 115, 0, 94, 138, 0, 116, 207,
985 0, 0, 0, 0, 88, 0, 106, 139, 140, 141,
986 0, 94, 0, 0, 88, 0, 89, 0, 258, 259,
987 260, 261, 0, 0, 90, 0, 89, 94, 164, 0,
988 88, 0, 0, 0, 90, 0, 20, 0, 117, 0,
989 0, 0, 89, 158, 0, 0, 0, 0, 0, 0,
990 90, 158, 20, 0, 191, 207, 207, 207, 207, 0,
991 106, 0, 250, 129, 130, 1, 0, 0, 172, 144,
992 131, 2, 47, 0, 0, 0, 0, 0, 132, 133,
993 134, 5, 6, 7, 8, 9, 10, 11, 12, 0,
994 13, 14, 15, 16, 17, 0, 135, 136, 0, 0,
995 225, 226, 293, 227, 228, 229, 230, 231, 0, 137,
996 0, 232, 233, 94, 0, 0, 0, 0, 158, 0,
997 138, 158, 0, 158, 0, 0, 0, 129, 130, 1,
998 0, 139, 140, 141, 131, 2, 47, 0, 0, 0,
999 0, 0, 132, 133, 134, 5, 6, 7, 8, 9,
1000 10, 11, 12, 0, 13, 14, 15, 16, 17, 0,
1001 135, 136, 0, 0, 0, 129, 130, 227, 228, 229,
1002 230, 231, 131, 206, 0, 232, 233, 0, 0, 0,
1003 132, 133, 134, 0, 138, 0, 0, 1, 0, 0,
1004 0, 0, 0, 2, 47, 139, 140, 141, 135, 136,
1005 0, 0, 0, 5, 6, 7, 8, 9, 10, 11,
1006 12, 206, 13, 162, 15, 16, 17, 0, 0, 0,
1007 1, 0, 138, 163, 0, 0, 2, 47, 0, 0,
1008 48, 49, 0, 139, 140, 141, 5, 6, 7, 8,
1009 9, 10, 11, 12, 0, 13, 14, 15, 16, 17,
1010 50, 0, 0, 0, 0, 0, 0, 51, 52, 0,
1011 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
1012 63, 64, 65, 0, 66, 67, 68, 69, 70, 0,
1013 71, 72, 73, 1, 74, 0, 75, 76, 77, 2,
1014 161, 0, 0, 0, 0, 0, 0, 0, 0, 5,
1015 6, 7, 8, 9, 10, 11, 12, 0, 13, 162,
1016 15, 16, 17, 222, 0, 223, 224, 225, 226, 163,
1017 227, 228, 229, 230, 231, 0, 0, 88, 232, 233,
1018 0, 0, 0, 0, 0, 0, 1, 0, 0, 89,
1019 0, 0, 2, 3, 0, 0, 0, 90, 4, 0,
1020 0, 164, 5, 6, 7, 8, 9, 10, 11, 12,
1021 1, 13, 14, 15, 16, 17, 2, 3, 0, 18,
1022 19, 0, 4, 0, 0, 0, 5, 6, 7, 8,
1023 9, 10, 11, 12, 0, 13, 14, 15, 16, 17,
1024 0, 1, 0, 18, 19, 0, 0, 0, 115, 0,
1025 0, 0, 20, 116, 201, 0, 214, 215, 216, 217,
1026 218, 219, 220, 221, 222, 0, 223, 224, 225, 226,
1027 0, 227, 228, 229, 230, 231, 20, 0, 263, 232,
1028 233, 0, 0, 0, 0, 88, 310, 0, 0, 0,
1029 0, 0, 0, 0, 1, 0, 0, 89, 0, 0,
1030 2, 3, 0, 0, 0, 90, 4, 20, 0, 251,
1031 5, 6, 7, 8, 9, 10, 11, 12, 1, 13,
1032 14, 15, 16, 17, 2, 47, 0, 18, 19, 0,
1033 0, 48, 49, 0, 5, 6, 7, 8, 9, 10,
1034 11, 12, 292, 13, 14, 15, 16, 17, 0, 0,
1035 0, 50, 0, 0, 0, 0, 0, 0, 51, 52,
1036 20, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1037 62, 63, 64, 65, 0, 66, 67, 68, 69, 70,
1038 0, 71, 72, 73, 1, 74, 0, 75, 76, 77,
1039 2, 47, 0, 0, 0, 0, 0, 0, 0, 0,
1040 5, 6, 7, 8, 9, 10, 11, 12, 1, 13,
1041 14, 15, 16, 17, 2, 109, 0, 0, 0, 0,
1042 0, 0, 0, 0, 5, 6, 7, 8, 0, 0,
1043 11, 12, 0, 0, 14, 15, 16, 17, 214, 215,
1044 216, 217, 218, 219, 220, 221, 222, 266, 223, 224,
1045 225, 226, 0, 227, 228, 229, 230, 231, 0, 0,
1046 0, 232, 233, 214, 215, 216, 217, 218, 219, 220,
1047 221, 222, 0, 223, 224, 225, 226, 0, 227, 228,
1048 229, 230, 231, 0, 0, 0, 232, 233, 216, 217,
1049 218, 219, 220, 221, 222, 0, 223, 224, 225, 226,
1050 0, 227, 228, 229, 230, 231, 0, 0, 0, 232,
1051 233, 217, 218, 219, 220, 221, 222, 0, 223, 224,
1052 225, 226, 0, 227, 228, 229, 230, 231, 0, 0,
1053 0, 232, 233, 218, 219, 220, 221, 222, 0, 223,
1054 224, 225, 226, 0, 227, 228, 229, 230, 231, 0,
1055 0, 0, 232, 233, 219, 220, 221, 222, 0, 223,
1056 224, 225, 226, 0, 227, 228, 229, 230, 231, 0,
1057 0, 0, 232, 233, 220, 221, 222, 0, 223, 224,
1058 225, 226, 0, 227, 228, 229, 230, 231, 0, 0,
1064 0, 98, 3, 3, 3, 39, 3, 30, 27, 3,
1065 5, 27, 27, 5, 163, 39, 39, 12, 18, 19,
1066 5, 39, 171, 120, 39, 0, 5, 27, 5, 126,
1067 12, 128, 17, 32, 35, 0, 42, 5, 39, 39,
1068 12, 32, 5, 18, 19, 52, 47, 46, 73, 251,
1069 5, 253, 42, 5, 49, 46, 5, 5, 41, 42,
1070 95, 12, 17, 53, 12, 17, 61, 102, 17, 61,
1071 52, 5, 5, 5, 69, 98, 70, 96, 73, 85,
1072 52, 96, 61, 69, 17, 17, 71, 87, 123, 238,
1073 124, 91, 241, 61, 243, 69, 96, 120, 61, 42,
1074 124, 49, 117, 126, 61, 128, 124, 69, 109, 124,
1075 53, 73, 61, 61, 115, 115, 71, 117, 115, 71,
1076 70, 69, 71, 124, 124, 73, 144, 41, 61, 61,
1077 11, 122, 138, 139, 140, 5, 40, 137, 71, 71,
1078 21, 22, 23, 24, 144, 12, 25, 26, 73, 167,
1079 168, 30, 33, 153, 313, 314, 315, 156, 255, 12,
1080 161, 161, 137, 187, 164, 156, 52, 167, 168, 187,
1081 67, 68, 187, 173, 52, 175, 191, 27, 153, 52,
1082 70, 70, 32, 70, 41, 41, 187, 187, 5, 207,
1083 12, 191, 4, 12, 12, 186, 46, 61, 62, 63,
1084 41, 201, 41, 67, 68, 211, 206, 207, 214, 215,
1085 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
1086 226, 227, 228, 229, 230, 231, 201, 251, 78, 253,
1087 42, 206, 255, 5, 5, 253, 251, 41, 253, 29,
1088 41, 41, 53, 93, 34, 53, 96, 53, 38, 249,
1089 251, 251, 253, 253, 44, 41, 256, 257, 73, 265,
1090 266, 41, 41, 263, 73, 41, 73, 41, 37, 3,
1091 4, 85, 122, 85, 249, 293, 10, 35, 124, 91,
1092 211, 256, 257, 96, 18, 19, 20, -1, 263, 101,
1093 5, -1, 141, 293, 144, -1, -1, 12, -1, 89,
1094 5, -1, 36, 37, 310, 117, 156, 12, -1, -1,
1095 -1, -1, 17, -1, 164, 165, 5, 167, 168, -1,
1096 110, 111, -1, 12, -1, 175, 60, -1, 17, 141,
1097 -1, -1, -1, -1, 49, -1, 186, 71, 72, 73,
1098 -1, 191, -1, -1, 49, -1, 61, -1, 197, 198,
1099 199, 200, -1, -1, 69, -1, 61, 207, 73, -1,
1100 49, -1, -1, -1, 69, -1, 71, -1, 73, -1,
1101 -1, -1, 61, 163, -1, -1, -1, -1, -1, -1,
1102 69, 171, 71, -1, 73, 197, 198, 199, 200, -1,
1103 240, -1, 182, 3, 4, 5, -1, -1, 248, 211,
1104 10, 11, 12, -1, -1, -1, -1, -1, 18, 19,
1105 20, 21, 22, 23, 24, 25, 26, 27, 28, -1,
1106 30, 31, 32, 33, 34, -1, 36, 37, -1, -1,
1107 56, 57, 244, 59, 60, 61, 62, 63, -1, 49,
1108 -1, 67, 68, 293, -1, -1, -1, -1, 238, -1,
1109 60, 241, -1, 243, -1, -1, -1, 3, 4, 5,
1110 -1, 71, 72, 73, 10, 11, 12, -1, -1, -1,
1111 -1, -1, 18, 19, 20, 21, 22, 23, 24, 25,
1112 26, 27, 28, -1, 30, 31, 32, 33, 34, -1,
1113 36, 37, -1, -1, -1, 3, 4, 59, 60, 61,
1114 62, 63, 10, 49, -1, 67, 68, -1, -1, -1,
1115 18, 19, 20, -1, 60, -1, -1, 5, -1, -1,
1116 -1, -1, -1, 11, 12, 71, 72, 73, 36, 37,
1117 -1, -1, -1, 21, 22, 23, 24, 25, 26, 27,
1118 28, 49, 30, 31, 32, 33, 34, -1, -1, -1,
1119 5, -1, 60, 41, -1, -1, 11, 12, -1, -1,
1120 15, 16, -1, 71, 72, 73, 21, 22, 23, 24,
1121 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
1122 35, -1, -1, -1, -1, -1, -1, 42, 43, -1,
1123 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
1124 55, 56, 57, -1, 59, 60, 61, 62, 63, -1,
1125 65, 66, 67, 5, 69, -1, 71, 72, 73, 11,
1126 12, -1, -1, -1, -1, -1, -1, -1, -1, 21,
1127 22, 23, 24, 25, 26, 27, 28, -1, 30, 31,
1128 32, 33, 34, 52, -1, 54, 55, 56, 57, 41,
1129 59, 60, 61, 62, 63, -1, -1, 49, 67, 68,
1130 -1, -1, -1, -1, -1, -1, 5, -1, -1, 61,
1131 -1, -1, 11, 12, -1, -1, -1, 69, 17, -1,
1132 -1, 73, 21, 22, 23, 24, 25, 26, 27, 28,
1133 5, 30, 31, 32, 33, 34, 11, 12, -1, 38,
1134 39, -1, 17, -1, -1, -1, 21, 22, 23, 24,
1135 25, 26, 27, 28, -1, 30, 31, 32, 33, 34,
1136 -1, 5, -1, 38, 39, -1, -1, -1, 12, -1,
1137 -1, -1, 71, 17, 73, -1, 44, 45, 46, 47,
1138 48, 49, 50, 51, 52, -1, 54, 55, 56, 57,
1139 -1, 59, 60, 61, 62, 63, 71, -1, 73, 67,
1140 68, -1, -1, -1, -1, 49, 74, -1, -1, -1,
1141 -1, -1, -1, -1, 5, -1, -1, 61, -1, -1,
1142 11, 12, -1, -1, -1, 69, 17, 71, -1, 73,
1143 21, 22, 23, 24, 25, 26, 27, 28, 5, 30,
1144 31, 32, 33, 34, 11, 12, -1, 38, 39, -1,
1145 -1, 15, 16, -1, 21, 22, 23, 24, 25, 26,
1146 27, 28, 29, 30, 31, 32, 33, 34, -1, -1,
1147 -1, 35, -1, -1, -1, -1, -1, -1, 42, 43,
1148 71, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1149 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
1150 -1, 65, 66, 67, 5, 69, -1, 71, 72, 73,
1151 11, 12, -1, -1, -1, -1, -1, -1, -1, -1,
1152 21, 22, 23, 24, 25, 26, 27, 28, 5, 30,
1153 31, 32, 33, 34, 11, 12, -1, -1, -1, -1,
1154 -1, -1, -1, -1, 21, 22, 23, 24, -1, -1,
1155 27, 28, -1, -1, 31, 32, 33, 34, 44, 45,
1156 46, 47, 48, 49, 50, 51, 52, 53, 54, 55,
1157 56, 57, -1, 59, 60, 61, 62, 63, -1, -1,
1158 -1, 67, 68, 44, 45, 46, 47, 48, 49, 50,
1159 51, 52, -1, 54, 55, 56, 57, -1, 59, 60,
1160 61, 62, 63, -1, -1, -1, 67, 68, 46, 47,
1161 48, 49, 50, 51, 52, -1, 54, 55, 56, 57,
1162 -1, 59, 60, 61, 62, 63, -1, -1, -1, 67,
1163 68, 47, 48, 49, 50, 51, 52, -1, 54, 55,
1164 56, 57, -1, 59, 60, 61, 62, 63, -1, -1,
1165 -1, 67, 68, 48, 49, 50, 51, 52, -1, 54,
1166 55, 56, 57, -1, 59, 60, 61, 62, 63, -1,
1167 -1, -1, 67, 68, 49, 50, 51, 52, -1, 54,
1168 55, 56, 57, -1, 59, 60, 61, 62, 63, -1,
1169 -1, -1, 67, 68, 50, 51, 52, -1, 54, 55,
1170 56, 57, -1, 59, 60, 61, 62, 63, -1, -1,
1178 0, 5, 11, 12, 17, 21, 22, 23, 24, 25,
1179 26, 27, 28, 30, 31, 32, 33, 34, 38, 39,
1180 71, 76, 77, 79, 80, 81, 82, 83, 84, 86,
1181 88, 89, 90, 91, 97, 98, 99, 100, 101, 104,
1182 108, 12, 52, 82, 86, 89, 90, 12, 15, 16,
1183 35, 42, 43, 45, 46, 47, 48, 49, 50, 51,
1184 52, 53, 54, 55, 56, 57, 59, 60, 61, 62,
1185 63, 65, 66, 67, 69, 71, 72, 73, 90, 104,
1186 27, 77, 77, 5, 0, 52, 5, 12, 49, 61,
1187 69, 73, 78, 90, 91, 95, 102, 103, 106, 107,
1188 98, 73, 95, 5, 82, 84, 91, 12, 98, 12,
1189 86, 101, 22, 99, 98, 12, 17, 73, 85, 86,
1190 87, 88, 90, 95, 102, 105, 106, 111, 112, 3,
1191 4, 10, 18, 19, 20, 36, 37, 49, 60, 71,
1192 72, 73, 92, 93, 104, 113, 98, 82, 69, 69,
1193 61, 70, 41, 40, 92, 77, 90, 96, 98, 3,
1194 70, 12, 31, 41, 73, 90, 94, 102, 104, 105,
1195 5, 61, 91, 12, 78, 12, 107, 95, 103, 78,
1196 12, 12, 86, 98, 98, 86, 90, 102, 95, 103,
1197 78, 73, 105, 111, 95, 95, 103, 73, 52, 52,
1198 52, 73, 77, 113, 113, 113, 49, 104, 108, 113,
1199 114, 42, 53, 105, 44, 45, 46, 47, 48, 49,
1200 50, 51, 52, 54, 55, 56, 57, 59, 60, 61,
1201 62, 63, 67, 68, 70, 70, 77, 53, 61, 70,
1202 90, 41, 96, 41, 42, 105, 41, 96, 90, 12,
1203 98, 73, 87, 102, 109, 110, 12, 12, 108, 108,
1204 108, 108, 77, 73, 77, 41, 53, 41, 93, 113,
1205 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1206 113, 113, 113, 113, 113, 113, 113, 5, 5, 96,
1207 96, 96, 29, 104, 77, 109, 109, 41, 95, 103,
1208 77, 77, 41, 53, 53, 53, 41, 77, 113, 113,
1209 74, 105, 41, 73, 73, 73, 41, 113, 114, 114,
1216 0, 75, 76, 77, 77, 77, 78, 78, 79, 79,
1217 79, 79, 79, 80, 80, 81, 81, 81, 81, 81,
1218 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
1219 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
1220 81, 81, 81, 81, 81, 81, 81, 81, 82, 83,
1221 83, 83, 83, 84, 84, 84, 85, 85, 86, 86,
1222 86, 86, 87, 87, 88, 88, 89, 89, 90, 90,
1223 90, 90, 91, 92, 92, 93, 93, 93, 93, 93,
1224 94, 94, 94, 94, 94, 95, 95, 95, 96, 96,
1225 97, 97, 97, 98, 98, 99, 99, 99, 99, 99,
1226 99, 100, 100, 101, 101, 101, 101, 101, 101, 101,
1227 102, 102, 102, 102, 103, 103, 104, 104, 104, 104,
1228 104, 104, 104, 104, 104, 104, 104, 104, 105, 105,
1229 105, 106, 106, 106, 106, 107, 107, 107, 107, 107,
1230 108, 108, 109, 109, 110, 110, 110, 110, 111, 111,
1231 111, 111, 111, 112, 112, 112, 112, 112, 113, 114,
1232 114, 114, 114, 113, 113, 113, 113, 113, 113, 113,
1233 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1234 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1235 113, 113, 113, 113, 113
1241 0, 2, 1, 1, 1, 1, 0, 2, 2, 3,
1242 3, 2, 2, 2, 4, 2, 2, 4, 4, 2,
1243 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1244 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1245 2, 2, 2, 2, 3, 2, 3, 3, 2, 2,
1246 1, 3, 2, 1, 4, 2, 1, 2, 2, 1,
1247 2, 1, 1, 1, 1, 2, 2, 1, 2, 3,
1248 2, 3, 4, 1, 3, 1, 2, 2, 4, 1,
1249 1, 2, 3, 4, 3, 4, 4, 3, 0, 1,
1250 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,
1251 1, 1, 2, 1, 1, 1, 2, 1, 1, 1,
1252 2, 1, 3, 4, 2, 3, 2, 1, 3, 2,
1253 2, 1, 3, 2, 3, 2, 4, 3, 1, 2,
1254 1, 3, 2, 2, 1, 1, 2, 1, 4, 2,
1255 1, 2, 2, 1, 3, 2, 2, 1, 2, 1,
1256 1, 4, 4, 4, 2, 2, 2, 2, 3, 1,
1257 3, 2, 4, 2, 2, 2, 4, 7, 7, 7,
1258 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1259 3, 3, 3, 3, 3, 3, 3, 3, 3, 5,
1264 #define yyerrok (yyerrstatus = 0)
1265 #define yyclearin (yychar = YYEMPTY)
1266 #define YYEMPTY (-2)
1269 #define YYACCEPT goto yyacceptlab
1270 #define YYABORT goto yyabortlab
1271 #define YYERROR goto yyerrorlab
1274 #define YYRECOVERING() (!!yyerrstatus)
1276 #define YYBACKUP(Token, Value) \
1278 if (yychar == YYEMPTY) \
1282 YYPOPSTACK (yylen); \
1288 yyerror (YY_("syntax error: cannot back up")); \
1295 #define YYERRCODE 256
1304 # define YYFPRINTF fprintf
1307 # define YYDPRINTF(Args) \
1314 #ifndef YY_LOCATION_PRINT
1315 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1319 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1323 YYFPRINTF (stderr, "%s ", Title); \
1324 yy_symbol_print (stderr, \
1326 YYFPRINTF (stderr, "\n"); \
1338 FILE *yyo = yyoutput;
1344 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1358 yytype <
YYNTOKENS ?
"token" :
"nterm", yytname[yytype]);
1373 for (; yybottom <= yytop; yybottom++)
1375 int yybot = *yybottom;
1381 # define YY_STACK_PRINT(Bottom, Top) \
1384 yy_stack_print ((Bottom), (Top)); \
1395 unsigned long int yylno = yyrline[
yyrule];
1396 int yynrhs = yyr2[
yyrule];
1398 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
1401 for (yyi = 0; yyi < yynrhs; yyi++)
1405 yystos[yyssp[yyi + 1 - yynrhs]],
1406 &(yyvsp[(yyi + 1) - (yynrhs)])
1412 # define YY_REDUCE_PRINT(Rule) \
1415 yy_reduce_print (yyssp, yyvsp, Rule); \
1422 # define YYDPRINTF(Args)
1423 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1424 # define YY_STACK_PRINT(Bottom, Top)
1425 # define YY_REDUCE_PRINT(Rule)
1431 # define YYINITDEPTH 200
1442 # define YYMAXDEPTH 10000
1449 # if defined __GLIBC__ && defined _STRING_H
1450 # define yystrlen strlen
1454 yystrlen (
const char *yystr)
1457 for (yylen = 0; yystr[
yylen]; yylen++)
1465 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1466 # define yystpcpy stpcpy
1471 yystpcpy (
char *yydest,
const char *yysrc)
1474 const char *yys = yysrc;
1476 while ((*yyd++ = *yys++) !=
'\0')
1493 yytnamerr (
char *yyres,
const char *yystr)
1498 char const *yyp = yystr;
1505 goto do_not_strip_quotes;
1509 goto do_not_strip_quotes;
1522 do_not_strip_quotes: ;
1526 return yystrlen (yystr);
1528 return yystpcpy (yyres, yystr) - yyres;
1541 yysyntax_error (
YYSIZE_T *yymsg_alloc,
char **yymsg,
1542 yytype_int16 *yyssp,
int yytoken)
1546 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1550 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1580 int yyn = yypact[*
yyssp];
1581 yyarg[yycount++] = yytname[yytoken];
1587 int yyxbegin = yyn < 0 ? -yyn : 0;
1589 int yychecklim =
YYLAST - yyn + 1;
1593 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1594 if (yycheck[yyx + yyn] == yyx && yyx !=
YYTERROR
1597 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1603 yyarg[yycount++] = yytname[yyx];
1606 if (! (yysize <= yysize1
1617 # define YYCASE_(N, S) \
1621 YYCASE_(0,
YY_(
"syntax error"));
1622 YYCASE_(1,
YY_(
"syntax error, unexpected %s"));
1623 YYCASE_(2,
YY_(
"syntax error, unexpected %s, expecting %s"));
1624 YYCASE_(3,
YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1625 YYCASE_(4,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1626 YYCASE_(5,
YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1631 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1637 if (*yymsg_alloc < yysize)
1639 *yymsg_alloc = 2 * yysize;
1640 if (! (yysize <= *yymsg_alloc
1652 while ((*yyp = *yyformat) !=
'\0')
1653 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1655 yyp += yytnamerr (yyp, yyarg[yyi++]);
1718 yytype_int16 *
yyssp;
1738 char *yymsg = yymsgbuf;
1739 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1742 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1748 yyssp = yyss = yyssa;
1749 yyvsp = yyvs = yyvsa;
1752 YYDPRINTF ((stderr,
"Starting parse\n"));
1771 if (yyss + yystacksize - 1 <= yyssp)
1774 YYSIZE_T yysize = yyssp - yyss + 1;
1782 yytype_int16 *yyss1 =
yyss;
1788 yyoverflow (
YY_(
"memory exhausted"),
1789 &yyss1, yysize *
sizeof (*yyssp),
1790 &yyvs1, yysize *
sizeof (*yyvsp),
1797 # ifndef YYSTACK_RELOCATE
1798 goto yyexhaustedlab;
1802 goto yyexhaustedlab;
1808 yytype_int16 *yyss1 =
yyss;
1812 goto yyexhaustedlab;
1815 # undef YYSTACK_RELOCATE
1822 yyssp = yyss + yysize - 1;
1823 yyvsp = yyvs + yysize - 1;
1825 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1826 (
unsigned long int) yystacksize));
1828 if (yyss + yystacksize - 1 <= yyssp)
1832 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1857 YYDPRINTF ((stderr,
"Reading a token: "));
1861 if (yychar <=
YYEOF)
1863 yychar = yytoken =
YYEOF;
1864 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1875 if (yyn < 0 ||
YYLAST < yyn || yycheck[yyn] != yytoken)
1930 yyval = yyvsp[1-
yylen];
1937 #line 376 "cp-name-parser.y"
1938 { global_result = (yyvsp[0].comp); }
1939 #line 1941 "cp-name-parser.c"
1943 #line 388 "cp-name-parser.y"
1944 { (yyval.
comp) = NULL; }
1945 #line 1947 "cp-name-parser.c"
1949 #line 390 "cp-name-parser.y"
1950 { (yyval.
comp) = (yyvsp[0].comp); }
1951 #line 1953 "cp-name-parser.c"
1955 #line 397 "cp-name-parser.y"
1956 { (yyval.
comp) = (yyvsp[0].nested).comp;
1957 *(yyvsp[0].nested).last = (yyvsp[-1].comp);
1959 #line 1961 "cp-name-parser.c"
1963 #line 406 "cp-name-parser.y"
1964 { (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-2].comp), (yyvsp[-1].nested).comp);
1965 if ((yyvsp[0].comp)) (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.
comp), (yyvsp[0].comp)); }
1966 #line 1968 "cp-name-parser.c"
1970 #line 409 "cp-name-parser.y"
1971 { (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-2].comp), (yyvsp[-1].nested).comp);
1972 if ((yyvsp[0].comp)) (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.
comp), (yyvsp[0].comp)); }
1973 #line 1975 "cp-name-parser.c"
1977 #line 413 "cp-name-parser.y"
1978 { (yyval.
comp) = (yyvsp[-1].nested).comp;
1979 if ((yyvsp[0].comp)) (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.
comp), (yyvsp[0].comp)); }
1980 #line 1982 "cp-name-parser.c"
1984 #line 416 "cp-name-parser.y"
1985 {
if ((yyvsp[0].
abstract).last)
1989 *(yyvsp[0].abstract).last = *(yyvsp[-1].nested).last;
1991 *(yyvsp[-1].nested).last = (yyvsp[0].
abstract).comp;
1994 if ((yyvsp[0].
abstract).fn.comp)
1995 (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-1].nested).comp, (yyvsp[0].
abstract).fn.comp);
1997 (yyval.
comp) = (yyvsp[-1].nested).comp;
1998 if ((yyvsp[0].
abstract).start) (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.
comp), (yyvsp[0].abstract).start);
2000 #line 2002 "cp-name-parser.c"
2004 #line 435 "cp-name-parser.y"
2008 #line 2010 "cp-name-parser.c"
2012 #line 439 "cp-name-parser.y"
2013 { (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE, (yyvsp[-2].comp), (yyvsp[0].comp)); }
2014 #line 2016 "cp-name-parser.c"
2018 #line 443 "cp-name-parser.y"
2024 #line 2026 "cp-name-parser.c"
2028 #line 449 "cp-name-parser.y"
2034 #line 2036 "cp-name-parser.c"
2038 #line 455 "cp-name-parser.y"
2044 #line 2046 "cp-name-parser.c"
2048 #line 461 "cp-name-parser.y"
2054 #line 2056 "cp-name-parser.c"
2058 #line 467 "cp-name-parser.y"
2060 #line 2062 "cp-name-parser.c"
2064 #line 469 "cp-name-parser.y"
2066 #line 2068 "cp-name-parser.c"
2070 #line 471 "cp-name-parser.y"
2072 #line 2074 "cp-name-parser.c"
2076 #line 473 "cp-name-parser.y"
2078 #line 2080 "cp-name-parser.c"
2082 #line 475 "cp-name-parser.y"
2084 #line 2086 "cp-name-parser.c"
2088 #line 477 "cp-name-parser.y"
2090 #line 2092 "cp-name-parser.c"
2094 #line 479 "cp-name-parser.y"
2096 #line 2098 "cp-name-parser.c"
2100 #line 481 "cp-name-parser.y"
2102 #line 2104 "cp-name-parser.c"
2106 #line 483 "cp-name-parser.y"
2108 #line 2110 "cp-name-parser.c"
2112 #line 485 "cp-name-parser.y"
2114 #line 2116 "cp-name-parser.c"
2118 #line 487 "cp-name-parser.y"
2120 #line 2122 "cp-name-parser.c"
2124 #line 489 "cp-name-parser.y"
2126 #line 2128 "cp-name-parser.c"
2130 #line 491 "cp-name-parser.y"
2132 #line 2134 "cp-name-parser.c"
2136 #line 493 "cp-name-parser.y"
2138 #line 2140 "cp-name-parser.c"
2142 #line 495 "cp-name-parser.y"
2144 #line 2146 "cp-name-parser.c"
2148 #line 497 "cp-name-parser.y"
2150 #line 2152 "cp-name-parser.c"
2154 #line 499 "cp-name-parser.y"
2156 #line 2158 "cp-name-parser.c"
2160 #line 501 "cp-name-parser.y"
2162 #line 2164 "cp-name-parser.c"
2166 #line 503 "cp-name-parser.y"
2168 #line 2170 "cp-name-parser.c"
2172 #line 505 "cp-name-parser.y"
2174 #line 2176 "cp-name-parser.c"
2178 #line 507 "cp-name-parser.y"
2180 #line 2182 "cp-name-parser.c"
2184 #line 509 "cp-name-parser.y"
2186 #line 2188 "cp-name-parser.c"
2190 #line 511 "cp-name-parser.y"
2192 #line 2194 "cp-name-parser.c"
2196 #line 513 "cp-name-parser.y"
2198 #line 2200 "cp-name-parser.c"
2202 #line 515 "cp-name-parser.y"
2204 #line 2206 "cp-name-parser.c"
2208 #line 517 "cp-name-parser.y"
2210 #line 2212 "cp-name-parser.c"
2214 #line 519 "cp-name-parser.y"
2216 #line 2218 "cp-name-parser.c"
2220 #line 521 "cp-name-parser.y"
2222 #line 2224 "cp-name-parser.c"
2226 #line 523 "cp-name-parser.y"
2228 #line 2230 "cp-name-parser.c"
2232 #line 531 "cp-name-parser.y"
2233 { (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_CAST, (yyvsp[0].comp), NULL); }
2234 #line 2236 "cp-name-parser.c"
2238 #line 536 "cp-name-parser.y"
2239 { (yyval.
nested).comp = (yyvsp[-1].nested1).comp;
2240 d_right ((yyvsp[-1].nested1).last) = (yyvsp[0].comp);
2243 #line 2245 "cp-name-parser.c"
2247 #line 541 "cp-name-parser.y"
2248 { (yyval.
nested).comp = (yyvsp[0].comp);
2251 #line 2253 "cp-name-parser.c"
2255 #line 545 "cp-name-parser.y"
2256 { (yyval.
nested).comp = (yyvsp[-1].nested1).comp;
2257 d_right ((yyvsp[-1].nested1).last) = (yyvsp[0].comp);
2260 #line 2262 "cp-name-parser.c"
2264 #line 550 "cp-name-parser.y"
2265 { (yyval.
nested).comp = (yyvsp[0].comp);
2268 #line 2270 "cp-name-parser.c"
2272 #line 559 "cp-name-parser.y"
2273 { (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_TEMPLATE, (yyvsp[-3].comp), (yyvsp[-1].nested).comp); }
2274 #line 2276 "cp-name-parser.c"
2278 #line 561 "cp-name-parser.y"
2279 { (yyval.
comp) =
make_dtor (gnu_v3_complete_object_dtor, (yyvsp[0].comp)); }
2280 #line 2282 "cp-name-parser.c"
2284 #line 574 "cp-name-parser.y"
2285 { (yyval.
comp) = (yyvsp[0].comp); }
2286 #line 2288 "cp-name-parser.c"
2290 #line 580 "cp-name-parser.y"
2291 { (yyval.
comp) = (yyvsp[-1].nested1).comp;
d_right ((yyvsp[-1].nested1).last) = (yyvsp[0].comp); }
2292 #line 2294 "cp-name-parser.c"
2296 #line 583 "cp-name-parser.y"
2297 { (yyval.
comp) = (yyvsp[-1].nested1).comp;
d_right ((yyvsp[-1].nested1).last) = (yyvsp[0].comp); }
2298 #line 2300 "cp-name-parser.c"
2302 #line 593 "cp-name-parser.y"
2303 { (yyval.
comp) = (yyvsp[0].comp); }
2304 #line 2306 "cp-name-parser.c"
2308 #line 597 "cp-name-parser.y"
2309 { (yyval.
comp) = (yyvsp[-1].nested1).comp;
d_right ((yyvsp[-1].nested1).last) = (yyvsp[0].comp); }
2310 #line 2312 "cp-name-parser.c"
2314 #line 602 "cp-name-parser.y"
2320 #line 2322 "cp-name-parser.c"
2324 #line 608 "cp-name-parser.y"
2325 { (yyval.
nested1).comp = (yyvsp[-2].nested1).comp;
2331 #line 2333 "cp-name-parser.c"
2335 #line 615 "cp-name-parser.y"
2341 #line 2343 "cp-name-parser.c"
2345 #line 621 "cp-name-parser.y"
2346 { (yyval.
nested1).comp = (yyvsp[-2].nested1).comp;
2352 #line 2354 "cp-name-parser.c"
2356 #line 632 "cp-name-parser.y"
2357 { (yyval.
comp) =
fill_comp (DEMANGLE_COMPONENT_TEMPLATE, (yyvsp[-3].comp), (yyvsp[-1].nested).comp); }
2358 #line 2360 "cp-name-parser.c"
2362 #line 636 "cp-name-parser.y"
2363 { (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, (yyvsp[0].comp), NULL);
2365 #line 2367 "cp-name-parser.c"
2369 #line 639 "cp-name-parser.y"
2370 { (yyval.
nested).comp = (yyvsp[-2].nested).comp;
2371 *(yyvsp[-2].nested).last =
fill_comp (DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, (yyvsp[0].comp), NULL);
2374 #line 2376 "cp-name-parser.c"
2378 #line 651 "cp-name-parser.y"
2379 { (yyval.
comp) = (yyvsp[0].
abstract).comp;
2380 *(yyvsp[0].abstract).last = (yyvsp[-1].comp);
2382 #line 2384 "cp-name-parser.c"
2386 #line 655 "cp-name-parser.y"
2388 #line 2390 "cp-name-parser.c"
2392 #line 657 "cp-name-parser.y"
2394 #line 2396 "cp-name-parser.c"
2398 #line 662 "cp-name-parser.y"
2399 { (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_ARGLIST, (yyvsp[0].comp), NULL);
2402 #line 2404 "cp-name-parser.c"
2406 #line 666 "cp-name-parser.y"
2407 { *(yyvsp[0].abstract).last = (yyvsp[-1].comp);
2408 (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_ARGLIST, (yyvsp[0].
abstract).comp, NULL);
2411 #line 2413 "cp-name-parser.c"
2415 #line 671 "cp-name-parser.y"
2416 { *(yyvsp[-2].nested).last =
fill_comp (DEMANGLE_COMPONENT_ARGLIST, (yyvsp[0].comp), NULL);
2417 (yyval.
nested).comp = (yyvsp[-2].nested).comp;
2420 #line 2422 "cp-name-parser.c"
2424 #line 676 "cp-name-parser.y"
2425 { *(yyvsp[0].abstract).last = (yyvsp[-1].comp);
2426 *(yyvsp[-3].nested).last =
fill_comp (DEMANGLE_COMPONENT_ARGLIST, (yyvsp[0].
abstract).comp, NULL);
2427 (yyval.
nested).comp = (yyvsp[-3].nested).comp;
2430 #line 2432 "cp-name-parser.c"
2434 #line 682 "cp-name-parser.y"
2435 { *(yyvsp[-2].nested).last
2436 =
fill_comp (DEMANGLE_COMPONENT_ARGLIST,
2439 (yyval.
nested).comp = (yyvsp[-2].nested).comp;
2442 #line 2444 "cp-name-parser.c"
2446 #line 692 "cp-name-parser.y"
2447 { (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_FUNCTION_TYPE, NULL, (yyvsp[-2].nested).comp);
2450 #line 2452 "cp-name-parser.c"
2454 #line 696 "cp-name-parser.y"
2455 { (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_FUNCTION_TYPE, NULL, NULL);
2458 #line 2460 "cp-name-parser.c"
2462 #line 700 "cp-name-parser.y"
2463 { (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_FUNCTION_TYPE, NULL, NULL);
2466 #line 2468 "cp-name-parser.c"
2470 #line 707 "cp-name-parser.y"
2471 { (yyval.
lval) = 0; }
2472 #line 2474 "cp-name-parser.c"
2476 #line 712 "cp-name-parser.y"
2478 #line 2480 "cp-name-parser.c"
2482 #line 714 "cp-name-parser.y"
2484 #line 2486 "cp-name-parser.c"
2488 #line 716 "cp-name-parser.y"
2490 #line 2492 "cp-name-parser.c"
2494 #line 721 "cp-name-parser.y"
2495 { (yyval.
lval) = (yyvsp[-1].lval) | (yyvsp[0].lval); }
2496 #line 2498 "cp-name-parser.c"
2500 #line 728 "cp-name-parser.y"
2501 { (yyval.
lval) = 0; }
2502 #line 2504 "cp-name-parser.c"
2506 #line 730 "cp-name-parser.y"
2508 #line 2510 "cp-name-parser.c"
2512 #line 732 "cp-name-parser.y"
2514 #line 2516 "cp-name-parser.c"
2518 #line 734 "cp-name-parser.y"
2520 #line 2522 "cp-name-parser.c"
2524 #line 736 "cp-name-parser.y"
2526 #line 2528 "cp-name-parser.c"
2530 #line 738 "cp-name-parser.y"
2532 #line 2534 "cp-name-parser.c"
2536 #line 743 "cp-name-parser.y"
2537 { (yyval.
lval) = (yyvsp[-1].lval) | (yyvsp[0].lval);
if ((yyvsp[-1].lval) & (yyvsp[0].lval) &
INT_LONG) (yyval.
lval) = (yyvsp[-1].lval) |
INT_LLONG; }
2538 #line 2540 "cp-name-parser.c"
2542 #line 747 "cp-name-parser.y"
2544 #line 2546 "cp-name-parser.c"
2548 #line 749 "cp-name-parser.y"
2550 #line 2552 "cp-name-parser.c"
2554 #line 751 "cp-name-parser.y"
2556 #line 2558 "cp-name-parser.c"
2560 #line 753 "cp-name-parser.y"
2562 #line 2564 "cp-name-parser.c"
2566 #line 755 "cp-name-parser.y"
2568 #line 2570 "cp-name-parser.c"
2572 #line 757 "cp-name-parser.y"
2574 #line 2576 "cp-name-parser.c"
2578 #line 759 "cp-name-parser.y"
2580 #line 2582 "cp-name-parser.c"
2584 #line 763 "cp-name-parser.y"
2586 (yyval.
nested).comp->u.s_binary.left = (yyval.
nested).comp->u.s_binary.right = NULL;
2589 #line 2591 "cp-name-parser.c"
2593 #line 769 "cp-name-parser.y"
2595 (yyval.
nested).comp->u.s_binary.left = (yyval.
nested).comp->u.s_binary.right = NULL;
2597 #line 2599 "cp-name-parser.c"
2601 #line 773 "cp-name-parser.y"
2603 (yyval.
nested).comp->u.s_binary.left = (yyvsp[-2].nested1).comp;
2605 *(yyvsp[-2].nested1).last = *
d_left ((yyvsp[-2].nested1).last);
2606 (yyval.
nested).comp->u.s_binary.right = NULL;
2609 #line 2611 "cp-name-parser.c"
2613 #line 781 "cp-name-parser.y"
2615 (yyval.
nested).comp->u.s_binary.left = (yyvsp[-2].nested1).comp;
2617 *(yyvsp[-2].nested1).last = *
d_left ((yyvsp[-2].nested1).last);
2618 (yyval.
nested).comp->u.s_binary.right = NULL;
2621 #line 2623 "cp-name-parser.c"
2625 #line 791 "cp-name-parser.y"
2629 #line 2631 "cp-name-parser.c"
2633 #line 795 "cp-name-parser.y"
2637 #line 2639 "cp-name-parser.c"
2641 #line 811 "cp-name-parser.y"
2642 { (yyval.
comp) =
d_qualify ((yyvsp[-1].comp), (yyvsp[0].lval), 0); }
2643 #line 2645 "cp-name-parser.c"
2647 #line 814 "cp-name-parser.y"
2648 { (yyval.
comp) =
d_qualify ((yyvsp[-1].comp), (yyvsp[-2].lval) | (yyvsp[0].lval), 0); }
2649 #line 2651 "cp-name-parser.c"
2653 #line 816 "cp-name-parser.y"
2654 { (yyval.
comp) =
d_qualify ((yyvsp[0].comp), (yyvsp[-1].lval), 0); }
2655 #line 2657 "cp-name-parser.c"
2659 #line 819 "cp-name-parser.y"
2660 { (yyval.
comp) =
d_qualify ((yyvsp[-1].comp), (yyvsp[0].lval), 0); }
2661 #line 2663 "cp-name-parser.c"
2665 #line 822 "cp-name-parser.y"
2666 { (yyval.
comp) =
d_qualify ((yyvsp[-1].comp), (yyvsp[-2].lval) | (yyvsp[0].lval), 0); }
2667 #line 2669 "cp-name-parser.c"
2671 #line 824 "cp-name-parser.y"
2672 { (yyval.
comp) =
d_qualify ((yyvsp[0].comp), (yyvsp[-1].lval), 0); }
2673 #line 2675 "cp-name-parser.c"
2677 #line 827 "cp-name-parser.y"
2678 { (yyval.
comp) =
d_qualify ((yyvsp[-1].comp), (yyvsp[0].lval), 0); }
2679 #line 2681 "cp-name-parser.c"
2683 #line 829 "cp-name-parser.y"
2684 { (yyval.
comp) = (yyvsp[0].comp); }
2685 #line 2687 "cp-name-parser.c"
2689 #line 831 "cp-name-parser.y"
2690 { (yyval.
comp) =
d_qualify ((yyvsp[-1].comp), (yyvsp[-3].lval) | (yyvsp[0].lval), 0); }
2691 #line 2693 "cp-name-parser.c"
2695 #line 833 "cp-name-parser.y"
2696 { (yyval.
comp) =
d_qualify ((yyvsp[0].comp), (yyvsp[-2].lval), 0); }
2697 #line 2699 "cp-name-parser.c"
2701 #line 838 "cp-name-parser.y"
2702 { (yyval.
abstract).comp = (yyvsp[0].nested).comp; (yyval.
abstract).last = (yyvsp[0].nested).last;
2704 #line 2706 "cp-name-parser.c"
2708 #line 841 "cp-name-parser.y"
2710 if ((yyvsp[0].
abstract).fn.comp) { (yyval.
abstract).last = (yyvsp[0].
abstract).fn.last; *(yyvsp[0].abstract).last = (yyvsp[0].
abstract).fn.comp; }
2711 *(yyval.
abstract).last = (yyvsp[-1].nested).comp;
2712 (yyval.
abstract).last = (yyvsp[-1].nested).last; }
2713 #line 2715 "cp-name-parser.c"
2717 #line 846 "cp-name-parser.y"
2719 if ((yyvsp[0].
abstract).fn.comp) { (yyval.
abstract).last = (yyvsp[0].
abstract).fn.last; *(yyvsp[0].abstract).last = (yyvsp[0].
abstract).fn.comp; }
2721 #line 2723 "cp-name-parser.c"
2725 #line 853 "cp-name-parser.y"
2727 if ((yyvsp[-1].
abstract).fn.comp) { (yyval.
abstract).last = (yyvsp[-1].
abstract).fn.last; *(yyvsp[-1].abstract).last = (yyvsp[-1].
abstract).fn.comp; }
2729 #line 2731 "cp-name-parser.c"
2733 #line 857 "cp-name-parser.y"
2735 if ((yyvsp[-1].
abstract).fn.comp) { (yyval.
abstract).last = (yyvsp[-1].
abstract).fn.last; *(yyvsp[-1].abstract).last = (yyvsp[-1].
abstract).fn.comp; }
2736 if ((yyvsp[-1].
abstract).fold_flag)
2738 *(yyval.
abstract).last = (yyvsp[0].nested).comp;
2739 (yyval.
abstract).last = (yyvsp[0].nested).last;
2742 (yyval.
abstract).fn = (yyvsp[0].nested);
2744 #line 2746 "cp-name-parser.c"
2748 #line 868 "cp-name-parser.y"
2750 if ((yyvsp[-1].
abstract).fn.comp) { (yyval.
abstract).last = (yyvsp[-1].
abstract).fn.last; *(yyvsp[-1].abstract).last = (yyvsp[-1].
abstract).fn.comp; }
2751 *(yyvsp[-1].abstract).last = (yyvsp[0].comp);
2754 #line 2756 "cp-name-parser.c"
2758 #line 874 "cp-name-parser.y"
2760 (yyval.
abstract).comp = (yyvsp[0].comp);
2763 #line 2765 "cp-name-parser.c"
2767 #line 892 "cp-name-parser.y"
2768 { (yyval.
abstract).comp = (yyvsp[0].nested).comp; (yyval.
abstract).last = (yyvsp[0].nested).last;
2770 #line 2772 "cp-name-parser.c"
2774 #line 895 "cp-name-parser.y"
2775 { (yyval.
abstract) = (yyvsp[0].
abstract);
2776 if ((yyvsp[0].
abstract).last)
2777 *(yyval.
abstract).last = (yyvsp[-1].nested).comp;
2779 (yyval.
abstract).comp = (yyvsp[-1].nested).comp;
2780 (yyval.
abstract).last = (yyvsp[-1].nested).last;
2782 #line 2784 "cp-name-parser.c"
2786 #line 903 "cp-name-parser.y"
2787 { (yyval.
abstract).comp = (yyvsp[0].
abstract).comp; (yyval.
abstract).last = (yyvsp[0].
abstract).last; (yyval.
abstract).fn = (yyvsp[0].
abstract).fn; (yyval.
abstract).start = NULL; }
2788 #line 2790 "cp-name-parser.c"
2792 #line 905 "cp-name-parser.y"
2793 { (yyval.
abstract).start = (yyvsp[0].comp);
2794 if ((yyvsp[-3].
abstract).fn.comp) { (yyval.
abstract).last = (yyvsp[-3].
abstract).fn.last; *(yyvsp[-3].abstract).last = (yyvsp[-3].
abstract).fn.comp; }
2795 if ((yyvsp[-3].
abstract).fold_flag)
2797 *(yyval.
abstract).last = (yyvsp[-2].nested).comp;
2798 (yyval.
abstract).last = (yyvsp[-2].nested).last;
2801 (yyval.
abstract).fn = (yyvsp[-2].nested);
2803 #line 2805 "cp-name-parser.c"
2807 #line 916 "cp-name-parser.y"
2808 { (yyval.
abstract).fn = (yyvsp[-1].nested);
2809 (yyval.
abstract).start = (yyvsp[0].comp);
2812 #line 2814 "cp-name-parser.c"
2816 #line 924 "cp-name-parser.y"
2817 { (yyval.
comp) = (yyvsp[0].
abstract).comp;
2818 *(yyvsp[0].abstract).last = (yyvsp[-1].comp);
2820 #line 2822 "cp-name-parser.c"
2824 #line 930 "cp-name-parser.y"
2825 { (yyval.
nested).comp = (yyvsp[0].nested).comp;
2826 (yyval.
nested).last = (yyvsp[-1].nested).last;
2827 *(yyvsp[0].nested).last = (yyvsp[-1].nested).comp; }
2828 #line 2830 "cp-name-parser.c"
2832 #line 938 "cp-name-parser.y"
2833 { (yyval.
nested) = (yyvsp[-1].nested); }
2834 #line 2836 "cp-name-parser.c"
2838 #line 940 "cp-name-parser.y"
2839 { (yyval.
nested).comp = (yyvsp[-1].nested).comp;
2840 *(yyvsp[-1].nested).last = (yyvsp[0].nested).comp;
2841 (yyval.
nested).last = (yyvsp[0].nested).last;
2843 #line 2845 "cp-name-parser.c"
2847 #line 945 "cp-name-parser.y"
2848 { (yyval.
nested).comp = (yyvsp[-1].nested).comp;
2849 *(yyvsp[-1].nested).last = (yyvsp[0].comp);
2852 #line 2854 "cp-name-parser.c"
2856 #line 950 "cp-name-parser.y"
2861 #line 2863 "cp-name-parser.c"
2865 #line 963 "cp-name-parser.y"
2866 { (yyval.
nested).comp = (yyvsp[0].nested).comp;
2867 (yyval.
nested).last = (yyvsp[-1].nested).last;
2868 *(yyvsp[0].nested).last = (yyvsp[-1].nested).comp; }
2869 #line 2871 "cp-name-parser.c"
2873 #line 967 "cp-name-parser.y"
2878 #line 2880 "cp-name-parser.c"
2882 #line 980 "cp-name-parser.y"
2883 { (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-3].comp), (yyvsp[-2].nested).comp);
2884 (yyval.
nested).last = (yyvsp[-2].nested).last;
2885 (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.
nested).comp, (yyvsp[0].comp));
2887 #line 2889 "cp-name-parser.c"
2891 #line 985 "cp-name-parser.y"
2892 { (yyval.
nested).comp = (yyvsp[-3].nested).comp;
2893 *(yyvsp[-3].nested).last = (yyvsp[-2].nested).comp;
2894 (yyval.
nested).last = (yyvsp[-2].nested).last;
2895 (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.
nested).comp, (yyvsp[0].comp));
2897 #line 2899 "cp-name-parser.c"
2901 #line 994 "cp-name-parser.y"
2902 { (yyval.
nested).comp = (yyvsp[-1].nested).comp;
2903 (yyval.
nested).last = (yyvsp[-2].nested).last;
2904 *(yyvsp[-1].nested).last = (yyvsp[-2].nested).comp; }
2905 #line 2907 "cp-name-parser.c"
2909 #line 998 "cp-name-parser.y"
2910 { (yyval.
nested).comp = (yyvsp[-1].nested).comp;
2911 *(yyvsp[-1].nested).last = (yyvsp[0].nested).comp;
2912 (yyval.
nested).last = (yyvsp[0].nested).last;
2914 #line 2916 "cp-name-parser.c"
2918 #line 1003 "cp-name-parser.y"
2919 { (yyval.
nested).comp = (yyvsp[-1].nested).comp;
2920 *(yyvsp[-1].nested).last = (yyvsp[0].comp);
2923 #line 2925 "cp-name-parser.c"
2927 #line 1008 "cp-name-parser.y"
2928 { (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-1].comp), (yyvsp[0].nested).comp);
2929 (yyval.
nested).last = (yyvsp[0].nested).last;
2931 #line 2933 "cp-name-parser.c"
2935 #line 1012 "cp-name-parser.y"
2936 { (yyval.
nested).comp =
fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-1].comp), (yyvsp[0].comp));
2939 #line 2941 "cp-name-parser.c"
2943 #line 1018 "cp-name-parser.y"
2944 { (yyval.
comp) = (yyvsp[-1].comp); }
2945 #line 2947 "cp-name-parser.c"
2949 #line 1027 "cp-name-parser.y"
2950 { (yyval.
comp) =
d_binary (
">", (yyvsp[-2].comp), (yyvsp[0].comp)); }
2951 #line 2953 "cp-name-parser.c"
2955 #line 1034 "cp-name-parser.y"
2957 #line 2959 "cp-name-parser.c"
2961 #line 1036 "cp-name-parser.y"
2963 #line 2965 "cp-name-parser.c"
2967 #line 1041 "cp-name-parser.y"
2968 { (yyval.
comp) =
d_unary (
"-", (yyvsp[0].comp)); }
2969 #line 2971 "cp-name-parser.c"
2973 #line 1045 "cp-name-parser.y"
2974 { (yyval.
comp) =
d_unary (
"!", (yyvsp[0].comp)); }
2975 #line 2977 "cp-name-parser.c"
2979 #line 1049 "cp-name-parser.y"
2980 { (yyval.
comp) =
d_unary (
"~", (yyvsp[0].comp)); }
2981 #line 2983 "cp-name-parser.c"
2985 #line 1056 "cp-name-parser.y"
2986 {
if ((yyvsp[0].comp)->type == DEMANGLE_COMPONENT_LITERAL
2987 || (yyvsp[0].comp)->
type == DEMANGLE_COMPONENT_LITERAL_NEG)
2989 (yyval.
comp) = (yyvsp[0].comp);
2990 d_left ((yyvsp[0].comp)) = (yyvsp[-2].comp);
2994 fill_comp (DEMANGLE_COMPONENT_CAST, (yyvsp[-2].comp), NULL),
2997 #line 2999 "cp-name-parser.c"
3001 #line 1072 "cp-name-parser.y"
3003 fill_comp (DEMANGLE_COMPONENT_CAST, (yyvsp[-4].comp), NULL),
3006 #line 3008 "cp-name-parser.c"
3010 #line 1079 "cp-name-parser.y"
3012 fill_comp (DEMANGLE_COMPONENT_CAST, (yyvsp[-4].comp), NULL),
3015 #line 3017 "cp-name-parser.c"
3019 #line 1086 "cp-name-parser.y"
3021 fill_comp (DEMANGLE_COMPONENT_CAST, (yyvsp[-4].comp), NULL),
3024 #line 3026 "cp-name-parser.c"
3028 #line 1105 "cp-name-parser.y"
3029 { (yyval.
comp) =
d_binary (
"*", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3030 #line 3032 "cp-name-parser.c"
3034 #line 1109 "cp-name-parser.y"
3035 { (yyval.
comp) =
d_binary (
"/", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3036 #line 3038 "cp-name-parser.c"
3040 #line 1113 "cp-name-parser.y"
3041 { (yyval.
comp) =
d_binary (
"%", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3042 #line 3044 "cp-name-parser.c"
3046 #line 1117 "cp-name-parser.y"
3047 { (yyval.
comp) =
d_binary (
"+", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3048 #line 3050 "cp-name-parser.c"
3052 #line 1121 "cp-name-parser.y"
3053 { (yyval.
comp) =
d_binary (
"-", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3054 #line 3056 "cp-name-parser.c"
3058 #line 1125 "cp-name-parser.y"
3059 { (yyval.
comp) =
d_binary (
"<<", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3060 #line 3062 "cp-name-parser.c"
3064 #line 1129 "cp-name-parser.y"
3065 { (yyval.
comp) =
d_binary (
">>", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3066 #line 3068 "cp-name-parser.c"
3070 #line 1133 "cp-name-parser.y"
3071 { (yyval.
comp) =
d_binary (
"==", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3072 #line 3074 "cp-name-parser.c"
3076 #line 1137 "cp-name-parser.y"
3077 { (yyval.
comp) =
d_binary (
"!=", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3078 #line 3080 "cp-name-parser.c"
3082 #line 1141 "cp-name-parser.y"
3083 { (yyval.
comp) =
d_binary (
"<=", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3084 #line 3086 "cp-name-parser.c"
3088 #line 1145 "cp-name-parser.y"
3089 { (yyval.
comp) =
d_binary (
">=", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3090 #line 3092 "cp-name-parser.c"
3094 #line 1149 "cp-name-parser.y"
3095 { (yyval.
comp) =
d_binary (
"<", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3096 #line 3098 "cp-name-parser.c"
3100 #line 1153 "cp-name-parser.y"
3101 { (yyval.
comp) =
d_binary (
"&", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3102 #line 3104 "cp-name-parser.c"
3106 #line 1157 "cp-name-parser.y"
3107 { (yyval.
comp) =
d_binary (
"^", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3108 #line 3110 "cp-name-parser.c"
3112 #line 1161 "cp-name-parser.y"
3113 { (yyval.
comp) =
d_binary (
"|", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3114 #line 3116 "cp-name-parser.c"
3118 #line 1165 "cp-name-parser.y"
3119 { (yyval.
comp) =
d_binary (
"&&", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3120 #line 3122 "cp-name-parser.c"
3124 #line 1169 "cp-name-parser.y"
3125 { (yyval.
comp) =
d_binary (
"||", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3126 #line 3128 "cp-name-parser.c"
3130 #line 1174 "cp-name-parser.y"
3131 { (yyval.
comp) =
d_binary (
"->", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3132 #line 3134 "cp-name-parser.c"
3136 #line 1178 "cp-name-parser.y"
3137 { (yyval.
comp) =
d_binary (
".", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3138 #line 3140 "cp-name-parser.c"
3142 #line 1182 "cp-name-parser.y"
3144 fill_comp (DEMANGLE_COMPONENT_TRINARY_ARG1, (yyvsp[-4].comp),
3145 fill_comp (DEMANGLE_COMPONENT_TRINARY_ARG2, (yyvsp[-2].comp), (yyvsp[0].comp))));
3147 #line 3149 "cp-name-parser.c"
3151 #line 1196 "cp-name-parser.y"
3155 (yyval.
comp) =
d_unary (
"sizeof ", (yyvsp[-1].comp));
3157 #line 3159 "cp-name-parser.c"
3161 #line 1205 "cp-name-parser.y"
3162 {
struct demangle_component *i;
3168 #line 3170 "cp-name-parser.c"
3172 #line 1214 "cp-name-parser.y"
3173 {
struct demangle_component *i;
3179 #line 3181 "cp-name-parser.c"
3183 #line 3185 "cp-name-parser.c"
3212 if (0 <= yystate && yystate <=
YYLAST && yycheck[yystate] == *yyssp)
3232 #if ! YYERROR_VERBOSE
3235 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3238 char const *yymsgp =
YY_(
"syntax error");
3239 int yysyntax_error_status;
3240 yysyntax_error_status = YYSYNTAX_ERROR;
3241 if (yysyntax_error_status == 0)
3243 else if (yysyntax_error_status == 1)
3245 if (yymsg != yymsgbuf)
3251 yymsg_alloc =
sizeof yymsgbuf;
3252 yysyntax_error_status = 2;
3256 yysyntax_error_status = YYSYNTAX_ERROR;
3261 if (yysyntax_error_status == 2)
3262 goto yyexhaustedlab;
3264 # undef YYSYNTAX_ERROR
3270 if (yyerrstatus == 3)
3275 if (yychar <=
YYEOF)
3278 if (yychar ==
YYEOF)
3340 yystos[yystate], yyvsp);
3372 #if !defined yyoverflow || YYERROR_VERBOSE
3395 while (yyssp != yyss)
3398 yystos[*yyssp], yyvsp);
3406 if (yymsg != yymsgbuf)
3411 #line 1224 "cp-name-parser.y"
3419 struct demangle_component *
3420 d_qualify (
struct demangle_component *lhs,
int qualifiers,
int is_method)
3422 struct demangle_component **inner_p;
3423 enum demangle_component_type
type;
3427 #define HANDLE_QUAL(TYPE, MTYPE, QUAL) \
3428 if ((qualifiers & QUAL) && (type != TYPE) && (type != MTYPE)) \
3430 *inner_p = fill_comp (is_method ? MTYPE : TYPE, \
3432 inner_p = &d_left (*inner_p); \
3433 type = (*inner_p)->type; \
3435 else if (type == TYPE || type == MTYPE) \
3437 inner_p = &d_left (*inner_p); \
3438 type = (*inner_p)->type; \
3443 type = (*inner_p)->type;
3454 static struct demangle_component *
3462 name =
"signed char";
3468 name =
"unsigned char";
3475 name =
"unsigned int";
3482 name =
"unsigned long";
3489 name =
"unsigned short";
3496 name =
"unsigned long long";
3507 static struct demangle_component *
3515 static struct demangle_component *
3516 d_binary (
const char *
name,
struct demangle_component *lhs,
struct demangle_component *rhs)
3519 fill_comp (DEMANGLE_COMPONENT_BINARY_ARGS, lhs, rhs));
3529 while (*p && (ISALNUM (*p) || *p ==
'_' || *p ==
'$' || *p ==
'.'))
3547 struct demangle_component *signed_type;
3548 struct demangle_component *unsigned_type;
3549 struct demangle_component *
type, *
name;
3550 enum demangle_component_type literal_type;
3554 literal_type = DEMANGLE_COMPONENT_LITERAL_NEG;
3559 literal_type = DEMANGLE_COMPONENT_LITERAL;
3572 c = TOLOWER (p[len - 1]);
3584 else if (ISDIGIT (c) || c ==
'.')
3602 if (p[len - 1] ==
'l' || p[len - 1] ==
'L')
3608 if (p[len - 1] ==
'u' || p[len - 1] ==
'U')
3622 else if (long_p == 1)
3634 type = unsigned_type;
3644 static char backslashable[] =
"abefnrtv";
3645 static char represented[] =
"\a\b\e\f\n\r\t\v";
3652 ix = strchr (backslashable, host_char);
3679 int c = *(*string_ptr)++;
3692 c = *(*string_ptr)++;
3703 target_char = target_char & 037;
3722 if (c >=
'0' && c <=
'7')
3740 #define HANDLE_SPECIAL(string, comp) \
3741 if (strncmp (tokstart, string, sizeof (string) - 1) == 0) \
3743 lexptr = tokstart + sizeof (string) - 1; \
3744 yylval.lval = comp; \
3745 return DEMANGLER_SPECIAL; \
3748 #define HANDLE_TOKEN2(string, token) \
3749 if (lexptr[1] == string[1]) \
3752 yylval.opname = string; \
3756 #define HANDLE_TOKEN3(string, token) \
3757 if (lexptr[1] == string[1] && lexptr[2] == string[2]) \
3760 yylval.opname = string; \
3771 const char *tokstart;
3777 switch (c = *tokstart)
3798 yyerror (
_(
"empty character constant"));
3805 yyerror (
_(
"invalid character constant"));
3815 make_name (tokstart, lexptr - tokstart));
3820 if (strncmp (tokstart,
"(anonymous namespace)", 21) == 0)
3824 sizeof "(anonymous namespace)" - 1);
3835 if (lexptr[1] ==
'.' && lexptr[2] ==
'.')
3842 if (lexptr[1] <
'0' || lexptr[1] >
'9')
3853 if (strncmp (tokstart,
"-in-", 4) == 0)
3859 if (lexptr[1] <
'0' || lexptr[1] >
'9')
3879 int got_dot = 0, got_e = 0, toktype;
3880 const char *p = tokstart;
3886 if (c ==
'0' && (p[1] ==
'x' || p[1] ==
'X'))
3891 else if (c ==
'0' && (p[1]==
't' || p[1]==
'T' || p[1]==
'd' || p[1]==
'D'))
3902 if (!hex && !got_e && (*p ==
'e' || *p ==
'E'))
3903 got_dot = got_e = 1;
3910 else if (!got_dot && *p ==
'.')
3912 else if (got_e && (p[-1] ==
'e' || p[-1] ==
'E')
3913 && (*p ==
'-' || *p ==
'+'))
3919 else if (! ISALNUM (*p))
3922 toktype =
parse_number (tokstart, p - tokstart, got_dot|got_e);
3923 if (toktype ==
ERROR)
3925 char *err_copy = (
char *) alloca (p - tokstart + 1);
3927 memcpy (err_copy, tokstart, p - tokstart);
3928 err_copy[p - tokstart] = 0;
4005 yyerror (
_(
"unexpected string literal"));
4009 if (!(c ==
'_' || c ==
'$' || ISALPHA (c)))
4019 c = tokstart[++namelen];
4020 while (ISALNUM (c) || c ==
'_' || c ==
'$');
4030 if (strncmp (tokstart,
"reinterpret_cast", 16) == 0)
4034 if (strncmp (tokstart,
"construction vtable for ", 24) == 0)
4036 lexptr = tokstart + 24;
4039 if (strncmp (tokstart,
"dynamic_cast", 12) == 0)
4043 if (strncmp (tokstart,
"static_cast", 11) == 0)
4047 HANDLE_SPECIAL (
"covariant return thunk to ", DEMANGLE_COMPONENT_COVARIANT_THUNK);
4048 HANDLE_SPECIAL (
"reference temporary for ", DEMANGLE_COMPONENT_REFTEMP);
4052 HANDLE_SPECIAL (
"typeinfo fn for ", DEMANGLE_COMPONENT_TYPEINFO_FN);
4053 HANDLE_SPECIAL (
"typeinfo name for ", DEMANGLE_COMPONENT_TYPEINFO_NAME);
4054 if (strncmp (tokstart,
"operator", 8) == 0)
4056 if (strncmp (tokstart,
"restrict", 8) == 0)
4058 if (strncmp (tokstart,
"unsigned", 8) == 0)
4060 if (strncmp (tokstart,
"template", 8) == 0)
4062 if (strncmp (tokstart,
"volatile", 8) == 0)
4066 HANDLE_SPECIAL (
"virtual thunk to ", DEMANGLE_COMPONENT_VIRTUAL_THUNK);
4067 if (strncmp (tokstart,
"wchar_t", 7) == 0)
4071 if (strncmp (tokstart,
"global constructors keyed to ", 29) == 0)
4074 lexptr = tokstart + 29;
4075 yylval.
lval = DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS;
4082 if (strncmp (tokstart,
"global destructors keyed to ", 28) == 0)
4085 lexptr = tokstart + 28;
4086 yylval.
lval = DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS;
4095 if (strncmp (tokstart,
"delete", 6) == 0)
4097 if (strncmp (tokstart,
"struct", 6) == 0)
4099 if (strncmp (tokstart,
"signed", 6) == 0)
4101 if (strncmp (tokstart,
"sizeof", 6) == 0)
4103 if (strncmp (tokstart,
"double", 6) == 0)
4107 HANDLE_SPECIAL (
"guard variable for ", DEMANGLE_COMPONENT_GUARD);
4108 if (strncmp (tokstart,
"false", 5) == 0)
4110 if (strncmp (tokstart,
"class", 5) == 0)
4112 if (strncmp (tokstart,
"union", 5) == 0)
4114 if (strncmp (tokstart,
"float", 5) == 0)
4116 if (strncmp (tokstart,
"short", 5) == 0)
4118 if (strncmp (tokstart,
"const", 5) == 0)
4122 if (strncmp (tokstart,
"void", 4) == 0)
4124 if (strncmp (tokstart,
"bool", 4) == 0)
4126 if (strncmp (tokstart,
"char", 4) == 0)
4128 if (strncmp (tokstart,
"enum", 4) == 0)
4130 if (strncmp (tokstart,
"long", 4) == 0)
4132 if (strncmp (tokstart,
"true", 4) == 0)
4137 HANDLE_SPECIAL (
"non-virtual thunk to ", DEMANGLE_COMPONENT_THUNK);
4138 if (strncmp (tokstart,
"new", 3) == 0)
4140 if (strncmp (tokstart,
"int", 3) == 0)
4158 global_errmsg = msg ? msg :
"parse error";
4165 static struct demangle_info *
4168 struct demangle_info *info =
xmalloc (
sizeof (
struct demangle_info));
4186 return cplus_demangle_print (DMGL_PARAMS | DMGL_ANSI, result, estimated_len,
4201 obstack_init (&info->
obstack);
4211 struct demangle_info *info = parse_info->
info;
4214 while (info != NULL)
4216 struct demangle_info *
next = info->
next;
4223 obstack_free (&parse_info->
obstack, NULL);
4242 struct demangle_component *target,
4246 struct demangle_info *di;
4249 *target = *src->
tree;
4251 while (di->
next != NULL)
4272 static char errbuf[60];
4275 prev_lexptr = lexptr = demangled_name;
4276 error_lexptr = NULL;
4277 global_errmsg = NULL;
4286 if (global_errmsg && errmsg)
4288 snprintf (errbuf,
sizeof (errbuf) - 2,
"%s, near `%s",
4289 global_errmsg, error_lexptr);
4290 strcat (errbuf,
"'");
4298 global_result = NULL;
4306 cp_print (
struct demangle_component *result)
4311 str = cplus_demangle_print (DMGL_PARAMS | DMGL_ANSI, result, 64, &err);
4315 fputs (str, stdout);
4321 trim_chars (
char *lexptr,
char **extra_chars)
4330 *extra_chars = p + 1;
4345 CONCAT2 (fr,ee) (ptr);
4358 fprintf (stderr,
"%s:%d: internal error: ", file, line);
4359 vfprintf (stderr, fmt, ap);
4364 main (
int argc,
char **argv)
4366 char *str2, *extra_chars =
"", c;
4373 if (argv[arg] && strcmp (argv[arg],
"--debug") == 0)
4379 if (argv[arg] == NULL)
4380 while (fgets (buf, 65536, stdin) != NULL)
4383 buf[strlen (buf) - 1] = 0;
4385 c = trim_chars (buf, &extra_chars);
4386 str2 = cplus_demangle (buf, DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE);
4389 printf (
"Demangling error\n");
4391 printf (
"%s%c%s\n", buf, c, extra_chars);
4393 printf (
"%s\n", buf);
4399 fputs (errmsg, stderr);
4400 fputc (
'\n', stderr);
4404 cp_print (result->
tree);
4411 fputs (extra_chars, stdout);
4420 fputs (errmsg, stderr);
4421 fputc (
'\n', stderr);
4424 cp_print (result->
tree);
static const yytype_uint16 yyrline[]
#define HANDLE_QUAL(TYPE, MTYPE, QUAL)
static int parse_number(const char *p, int len, int parsed_float)
static char backslashable[]
void cp_merge_demangle_parse_infos(struct demangle_parse_info *dest, struct demangle_component *target, struct demangle_parse_info *src)
#define CONSTRUCTION_VTABLE
struct demangle_component * start
static const yytype_uint8 yystos[]
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
struct YYSTYPE::@44 abstract
#define HANDLE_TOKEN3(string, token)
void internal_error(const char *file, int line, const char *fmt,...)
struct demangle_component * tree
static int c_parse_backslash(int host_char, int *target_char)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
static const char *const yytname[]
#define YYPRINT(FILE, TYPE, VALUE)
static const char * global_errmsg
struct demangle_component * last
static struct demangle_info * allocate_info(void)
struct demangle_component ** last
struct demangle_info * info
static struct demangle_component * global_result
mach_port_t kern_return_t mach_port_t msgports mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
static struct demangle_component * make_builtin_type(const char *name)
#define HANDLE_TOKEN2(string, token)
static const char * error_lexptr
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
static const yytype_int16 yypgoto[]
mach_port_t mach_port_t name mach_port_t mach_port_t name error_t err
static struct demangle_component * d_grab(void)
#define YY_REDUCE_PRINT(Rule)
struct demangle_component * comp
struct demangle_component comps[ALLOC_CHUNK]
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
struct demangle_parse_info * cp_demangled_name_to_comp(const char *demangled_name, const char **errmsg)
static const yytype_uint16 yytoknum[]
#define yypact_value_is_default(Yystate)
unsigned short int yytype_uint16
struct YYSTYPE::nested nested
#define yytable_value_is_error(Yytable_value)
unsigned char yytype_uint8
struct YYSTYPE::@43 nested1
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
static struct demangle_component * d_qualify(struct demangle_component *, int, int)
static struct demangle_component * d_int_type(int)
static struct demangle_component * fill_comp(enum demangle_component_type d_type, struct demangle_component *lhs, struct demangle_component *rhs)
char * cp_comp_to_string(struct demangle_component *result, int estimated_len)
static const yytype_int16 yydefgoto[]
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
static const yytype_uint8 yydefact[]
struct demangle_parse_info * cp_new_demangle_parse_info(void)
static const char * lexptr
#define YYSTACK_ALLOC_MAXIMUM
static struct demangle_component * make_name(const char *name, int len)
#define DEMANGLER_SPECIAL
#define YY_STACK_PRINT(Bottom, Top)
static struct demangle_component * make_dtor(enum gnu_v3_dtor_kinds kind, struct demangle_component *name)
struct demangle_info * next
struct demangle_component * comp
static struct demangle_component * make_empty(enum demangle_component_type d_type)
#define HANDLE_SPECIAL(string, comp)
static struct demangle_info * demangle_info
static const yytype_uint8 yytranslate[]
void cp_demangled_name_parse_free(struct demangle_parse_info *parse_info)
static struct demangle_component * d_binary(const char *, struct demangle_component *, struct demangle_component *)
static const char * symbol_end(const char *lexptr)
struct demangle_component ** last
static int cp_parse_escape(const char **string_ptr)
static struct demangle_component * d_unary(const char *, struct demangle_component *)
static const char * prev_lexptr
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
const ULONGEST const LONGEST len
static struct demangle_component * make_operator(const char *name, int args)
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)