GDB (xrefs)

/tmp/gdb-8.1/gdb/cp-name-parser.c
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0.4. */
2
3 /* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
29
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
32
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
35
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
42
43 /* Identify Bison output. */
44 #define YYBISON 1
45
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.4"
48
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51
52 /* Pure parsers. */
53 #define YYPURE 0
54
55 /* Push parsers. */
56 #define YYPUSH 0
57
58 /* Pull parsers. */
59 #define YYPULL 1
60
61
62
63
64 /* Copy the first part of user declarations. */
65 #line 30 "cp-name-parser.y" /* yacc.c:339 */
66
67
68 #include "defs.h"
69
70 #include <unistd.h>
71 #include "safe-ctype.h"
72 #include "demangle.h"
73 #include "cp-support.h"
74
75 /* Bison does not make it easy to create a parser without global
76 state, unfortunately. Here are all the global variables used
77 in this parser. */
78
79 /* LEXPTR is the current pointer into our lex buffer. PREV_LEXPTR
80 is the start of the last token lexed, only used for diagnostics.
81 ERROR_LEXPTR is the first place an error occurred. GLOBAL_ERRMSG
82 is the first error message encountered. */
83
84 static const char *lexptr, *prev_lexptr, *error_lexptr, *global_errmsg;
85
86 /* The components built by the parser are allocated ahead of time,
87 and cached in this structure. */
88
89 #define ALLOC_CHUNK 100
90
91 struct demangle_info {
92 int used;
93 struct demangle_info *next;
94 struct demangle_component comps[ALLOC_CHUNK];
95 };
96
97 static struct demangle_info *demangle_info;
98
99 static struct demangle_component *
100 d_grab (void)
101 {
102 struct demangle_info *more;
103
104 if (demangle_info->used >= ALLOC_CHUNK)
105 {
106 if (demangle_info->next == NULL)
107 {
108 more = XNEW (struct demangle_info);
109 more->next = NULL;
110 demangle_info->next = more;
111 }
112 else
113 more = demangle_info->next;
114
115 more->used = 0;
116 demangle_info = more;
117 }
118 return &demangle_info->comps[demangle_info->used++];
119 }
120
121 /* The parse tree created by the parser is stored here after a successful
122 parse. */
123
124 static struct demangle_component *global_result;
125
126 /* Prototypes for helper functions used when constructing the parse
127 tree. */
128
129 static struct demangle_component *d_qualify (struct demangle_component *, int,
130 int);
131
132 static struct demangle_component *d_int_type (int);
133
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 *);
139
140 /* Flags passed to d_qualify. */
141
142 #define QUAL_CONST 1
143 #define QUAL_RESTRICT 2
144 #define QUAL_VOLATILE 4
145
146 /* Flags passed to d_int_type. */
147
148 #define INT_CHAR (1 << 0)
149 #define INT_SHORT (1 << 1)
150 #define INT_LONG (1 << 2)
151 #define INT_LLONG (1 << 3)
152
153 #define INT_SIGNED (1 << 4)
154 #define INT_UNSIGNED (1 << 5)
155
156 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
157 as well as gratuitiously global symbol names, so we can have multiple
158 yacc generated parsers in gdb. Note that these are only the variables
159 produced by yacc. If other parser generators (bison, byacc, etc) produce
160 additional global names that conflict at link time, then those parser
161 generators need to be fixed instead of adding those names to this list. */
162
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
182 #define yys cpname_s
183 #define yy_yys cpname_yys
184 #define yystate cpname_state
185 #define yytmp cpname_tmp
186 #define yyv cpname_v
187 #define yy_yyv cpname_yyv
188 #define yyval cpname_val
189 #define yylloc cpname_lloc
190 #define yyreds cpname_reds /* With YYDEBUG defined */
191 #define yytoks cpname_toks /* With YYDEBUG defined */
192 #define yyname cpname_name /* With YYDEBUG defined */
193 #define yyrule cpname_rule /* With YYDEBUG defined */
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
209
210 int yyparse (void);
211 static int yylex (void);
212 static void yyerror (const char *);
213
214 /* Enable yydebug for the stand-alone parser. */
215 #ifdef TEST_CPNAMES
216 # define YYDEBUG 1
217 #endif
218
219 /* Helper functions. These wrap the demangler tree interface, handle
220 allocation from our global store, and return the allocated component. */
221
222 static struct demangle_component *
223 fill_comp (enum demangle_component_type d_type, struct demangle_component *lhs,
224 struct demangle_component *rhs)
225 {
226 struct demangle_component *ret = d_grab ();
227 int i;
228
229 i = cplus_demangle_fill_component (ret, d_type, lhs, rhs);
230 gdb_assert (i);
231
232 return ret;
233 }
234
235 static struct demangle_component *
236 make_operator (const char *name, int args)
237 {
238 struct demangle_component *ret = d_grab ();
239 int i;
240
241 i = cplus_demangle_fill_operator (ret, name, args);
242 gdb_assert (i);
243
244 return ret;
245 }
246
247 static struct demangle_component *
248 make_dtor (enum gnu_v3_dtor_kinds kind, struct demangle_component *name)
249 {
250 struct demangle_component *ret = d_grab ();
251 int i;
252
253 i = cplus_demangle_fill_dtor (ret, kind, name);
254 gdb_assert (i);
255
256 return ret;
257 }
258
259 static struct demangle_component *
260 make_builtin_type (const char *name)
261 {
262 struct demangle_component *ret = d_grab ();
263 int i;
264
265 i = cplus_demangle_fill_builtin_type (ret, name);
266 gdb_assert (i);
267
268 return ret;
269 }
270
271 static struct demangle_component *
272 make_name (const char *name, int len)
273 {
274 struct demangle_component *ret = d_grab ();
275 int i;
276
277 i = cplus_demangle_fill_name (ret, name, len);
278 gdb_assert (i);
279
280 return ret;
281 }
282
283 #define d_left(dc) (dc)->u.s_binary.left
284 #define d_right(dc) (dc)->u.s_binary.right
285
286
287 #line 288 "cp-name-parser.c" /* yacc.c:339 */
288
289 # ifndef YY_NULLPTRPTR
290 # if defined __cplusplus && 201103L <= __cplusplus
291 # define YY_NULLPTRPTR nullptr
292 # else
293 # define YY_NULLPTRPTR 0
294 # endif
295 # endif
296
297 /* Enabling verbose error messages. */
298 #ifdef YYERROR_VERBOSE
299 # undef YYERROR_VERBOSE
300 # define YYERROR_VERBOSE 1
301 #else
302 # define YYERROR_VERBOSE 0
303 #endif
304
305
306 /* Debug traces. */
307 #ifndef YYDEBUG
308 # define YYDEBUG 0
309 #endif
310 #if YYDEBUG
311 extern int yydebug;
312 #endif
313
314 /* Token type. */
315 #ifndef YYTOKENTYPE
316 # define YYTOKENTYPE
317 enum yytokentype
318 {
319 INT = 258,
320 FLOAT = 259,
321 NAME = 260,
322 STRUCT = 261,
323 CLASS = 262,
324 UNION = 263,
325 ENUM = 264,
326 SIZEOF = 265,
327 UNSIGNED = 266,
328 COLONCOLON = 267,
329 TEMPLATE = 268,
330 ERROR = 269,
331 NEW = 270,
332 DELETE = 271,
333 OPERATOR = 272,
334 STATIC_CAST = 273,
335 REINTERPRET_CAST = 274,
336 DYNAMIC_CAST = 275,
337 SIGNED_KEYWORD = 276,
338 LONG = 277,
339 SHORT = 278,
340 INT_KEYWORD = 279,
341 CONST_KEYWORD = 280,
342 VOLATILE_KEYWORD = 281,
343 DOUBLE_KEYWORD = 282,
344 BOOL = 283,
345 ELLIPSIS = 284,
346 RESTRICT = 285,
347 VOID = 286,
348 FLOAT_KEYWORD = 287,
349 CHAR = 288,
350 WCHAR_T = 289,
351 ASSIGN_MODIFY = 290,
352 TRUEKEYWORD = 291,
353 FALSEKEYWORD = 292,
354 DEMANGLER_SPECIAL = 293,
355 CONSTRUCTION_VTABLE = 294,
356 CONSTRUCTION_IN = 295,
357 OROR = 296,
358 ANDAND = 297,
359 EQUAL = 298,
360 NOTEQUAL = 299,
361 LEQ = 300,
362 GEQ = 301,
363 LSH = 302,
364 RSH = 303,
365 UNARY = 304,
366 INCREMENT = 305,
367 DECREMENT = 306,
368 ARROW = 307
369 };
370 #endif
371 /* Tokens. */
372 #define INT 258
373 #define FLOAT 259
374 #define NAME 260
375 #define STRUCT 261
376 #define CLASS 262
377 #define UNION 263
378 #define ENUM 264
379 #define SIZEOF 265
380 #define UNSIGNED 266
381 #define COLONCOLON 267
382 #define TEMPLATE 268
383 #define ERROR 269
384 #define NEW 270
385 #define DELETE 271
386 #define OPERATOR 272
387 #define STATIC_CAST 273
388 #define REINTERPRET_CAST 274
389 #define DYNAMIC_CAST 275
390 #define SIGNED_KEYWORD 276
391 #define LONG 277
392 #define SHORT 278
393 #define INT_KEYWORD 279
394 #define CONST_KEYWORD 280
395 #define VOLATILE_KEYWORD 281
396 #define DOUBLE_KEYWORD 282
397 #define BOOL 283
398 #define ELLIPSIS 284
399 #define RESTRICT 285
400 #define VOID 286
401 #define FLOAT_KEYWORD 287
402 #define CHAR 288
403 #define WCHAR_T 289
404 #define ASSIGN_MODIFY 290
405 #define TRUEKEYWORD 291
406 #define FALSEKEYWORD 292
407 #define DEMANGLER_SPECIAL 293
408 #define CONSTRUCTION_VTABLE 294
409 #define CONSTRUCTION_IN 295
410 #define OROR 296
411 #define ANDAND 297
412 #define EQUAL 298
413 #define NOTEQUAL 299
414 #define LEQ 300
415 #define GEQ 301
416 #define LSH 302
417 #define RSH 303
418 #define UNARY 304
419 #define INCREMENT 305
420 #define DECREMENT 306
421 #define ARROW 307
422
423 /* Value type. */
424 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
425
426 union YYSTYPE
427 {
428 #line 253 "cp-name-parser.y" /* yacc.c:355 */
429
430 struct demangle_component *comp;
431 struct nested {
432 struct demangle_component *comp;
433 struct demangle_component **last;
434 } nested;
435 struct {
436 struct demangle_component *comp, *last;
437 } nested1;
438 struct {
439 struct demangle_component *comp, **last;
440 struct nested fn;
441 struct demangle_component *start;
442 int fold_flag;
443 } abstract;
444 int lval;
445 const char *opname;
446
447
448 #line 449 "cp-name-parser.c" /* yacc.c:355 */
449 };
450
451 typedef union YYSTYPE YYSTYPE;
452 # define YYSTYPE_IS_TRIVIAL 1
453 # define YYSTYPE_IS_DECLARED 1
454 #endif
455
456
457 extern YYSTYPE yylval;
458
459 int yyparse (void);
460
461
462
463 /* Copy the second part of user declarations. */
464
465 #line 466 "cp-name-parser.c" /* yacc.c:358 */
466
467 #ifdef short
468 # undef short
469 #endif
470
471 #ifdef YYTYPE_UINT8
472 typedef YYTYPE_UINT8 yytype_uint8;
473 #else
474 typedef unsigned char yytype_uint8;
475 #endif
476
477 #ifdef YYTYPE_INT8
478 typedef YYTYPE_INT8 yytype_int8;
479 #else
480 typedef signed char yytype_int8;
481 #endif
482
483 #ifdef YYTYPE_UINT16
484 typedef YYTYPE_UINT16 yytype_uint16;
485 #else
486 typedef unsigned short int yytype_uint16;
487 #endif
488
489 #ifdef YYTYPE_INT16
490 typedef YYTYPE_INT16 yytype_int16;
491 #else
492 typedef short int yytype_int16;
493 #endif
494
495 #ifndef YYSIZE_T
496 # ifdef __SIZE_TYPE__
497 # define YYSIZE_T __SIZE_TYPE__
498 # elif defined size_t
499 # define YYSIZE_T size_t
500 # elif ! defined YYSIZE_T
501 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
502 # define YYSIZE_T size_t
503 # else
504 # define YYSIZE_T unsigned int
505 # endif
506 #endif
507
508 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
509
510 #ifndef YY_
511 # if defined YYENABLE_NLS && YYENABLE_NLS
512 # if ENABLE_NLS
513 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
514 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
515 # endif
516 # endif
517 # ifndef YY_
518 # define YY_(Msgid) Msgid
519 # endif
520 #endif
521
522 #ifndef YY_ATTRIBUTE
523 # if (defined __GNUC__ \
524 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
525 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
526 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
527 # else
528 # define YY_ATTRIBUTE(Spec) /* empty */
529 # endif
530 #endif
531
532 #ifndef YY_ATTRIBUTE_PURE
533 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
534 #endif
535
536 #ifndef YY_ATTRIBUTE_UNUSED
537 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
538 #endif
539
540 #if !defined _Noreturn \
541 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
542 # if defined _MSC_VER && 1200 <= _MSC_VER
543 # define _Noreturn __declspec (noreturn)
544 # else
545 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
546 # endif
547 #endif
548
549 /* Suppress unused-variable warnings by "using" E. */
550 #if ! defined lint || defined __GNUC__
551 # define YYUSE(E) ((void) (E))
552 #else
553 # define YYUSE(E) /* empty */
554 #endif
555
556 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
557 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
558 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
559 _Pragma ("GCC diagnostic push") \
560 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
561 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
562 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
563 _Pragma ("GCC diagnostic pop")
564 #else
565 # define YY_INITIAL_VALUE(Value) Value
566 #endif
567 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
568 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
569 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
570 #endif
571 #ifndef YY_INITIAL_VALUE
572 # define YY_INITIAL_VALUE(Value) /* Nothing. */
573 #endif
574
575
576 #if ! defined yyoverflow || YYERROR_VERBOSE
577
578 /* The parser invokes alloca or xmalloc; define the necessary symbols. */
579
580 # ifdef YYSTACK_USE_ALLOCA
581 # if YYSTACK_USE_ALLOCA
582 # ifdef __GNUC__
583 # define YYSTACK_ALLOC __builtin_alloca
584 # elif defined __BUILTIN_VA_ARG_INCR
585 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
586 # elif defined _AIX
587 # define YYSTACK_ALLOC __alloca
588 # elif defined _MSC_VER
589 # define alloca _alloca
590 # else
591 # define YYSTACK_ALLOC alloca
592 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
593 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
594 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
595 # ifndef EXIT_SUCCESS
596 # define EXIT_SUCCESS 0
597 # endif
598 # endif
599 # endif
600 # endif
601 # endif
602
603 # ifdef YYSTACK_ALLOC
604 /* Pacify GCC's 'empty if-body' warning. */
605 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
606 # ifndef YYSTACK_ALLOC_MAXIMUM
607 /* The OS might guarantee only one guard page at the bottom of the stack,
608 and a page size can be as small as 4096 bytes. So we cannot safely
609 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
610 to allow for a few compiler-allocated temporary stack slots. */
611 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
612 # endif
613 # else
614 # define YYSTACK_ALLOC YYMALLOC
615 # define YYSTACK_FREE YYFREE
616 # ifndef YYSTACK_ALLOC_MAXIMUM
617 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
618 # endif
619 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
620 && ! ((defined YYMALLOC || defined xmalloc) \
621 && (defined YYFREE || defined xfree)))
622 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
623 # ifndef EXIT_SUCCESS
624 # define EXIT_SUCCESS 0
625 # endif
626 # endif
627 # ifndef YYMALLOC
628 # define YYMALLOC xmalloc
629 # if ! defined xmalloc && ! defined EXIT_SUCCESS
630 void *xmalloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
631 # endif
632 # endif
633 # ifndef YYFREE
634 # define YYFREE xfree
635 # if ! defined xfree && ! defined EXIT_SUCCESS
636 void xfree (void *); /* INFRINGES ON USER NAME SPACE */
637 # endif
638 # endif
639 # endif
640 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
641
642
643 #if (! defined yyoverflow \
644 && (! defined __cplusplus \
645 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
646
647 /* A type that is properly aligned for any stack member. */
648 union yyalloc
649 {
650 yytype_int16 yyss_alloc;
651 YYSTYPE yyvs_alloc;
652 };
653
654 /* The size of the maximum gap between one aligned stack and the next. */
655 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
656
657 /* The size of an array large to enough to hold all stacks, each with
658 N elements. */
659 # define YYSTACK_BYTES(N) \
660 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
661 + YYSTACK_GAP_MAXIMUM)
662
663 # define YYCOPY_NEEDED 1
664
665 /* Relocate STACK from its old location to the new one. The
666 local variables YYSIZE and YYSTACKSIZE give the old and new number of
667 elements in the stack, and YYPTR gives the new location of the
668 stack. Advance YYPTR to a properly aligned location for the next
669 stack. */
670 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
671 do \
672 { \
673 YYSIZE_T yynewbytes; \
674 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
675 Stack = &yyptr->Stack_alloc; \
676 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
677 yyptr += yynewbytes / sizeof (*yyptr); \
678 } \
679 while (0)
680
681 #endif
682
683 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
684 /* Copy COUNT objects from SRC to DST. The source and destination do
685 not overlap. */
686 # ifndef YYCOPY
687 # if defined __GNUC__ && 1 < __GNUC__
688 # define YYCOPY(Dst, Src, Count) \
689 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
690 # else
691 # define YYCOPY(Dst, Src, Count) \
692 do \
693 { \
694 YYSIZE_T yyi; \
695 for (yyi = 0; yyi < (Count); yyi++) \
696 (Dst)[yyi] = (Src)[yyi]; \
697 } \
698 while (0)
699 # endif
700 # endif
701 #endif /* !YYCOPY_NEEDED */
702
703 /* YYFINAL -- State number of the termination state. */
704 #define YYFINAL 84
705 /* YYLAST -- Last index in YYTABLE. */
706 #define YYLAST 1137
707
708 /* YYNTOKENS -- Number of terminals. */
709 #define YYNTOKENS 75
710 /* YYNNTS -- Number of nonterminals. */
711 #define YYNNTS 40
712 /* YYNRULES -- Number of rules. */
713 #define YYNRULES 195
714 /* YYNSTATES -- Number of states. */
715 #define YYNSTATES 325
716
717 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
718 by yylex, with out-of-bounds checking. */
719 #define YYUNDEFTOK 2
720 #define YYMAXUTOK 307
721
722 #define YYTRANSLATE(YYX) \
723 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
724
725 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
726 as returned by yylex, without out-of-bounds checking. */
727 static const yytype_uint8 yytranslate[] =
728 {
729 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
730 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
731 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
732 2, 2, 2, 72, 2, 2, 2, 63, 49, 2,
733 73, 41, 61, 59, 42, 60, 68, 62, 2, 2,
734 2, 2, 2, 2, 2, 2, 2, 2, 74, 2,
735 52, 43, 53, 44, 58, 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, 69, 2, 70, 48, 2, 2, 2, 2, 2,
739 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
740 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
741 2, 2, 2, 2, 47, 2, 71, 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, 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, 1, 2, 3, 4,
755 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
756 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
757 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
758 35, 36, 37, 38, 39, 40, 45, 46, 50, 51,
759 54, 55, 56, 57, 64, 65, 66, 67
760 };
761
762 #if YYDEBUG
763 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
764 static const yytype_uint16 yyrline[] =
765 {
766 0, 367, 367, 371, 373, 375, 380, 381, 388, 397,
767 400, 404, 407, 426, 428, 432, 438, 444, 450, 456,
768 458, 460, 462, 464, 466, 468, 470, 472, 474, 476,
769 478, 480, 482, 484, 486, 488, 490, 492, 494, 496,
770 498, 500, 502, 504, 506, 508, 510, 512, 520, 525,
771 530, 534, 539, 547, 548, 550, 562, 563, 569, 571,
772 572, 574, 577, 578, 581, 582, 586, 588, 591, 595,
773 600, 604, 613, 617, 620, 631, 632, 636, 638, 640,
774 643, 647, 652, 657, 663, 673, 677, 681, 689, 690,
775 693, 695, 697, 701, 702, 709, 711, 713, 715, 717,
776 719, 723, 724, 728, 730, 732, 734, 736, 738, 740,
777 744, 749, 752, 755, 761, 769, 771, 785, 787, 788,
778 790, 793, 795, 796, 798, 801, 803, 805, 807, 812,
779 815, 820, 827, 831, 842, 848, 866, 869, 877, 879,
780 890, 897, 898, 904, 908, 912, 914, 919, 924, 936,
781 940, 944, 952, 957, 966, 970, 975, 980, 984, 990,
782 996, 999, 1006, 1008, 1013, 1017, 1021, 1028, 1044, 1051,
783 1058, 1077, 1081, 1085, 1089, 1093, 1097, 1101, 1105, 1109,
784 1113, 1117, 1121, 1125, 1129, 1133, 1137, 1141, 1146, 1150,
785 1154, 1161, 1165, 1168, 1177, 1186
786 };
787 #endif
788
789 #if YYDEBUG || YYERROR_VERBOSE || 0
790 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
791 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
792 static const char *const yytname[] =
793 {
794 "$end", "error", "$undefined", "INT", "FLOAT", "NAME", "STRUCT",
795 "CLASS", "UNION", "ENUM", "SIZEOF", "UNSIGNED", "COLONCOLON", "TEMPLATE",
796 "ERROR", "NEW", "DELETE", "OPERATOR", "STATIC_CAST", "REINTERPRET_CAST",
797 "DYNAMIC_CAST", "SIGNED_KEYWORD", "LONG", "SHORT", "INT_KEYWORD",
798 "CONST_KEYWORD", "VOLATILE_KEYWORD", "DOUBLE_KEYWORD", "BOOL",
799 "ELLIPSIS", "RESTRICT", "VOID", "FLOAT_KEYWORD", "CHAR", "WCHAR_T",
800 "ASSIGN_MODIFY", "TRUEKEYWORD", "FALSEKEYWORD", "DEMANGLER_SPECIAL",
801 "CONSTRUCTION_VTABLE", "CONSTRUCTION_IN", "')'", "','", "'='", "'?'",
802 "OROR", "ANDAND", "'|'", "'^'", "'&'", "EQUAL", "NOTEQUAL", "'<'", "'>'",
803 "LEQ", "GEQ", "LSH", "RSH", "'@'", "'+'", "'-'", "'*'", "'/'", "'%'",
804 "UNARY", "INCREMENT", "DECREMENT", "ARROW", "'.'", "'['", "']'", "'~'",
805 "'!'", "'('", "':'", "$accept", "result", "start", "start_opt",
806 "function", "demangler_special", "oper", "conversion_op",
807 "conversion_op_name", "unqualified_name", "colon_name", "name",
808 "colon_ext_name", "colon_ext_only", "ext_only_name", "nested_name",
809 "templ", "template_params", "template_arg", "function_args",
810 "function_arglist", "qualifiers_opt", "qualifier", "qualifiers",
811 "int_part", "int_seq", "builtin_type", "ptr_operator", "array_indicator",
812 "typespec_2", "abstract_declarator", "direct_abstract_declarator",
813 "abstract_declarator_fn", "type", "declarator", "direct_declarator",
814 "declarator_1", "direct_declarator_1", "exp", "exp1", YY_NULLPTRPTR
815 };
816 #endif
817
818 # ifdef YYPRINT
819 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
820 (internal) symbol number NUM (which must be that of a token). */
821 static const yytype_uint16 yytoknum[] =
822 {
823 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
824 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
825 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
826 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
827 295, 41, 44, 61, 63, 296, 297, 124, 94, 38,
828 298, 299, 60, 62, 300, 301, 302, 303, 64, 43,
829 45, 42, 47, 37, 304, 305, 306, 307, 46, 91,
830 93, 126, 33, 40, 58
831 };
832 # endif
833
834 #define YYPACT_NINF -187
835
836 #define yypact_value_is_default(Yystate) \
837 (!!((Yystate) == (-187)))
838
839 #define YYTABLE_NINF -1
840
841 #define yytable_value_is_error(Yytable_value) \
842 0
843
844 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
845 STATE-NUM. */
846 static const yytype_int16 yypact[] =
847 {
848 833, 39, -187, 42, 540, -187, -12, -187, -187, -187,
849 -187, -187, -187, -187, -187, -187, -187, -187, 833, 833,
850 27, 41, -187, -187, -187, 5, -187, 710, -187, 36,
851 -5, -187, 43, 65, 36, 506, -187, 120, 36, 711,
852 -187, -187, 329, -187, 36, -187, 43, 73, 16, 21,
853 -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
854 -187, -187, -187, -187, -187, -187, -187, -187, -187, -187,
855 -187, -187, -187, 34, 30, -187, -187, 64, 115, -187,
856 -187, -187, 83, -187, -187, 329, 39, 833, -187, -187,
857 36, 6, 603, -187, 12, 65, 98, 750, -187, -49,
858 -187, -187, 857, 98, 70, -187, -187, 124, -187, -187,
859 73, 36, 36, -187, -187, -187, 48, 860, 603, -187,
860 -187, -49, -187, 23, 98, 720, -187, -49, -187, -49,
861 -187, -187, 53, 80, 87, 95, -187, -187, 656, 476,
862 476, 476, 428, 10, -187, 780, 325, -187, -187, 79,
863 82, -187, -187, -187, 833, 22, -187, 28, -187, -187,
864 89, -187, 73, 116, 36, 780, 37, 114, 780, 780,
865 123, 70, 36, 124, 833, -187, 161, -187, 166, -187,
866 -187, -187, -187, 36, -187, -187, -187, 50, 729, 168,
867 -187, -187, 780, -187, -187, -187, 169, -187, 979, 979,
868 979, 979, 833, -187, 105, 105, 105, 680, 780, 142,
869 970, 143, 329, -187, -187, 476, 476, 476, 476, 476,
870 476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
871 476, 476, 476, 180, 181, -187, -187, -187, -187, 36,
872 -187, 45, 36, -187, 36, 949, -187, -187, -187, 51,
873 833, -187, 729, -187, 729, 148, -49, 833, 833, 152,
874 138, 141, 144, 154, 833, -187, 476, 476, -187, -187,
875 890, 993, 1015, 1036, 1056, 359, 753, 753, 1069, 1069,
876 1069, 241, 241, 178, 178, 105, 105, 105, -187, -187,
877 -187, -187, -187, -187, 780, -187, 157, -187, -187, -187,
878 -187, -187, -187, -187, 126, 128, 131, -187, 164, 105,
879 325, 476, -187, -187, 471, 471, 471, -187, 325, 188,
880 189, 192, -187, -187, -187
881 };
882
883 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
884 Performed when YYTABLE does not specify something else to do. Zero
885 means the default is an error. */
886 static const yytype_uint8 yydefact[] =
887 {
888 0, 59, 97, 0, 0, 96, 99, 100, 95, 92,
889 91, 105, 107, 90, 109, 104, 98, 108, 0, 0,
890 0, 0, 2, 5, 4, 53, 50, 6, 67, 122,
891 0, 64, 0, 61, 93, 0, 101, 103, 118, 141,
892 3, 68, 0, 52, 126, 65, 0, 0, 15, 16,
893 32, 43, 29, 40, 39, 26, 24, 25, 35, 36,
894 30, 31, 37, 38, 33, 34, 19, 20, 21, 22,
895 23, 41, 42, 45, 0, 27, 28, 0, 0, 48,
896 106, 13, 0, 55, 1, 0, 0, 0, 112, 111,
897 88, 0, 0, 11, 0, 0, 6, 136, 135, 138,
898 12, 121, 0, 6, 58, 49, 66, 60, 70, 94,
899 0, 124, 120, 99, 102, 117, 0, 0, 0, 62,
900 56, 150, 63, 0, 6, 129, 142, 131, 8, 151,
901 191, 192, 0, 0, 0, 0, 194, 195, 0, 0,
902 0, 0, 0, 0, 73, 75, 79, 125, 51, 0,
903 0, 44, 47, 46, 0, 0, 7, 0, 110, 89,
904 0, 115, 0, 109, 88, 0, 0, 0, 129, 80,
905 0, 0, 88, 0, 0, 140, 0, 137, 133, 134,
906 10, 69, 71, 128, 123, 119, 57, 0, 129, 157,
907 158, 9, 0, 130, 149, 133, 155, 156, 0, 0,
908 0, 0, 0, 77, 164, 166, 165, 0, 141, 0,
909 160, 0, 0, 72, 76, 0, 0, 0, 0, 0,
910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
911 0, 0, 0, 0, 0, 17, 18, 14, 54, 88,
912 116, 0, 88, 87, 88, 0, 81, 132, 113, 0,
913 0, 127, 0, 148, 129, 0, 144, 0, 0, 0,
914 0, 0, 0, 0, 0, 162, 0, 0, 159, 74,
915 0, 187, 186, 185, 184, 183, 178, 179, 182, 180,
916 181, 176, 177, 174, 175, 171, 172, 173, 188, 189,
917 114, 86, 85, 84, 82, 139, 0, 143, 154, 146,
918 147, 152, 153, 193, 0, 0, 0, 78, 0, 167,
919 161, 0, 83, 145, 0, 0, 0, 163, 190, 0,
920 0, 0, 168, 170, 169
921 };
922
923 /* YYPGOTO[NTERM-NUM]. */
924 static const yytype_int16 yypgoto[] =
925 {
926 -187, -187, 25, -66, -187, -187, -187, 3, -187, -20,
927 -187, -1, -32, 15, 1, 0, 150, 149, 31, -187,
928 -25, -156, -187, 234, 205, -187, 213, -17, -98, 196,
929 -18, -16, 158, -129, -106, -187, 134, -187, -6, -186
930 };
931
932 /* YYDEFGOTO[NTERM-NUM]. */
933 static const yytype_int16 yydefgoto[] =
934 {
935 -1, 21, 156, 93, 23, 24, 25, 26, 27, 28,
936 119, 29, 253, 30, 31, 78, 33, 143, 144, 167,
937 96, 158, 34, 35, 36, 37, 38, 168, 98, 39,
938 170, 127, 100, 40, 255, 256, 128, 129, 210, 211
939 };
940
941 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
942 positive, shift that token. If negative, reduce the rule whose
943 number is the opposite. If YYTABLE_NINF, syntax error. */
944 static const yytype_uint16 yytable[] =
945 {
946 32, 179, 44, 46, 45, 103, 43, 121, 243, 160,
947 97, 99, 106, 209, 124, 80, 248, 171, 32, 32,
948 91, 126, 125, 190, 102, 22, 106, 94, 104, 179,
949 175, 197, 83, 104, 111, 105, 146, 180, 120, 123,
950 117, 84, 104, 81, 82, 4, 44, 1, 104, 148,
951 104, 41, 212, 1, 122, 104, 171, 85, 191, 4,
952 4, 9, 10, 213, 212, 117, 13, 117, 102, 259,
953 260, 261, 262, 172, 178, 238, 161, 108, 1, 146,
954 97, 99, 181, 290, 172, 149, 291, 157, 292, 239,
955 150, 42, 166, 121, 20, 151, 189, 94, 172, 20,
956 152, 188, 195, 106, 196, 153, 239, 193, 125, 183,
957 174, 239, 239, 20, 20, 186, 187, 45, 166, 20,
958 104, 20, 42, 154, 120, 123, 198, 214, 319, 320,
959 321, 2, 199, 204, 205, 206, 182, 106, 32, 200,
960 122, 5, 113, 7, 8, 94, 296, 201, 297, 235,
961 193, 246, 236, 16, 32, 244, 245, 242, 300, 240,
962 105, 44, 241, 203, 247, 94, 86, 106, 94, 94,
963 193, 254, 233, 234, 32, 188, 249, 95, 250, 237,
964 257, 258, 107, 266, 268, 288, 289, 120, 123, 298,
965 126, 304, 94, 303, 305, 307, 107, 306, 313, 314,
966 79, 315, 32, 122, 316, 317, 146, 32, 94, 270,
967 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
968 281, 282, 283, 284, 285, 286, 287, 263, 107, 322,
969 323, 299, 265, 324, 155, 254, 193, 254, 145, 230,
970 231, 232, 114, 269, 173, 233, 234, 95, 112, 0,
971 32, 120, 123, 120, 123, 177, 0, 32, 32, 194,
972 309, 310, 0, 101, 32, 0, 0, 122, 109, 122,
973 0, 0, 115, 107, 0, 295, 312, 0, 147, 0,
974 0, 145, 301, 302, 0, 0, 0, 0, 169, 308,
975 0, 0, 0, 0, 94, 95, 0, 0, 169, 0,
976 228, 229, 230, 231, 232, 318, 0, 107, 233, 234,
977 0, 0, 0, 0, 169, 95, 107, 0, 95, 95,
978 0, 0, 0, 0, 159, 0, 95, 0, 0, 0,
979 0, 0, 130, 131, 1, 0, 0, 107, 208, 132,
980 2, 47, 95, 0, 0, 184, 185, 133, 134, 135,
981 5, 6, 7, 8, 9, 10, 11, 12, 95, 13,
982 14, 15, 16, 17, 0, 136, 137, 0, 0, 215,
983 216, 217, 218, 219, 220, 221, 222, 223, 138, 224,
984 225, 226, 227, 0, 228, 229, 230, 231, 232, 139,
985 0, 107, 233, 234, 208, 208, 208, 208, 159, 173,
986 140, 141, 142, 0, 0, 0, 159, 0, 145, 221,
987 222, 223, 0, 224, 225, 226, 227, 251, 228, 229,
988 230, 231, 232, 0, 0, 0, 233, 234, 0, 0,
989 0, 130, 131, 1, 0, 0, 0, 0, 132, 2,
990 47, 294, 0, 0, 95, 0, 133, 134, 135, 5,
991 6, 7, 8, 9, 10, 11, 12, 0, 13, 14,
992 15, 16, 17, 0, 136, 137, 0, 0, 0, 0,
993 0, 0, 0, 159, 130, 131, 159, 207, 159, 130,
994 131, 132, 0, 0, 0, 0, 132, 0, 139, 133,
995 134, 135, 0, 0, 133, 134, 135, 0, 0, 140,
996 141, 142, 0, 0, 0, 0, 0, 136, 137, 0,
997 0, 1, 136, 137, 0, 0, 0, 2, 110, 0,
998 207, 0, 0, 0, 0, 0, 0, 5, 6, 7,
999 8, 139, 0, 11, 12, 0, 139, 14, 15, 16,
1000 17, 0, 140, 141, 142, 1, 0, 140, 141, 142,
1001 0, 2, 47, 0, 0, 48, 49, 0, 0, 0,
1002 0, 5, 6, 7, 8, 9, 10, 11, 12, 0,
1003 13, 14, 15, 16, 17, 50, 0, 0, 0, 0,
1004 0, 0, 51, 52, 0, 53, 54, 55, 56, 57,
1005 58, 59, 60, 61, 62, 63, 64, 65, 0, 66,
1006 67, 68, 69, 70, 0, 71, 72, 73, 1, 74,
1007 0, 75, 76, 77, 2, 162, 0, 0, 0, 0,
1008 0, 0, 0, 0, 5, 6, 7, 8, 9, 10,
1009 11, 12, 0, 13, 163, 15, 16, 17, 0, 0,
1010 0, 0, 0, 0, 164, 0, 0, 0, 0, 88,
1011 0, 0, 89, 0, 0, 0, 0, 0, 0, 0,
1012 0, 1, 0, 0, 90, 0, 0, 2, 3, 0,
1013 0, 0, 91, 4, 0, 0, 165, 5, 6, 7,
1014 8, 9, 10, 11, 12, 1, 13, 14, 15, 16,
1015 17, 2, 3, 0, 18, 19, 0, 4, 0, 0,
1016 0, 5, 6, 7, 8, 9, 10, 11, 12, 0,
1017 13, 14, 15, 16, 17, 86, 1, 0, 18, 19,
1018 0, 0, 87, 116, 0, 1, 0, 20, 117, 202,
1019 0, 0, 116, 0, 1, 0, 0, 117, 0, 0,
1020 0, 116, 0, 0, 0, 0, 117, 0, 0, 0,
1021 0, 20, 0, 264, 0, 86, 88, 88, 0, 89,
1022 89, 0, 176, 0, 0, 0, 88, 0, 0, 89,
1023 0, 90, 90, 0, 0, 88, 0, 0, 89, 91,
1024 91, 90, 20, 92, 118, 86, 0, 0, 0, 91,
1025 90, 20, 176, 192, 0, 0, 88, 0, 91, 89,
1026 20, 0, 252, 0, 0, 223, 0, 224, 225, 226,
1027 227, 90, 228, 229, 230, 231, 232, 0, 0, 91,
1028 233, 234, 0, 92, 0, 0, 88, 0, 0, 89,
1029 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
1030 0, 90, 0, 0, 2, 3, 0, 0, 0, 91,
1031 4, 0, 0, 165, 5, 6, 7, 8, 9, 10,
1032 11, 12, 1, 13, 14, 15, 16, 17, 2, 47,
1033 0, 18, 19, 0, 0, 48, 49, 0, 5, 6,
1034 7, 8, 9, 10, 11, 12, 0, 13, 163, 15,
1035 16, 17, 0, 0, 0, 50, 0, 0, 164, 0,
1036 0, 0, 51, 52, 20, 53, 54, 55, 56, 57,
1037 58, 59, 60, 61, 62, 63, 64, 65, 0, 66,
1038 67, 68, 69, 70, 0, 71, 72, 73, 0, 74,
1039 0, 75, 76, 77, 215, 216, 217, 218, 219, 220,
1040 221, 222, 223, 0, 224, 225, 226, 227, 0, 228,
1041 229, 230, 231, 232, 1, 0, 0, 233, 234, 0,
1042 2, 47, 0, 0, 311, 0, 0, 0, 0, 0,
1043 5, 6, 7, 8, 9, 10, 11, 12, 293, 13,
1044 14, 15, 16, 17, 1, 0, 0, 0, 0, 0,
1045 2, 47, 0, 0, 0, 0, 0, 0, 0, 0,
1046 5, 6, 7, 8, 9, 10, 11, 12, 0, 13,
1047 14, 15, 16, 17, 215, 216, 217, 218, 219, 220,
1048 221, 222, 223, 267, 224, 225, 226, 227, 0, 228,
1049 229, 230, 231, 232, 0, 0, 0, 233, 234, 217,
1050 218, 219, 220, 221, 222, 223, 0, 224, 225, 226,
1051 227, 0, 228, 229, 230, 231, 232, 0, 0, 0,
1052 233, 234, 218, 219, 220, 221, 222, 223, 0, 224,
1053 225, 226, 227, 0, 228, 229, 230, 231, 232, 0,
1054 0, 0, 233, 234, 219, 220, 221, 222, 223, 0,
1055 224, 225, 226, 227, 0, 228, 229, 230, 231, 232,
1056 0, 0, 0, 233, 234, 220, 221, 222, 223, 0,
1057 224, 225, 226, 227, 0, 228, 229, 230, 231, 232,
1058 0, 0, 0, 233, 234, 226, 227, 0, 228, 229,
1059 230, 231, 232, 0, 0, 0, 233, 234
1060 };
1061
1062 static const yytype_int16 yycheck[] =
1063 {
1064 0, 99, 3, 3, 3, 30, 3, 39, 164, 3,
1065 27, 27, 32, 142, 39, 27, 172, 5, 18, 19,
1066 69, 39, 39, 121, 73, 0, 46, 27, 5, 127,
1067 96, 129, 5, 5, 35, 32, 42, 103, 39, 39,
1068 17, 0, 5, 18, 19, 17, 47, 5, 5, 46,
1069 5, 12, 42, 5, 39, 5, 5, 52, 124, 17,
1070 17, 25, 26, 53, 42, 17, 30, 17, 73, 198,
1071 199, 200, 201, 61, 99, 53, 70, 12, 5, 85,
1072 97, 97, 12, 239, 61, 69, 242, 87, 244, 61,
1073 69, 52, 92, 125, 71, 61, 121, 97, 61, 71,
1074 70, 118, 127, 123, 129, 41, 61, 125, 125, 110,
1075 12, 61, 61, 71, 71, 116, 116, 116, 118, 71,
1076 5, 71, 52, 40, 125, 125, 73, 145, 314, 315,
1077 316, 11, 52, 139, 140, 141, 12, 157, 138, 52,
1078 125, 21, 22, 23, 24, 145, 252, 52, 254, 70,
1079 168, 169, 70, 33, 154, 41, 42, 41, 256, 70,
1080 157, 162, 162, 138, 41, 165, 5, 187, 168, 169,
1081 188, 188, 67, 68, 174, 192, 176, 27, 12, 154,
1082 12, 12, 32, 41, 41, 5, 5, 188, 188, 41,
1083 208, 53, 192, 41, 53, 41, 46, 53, 41, 73,
1084 4, 73, 202, 188, 73, 41, 212, 207, 208, 215,
1085 216, 217, 218, 219, 220, 221, 222, 223, 224, 225,
1086 226, 227, 228, 229, 230, 231, 232, 202, 78, 41,
1087 41, 256, 207, 41, 85, 252, 254, 254, 42, 61,
1088 62, 63, 37, 212, 94, 67, 68, 97, 35, -1,
1089 250, 252, 252, 254, 254, 97, -1, 257, 258, 125,
1090 266, 267, -1, 29, 264, -1, -1, 252, 34, 254,
1091 -1, -1, 38, 123, -1, 250, 294, -1, 44, -1,
1092 -1, 85, 257, 258, -1, -1, -1, -1, 92, 264,
1093 -1, -1, -1, -1, 294, 145, -1, -1, 102, -1,
1094 59, 60, 61, 62, 63, 311, -1, 157, 67, 68,
1095 -1, -1, -1, -1, 118, 165, 166, -1, 168, 169,
1096 -1, -1, -1, -1, 90, -1, 176, -1, -1, -1,
1097 -1, -1, 3, 4, 5, -1, -1, 187, 142, 10,
1098 11, 12, 192, -1, -1, 111, 112, 18, 19, 20,
1099 21, 22, 23, 24, 25, 26, 27, 28, 208, 30,
1100 31, 32, 33, 34, -1, 36, 37, -1, -1, 44,
1101 45, 46, 47, 48, 49, 50, 51, 52, 49, 54,
1102 55, 56, 57, -1, 59, 60, 61, 62, 63, 60,
1103 -1, 241, 67, 68, 198, 199, 200, 201, 164, 249,
1104 71, 72, 73, -1, -1, -1, 172, -1, 212, 50,
1105 51, 52, -1, 54, 55, 56, 57, 183, 59, 60,
1106 61, 62, 63, -1, -1, -1, 67, 68, -1, -1,
1107 -1, 3, 4, 5, -1, -1, -1, -1, 10, 11,
1108 12, 245, -1, -1, 294, -1, 18, 19, 20, 21,
1109 22, 23, 24, 25, 26, 27, 28, -1, 30, 31,
1110 32, 33, 34, -1, 36, 37, -1, -1, -1, -1,
1111 -1, -1, -1, 239, 3, 4, 242, 49, 244, 3,
1112 4, 10, -1, -1, -1, -1, 10, -1, 60, 18,
1113 19, 20, -1, -1, 18, 19, 20, -1, -1, 71,
1114 72, 73, -1, -1, -1, -1, -1, 36, 37, -1,
1115 -1, 5, 36, 37, -1, -1, -1, 11, 12, -1,
1116 49, -1, -1, -1, -1, -1, -1, 21, 22, 23,
1117 24, 60, -1, 27, 28, -1, 60, 31, 32, 33,
1118 34, -1, 71, 72, 73, 5, -1, 71, 72, 73,
1119 -1, 11, 12, -1, -1, 15, 16, -1, -1, -1,
1120 -1, 21, 22, 23, 24, 25, 26, 27, 28, -1,
1121 30, 31, 32, 33, 34, 35, -1, -1, -1, -1,
1122 -1, -1, 42, 43, -1, 45, 46, 47, 48, 49,
1123 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
1124 60, 61, 62, 63, -1, 65, 66, 67, 5, 69,
1125 -1, 71, 72, 73, 11, 12, -1, -1, -1, -1,
1126 -1, -1, -1, -1, 21, 22, 23, 24, 25, 26,
1127 27, 28, -1, 30, 31, 32, 33, 34, -1, -1,
1128 -1, -1, -1, -1, 41, -1, -1, -1, -1, 46,
1129 -1, -1, 49, -1, -1, -1, -1, -1, -1, -1,
1130 -1, 5, -1, -1, 61, -1, -1, 11, 12, -1,
1131 -1, -1, 69, 17, -1, -1, 73, 21, 22, 23,
1132 24, 25, 26, 27, 28, 5, 30, 31, 32, 33,
1133 34, 11, 12, -1, 38, 39, -1, 17, -1, -1,
1134 -1, 21, 22, 23, 24, 25, 26, 27, 28, -1,
1135 30, 31, 32, 33, 34, 5, 5, -1, 38, 39,
1136 -1, -1, 12, 12, -1, 5, -1, 71, 17, 73,
1137 -1, -1, 12, -1, 5, -1, -1, 17, -1, -1,
1138 -1, 12, -1, -1, -1, -1, 17, -1, -1, -1,
1139 -1, 71, -1, 73, -1, 5, 46, 46, -1, 49,
1140 49, -1, 12, -1, -1, -1, 46, -1, -1, 49,
1141 -1, 61, 61, -1, -1, 46, -1, -1, 49, 69,
1142 69, 61, 71, 73, 73, 5, -1, -1, -1, 69,
1143 61, 71, 12, 73, -1, -1, 46, -1, 69, 49,
1144 71, -1, 73, -1, -1, 52, -1, 54, 55, 56,
1145 57, 61, 59, 60, 61, 62, 63, -1, -1, 69,
1146 67, 68, -1, 73, -1, -1, 46, -1, -1, 49,
1147 -1, -1, -1, -1, -1, -1, -1, -1, 5, -1,
1148 -1, 61, -1, -1, 11, 12, -1, -1, -1, 69,
1149 17, -1, -1, 73, 21, 22, 23, 24, 25, 26,
1150 27, 28, 5, 30, 31, 32, 33, 34, 11, 12,
1151 -1, 38, 39, -1, -1, 15, 16, -1, 21, 22,
1152 23, 24, 25, 26, 27, 28, -1, 30, 31, 32,
1153 33, 34, -1, -1, -1, 35, -1, -1, 41, -1,
1154 -1, -1, 42, 43, 71, 45, 46, 47, 48, 49,
1155 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
1156 60, 61, 62, 63, -1, 65, 66, 67, -1, 69,
1157 -1, 71, 72, 73, 44, 45, 46, 47, 48, 49,
1158 50, 51, 52, -1, 54, 55, 56, 57, -1, 59,
1159 60, 61, 62, 63, 5, -1, -1, 67, 68, -1,
1160 11, 12, -1, -1, 74, -1, -1, -1, -1, -1,
1161 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1162 31, 32, 33, 34, 5, -1, -1, -1, -1, -1,
1163 11, 12, -1, -1, -1, -1, -1, -1, -1, -1,
1164 21, 22, 23, 24, 25, 26, 27, 28, -1, 30,
1165 31, 32, 33, 34, 44, 45, 46, 47, 48, 49,
1166 50, 51, 52, 53, 54, 55, 56, 57, -1, 59,
1167 60, 61, 62, 63, -1, -1, -1, 67, 68, 46,
1168 47, 48, 49, 50, 51, 52, -1, 54, 55, 56,
1169 57, -1, 59, 60, 61, 62, 63, -1, -1, -1,
1170 67, 68, 47, 48, 49, 50, 51, 52, -1, 54,
1171 55, 56, 57, -1, 59, 60, 61, 62, 63, -1,
1172 -1, -1, 67, 68, 48, 49, 50, 51, 52, -1,
1173 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
1174 -1, -1, -1, 67, 68, 49, 50, 51, 52, -1,
1175 54, 55, 56, 57, -1, 59, 60, 61, 62, 63,
1176 -1, -1, -1, 67, 68, 56, 57, -1, 59, 60,
1177 61, 62, 63, -1, -1, -1, 67, 68
1178 };
1179
1180 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1181 symbol of state STATE-NUM. */
1182 static const yytype_uint8 yystos[] =
1183 {
1184 0, 5, 11, 12, 17, 21, 22, 23, 24, 25,
1185 26, 27, 28, 30, 31, 32, 33, 34, 38, 39,
1186 71, 76, 77, 79, 80, 81, 82, 83, 84, 86,
1187 88, 89, 90, 91, 97, 98, 99, 100, 101, 104,
1188 108, 12, 52, 82, 86, 89, 90, 12, 15, 16,
1189 35, 42, 43, 45, 46, 47, 48, 49, 50, 51,
1190 52, 53, 54, 55, 56, 57, 59, 60, 61, 62,
1191 63, 65, 66, 67, 69, 71, 72, 73, 90, 104,
1192 27, 77, 77, 5, 0, 52, 5, 12, 46, 49,
1193 61, 69, 73, 78, 90, 91, 95, 102, 103, 106,
1194 107, 98, 73, 95, 5, 82, 84, 91, 12, 98,
1195 12, 86, 101, 22, 99, 98, 12, 17, 73, 85,
1196 86, 87, 88, 90, 95, 102, 105, 106, 111, 112,
1197 3, 4, 10, 18, 19, 20, 36, 37, 49, 60,
1198 71, 72, 73, 92, 93, 104, 113, 98, 82, 69,
1199 69, 61, 70, 41, 40, 92, 77, 90, 96, 98,
1200 3, 70, 12, 31, 41, 73, 90, 94, 102, 104,
1201 105, 5, 61, 91, 12, 78, 12, 107, 95, 103,
1202 78, 12, 12, 86, 98, 98, 86, 90, 102, 95,
1203 103, 78, 73, 105, 111, 95, 95, 103, 73, 52,
1204 52, 52, 73, 77, 113, 113, 113, 49, 104, 108,
1205 113, 114, 42, 53, 105, 44, 45, 46, 47, 48,
1206 49, 50, 51, 52, 54, 55, 56, 57, 59, 60,
1207 61, 62, 63, 67, 68, 70, 70, 77, 53, 61,
1208 70, 90, 41, 96, 41, 42, 105, 41, 96, 90,
1209 12, 98, 73, 87, 102, 109, 110, 12, 12, 108,
1210 108, 108, 108, 77, 73, 77, 41, 53, 41, 93,
1211 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1212 113, 113, 113, 113, 113, 113, 113, 113, 5, 5,
1213 96, 96, 96, 29, 104, 77, 109, 109, 41, 95,
1214 103, 77, 77, 41, 53, 53, 53, 41, 77, 113,
1215 113, 74, 105, 41, 73, 73, 73, 41, 113, 114,
1216 114, 114, 41, 41, 41
1217 };
1218
1219 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1220 static const yytype_uint8 yyr1[] =
1221 {
1222 0, 75, 76, 77, 77, 77, 78, 78, 79, 79,
1223 79, 79, 79, 80, 80, 81, 81, 81, 81, 81,
1224 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
1225 81, 81, 81, 81, 81, 81, 81, 81, 81, 81,
1226 81, 81, 81, 81, 81, 81, 81, 81, 82, 83,
1227 83, 83, 83, 84, 84, 84, 85, 85, 86, 86,
1228 86, 86, 87, 87, 88, 88, 89, 89, 90, 90,
1229 90, 90, 91, 92, 92, 93, 93, 93, 93, 93,
1230 94, 94, 94, 94, 94, 95, 95, 95, 96, 96,
1231 97, 97, 97, 98, 98, 99, 99, 99, 99, 99,
1232 99, 100, 100, 101, 101, 101, 101, 101, 101, 101,
1233 102, 102, 102, 102, 102, 103, 103, 104, 104, 104,
1234 104, 104, 104, 104, 104, 104, 104, 104, 104, 105,
1235 105, 105, 106, 106, 106, 106, 107, 107, 107, 107,
1236 107, 108, 108, 109, 109, 110, 110, 110, 110, 111,
1237 111, 111, 111, 111, 112, 112, 112, 112, 112, 113,
1238 114, 114, 114, 114, 113, 113, 113, 113, 113, 113,
1239 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1240 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
1241 113, 113, 113, 113, 113, 113
1242 };
1243
1244 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1245 static const yytype_uint8 yyr2[] =
1246 {
1247 0, 2, 1, 1, 1, 1, 0, 2, 2, 3,
1248 3, 2, 2, 2, 4, 2, 2, 4, 4, 2,
1249 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1250 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1251 2, 2, 2, 2, 3, 2, 3, 3, 2, 2,
1252 1, 3, 2, 1, 4, 2, 1, 2, 2, 1,
1253 2, 1, 1, 1, 1, 2, 2, 1, 2, 3,
1254 2, 3, 4, 1, 3, 1, 2, 2, 4, 1,
1255 1, 2, 3, 4, 3, 4, 4, 3, 0, 1,
1256 1, 1, 1, 1, 2, 1, 1, 1, 1, 1,
1257 1, 1, 2, 1, 1, 1, 2, 1, 1, 1,
1258 2, 1, 1, 3, 4, 2, 3, 2, 1, 3,
1259 2, 2, 1, 3, 2, 3, 2, 4, 3, 1,
1260 2, 1, 3, 2, 2, 1, 1, 2, 1, 4,
1261 2, 1, 2, 2, 1, 3, 2, 2, 1, 2,
1262 1, 1, 4, 4, 4, 2, 2, 2, 2, 3,
1263 1, 3, 2, 4, 2, 2, 2, 4, 7, 7,
1264 7, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1265 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1266 5, 1, 1, 4, 1, 1
1267 };
1268
1269
1270 #define yyerrok (yyerrstatus = 0)
1271 #define yyclearin (yychar = YYEMPTY)
1272 #define YYEMPTY (-2)
1273 #define YYEOF 0
1274
1275 #define YYACCEPT goto yyacceptlab
1276 #define YYABORT goto yyabortlab
1277 #define YYERROR goto yyerrorlab
1278
1279
1280 #define YYRECOVERING() (!!yyerrstatus)
1281
1282 #define YYBACKUP(Token, Value) \
1283 do \
1284 if (yychar == YYEMPTY) \
1285 { \
1286 yychar = (Token); \
1287 yylval = (Value); \
1288 YYPOPSTACK (yylen); \
1289 yystate = *yyssp; \
1290 goto yybackup; \
1291 } \
1292 else \
1293 { \
1294 yyerror (YY_("syntax error: cannot back up")); \
1295 YYERROR; \
1296 } \
1297 while (0)
1298
1299 /* Error token number */
1300 #define YYTERROR 1
1301 #define YYERRCODE 256
1302
1303
1304
1305 /* Enable debugging if requested. */
1306 #if YYDEBUG
1307
1308 # ifndef YYFPRINTF
1309 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1310 # define YYFPRINTF fprintf
1311 # endif
1312
1313 # define YYDPRINTF(Args) \
1314 do { \
1315 if (yydebug) \
1316 YYFPRINTF Args; \
1317 } while (0)
1318
1319 /* This macro is provided for backward compatibility. */
1320 #ifndef YY_LOCATION_PRINT
1321 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1322 #endif
1323
1324
1325 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1326 do { \
1327 if (yydebug) \
1328 { \
1329 YYFPRINTF (stderr, "%s ", Title); \
1330 yy_symbol_print (stderr, \
1331 Type, Value); \
1332 YYFPRINTF (stderr, "\n"); \
1333 } \
1334 } while (0)
1335
1336
1337 /*----------------------------------------.
1338 | Print this symbol's value on YYOUTPUT. |
1339 `----------------------------------------*/
1340
1341 static void
1342 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1343 {
1344 FILE *yyo = yyoutput;
1345 YYUSE (yyo);
1346 if (!yyvaluep)
1347 return;
1348 # ifdef YYPRINT
1349 if (yytype < YYNTOKENS)
1350 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1351 # endif
1352 YYUSE (yytype);
1353 }
1354
1355
1356 /*--------------------------------.
1357 | Print this symbol on YYOUTPUT. |
1358 `--------------------------------*/
1359
1360 static void
1361 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1362 {
1363 YYFPRINTF (yyoutput, "%s %s (",
1364 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1365
1366 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1367 YYFPRINTF (yyoutput, ")");
1368 }
1369
1370 /*------------------------------------------------------------------.
1371 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1372 | TOP (included). |
1373 `------------------------------------------------------------------*/
1374
1375 static void
1376 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1377 {
1378 YYFPRINTF (stderr, "Stack now");
1379 for (; yybottom <= yytop; yybottom++)
1380 {
1381 int yybot = *yybottom;
1382 YYFPRINTF (stderr, " %d", yybot);
1383 }
1384 YYFPRINTF (stderr, "\n");
1385 }
1386
1387 # define YY_STACK_PRINT(Bottom, Top) \
1388 do { \
1389 if (yydebug) \
1390 yy_stack_print ((Bottom), (Top)); \
1391 } while (0)
1392
1393
1394 /*------------------------------------------------.
1395 | Report that the YYRULE is going to be reduced. |
1396 `------------------------------------------------*/
1397
1398 static void
1399 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
1400 {
1401 unsigned long int yylno = yyrline[yyrule];
1402 int yynrhs = yyr2[yyrule];
1403 int yyi;
1404 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1405 yyrule - 1, yylno);
1406 /* The symbols being reduced. */
1407 for (yyi = 0; yyi < yynrhs; yyi++)
1408 {
1409 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1410 yy_symbol_print (stderr,
1411 yystos[yyssp[yyi + 1 - yynrhs]],
1412 &(yyvsp[(yyi + 1) - (yynrhs)])
1413 );
1414 YYFPRINTF (stderr, "\n");
1415 }
1416 }
1417
1418 # define YY_REDUCE_PRINT(Rule) \
1419 do { \
1420 if (yydebug) \
1421 yy_reduce_print (yyssp, yyvsp, Rule); \
1422 } while (0)
1423
1424 /* Nonzero means print parse trace. It is left uninitialized so that
1425 multiple parsers can coexist. */
1426 int yydebug;
1427 #else /* !YYDEBUG */
1428 # define YYDPRINTF(Args)
1429 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1430 # define YY_STACK_PRINT(Bottom, Top)
1431 # define YY_REDUCE_PRINT(Rule)
1432 #endif /* !YYDEBUG */
1433
1434
1435 /* YYINITDEPTH -- initial size of the parser's stacks. */
1436 #ifndef YYINITDEPTH
1437 # define YYINITDEPTH 200
1438 #endif
1439
1440 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1441 if the built-in stack extension method is used).
1442
1443 Do not make this value too large; the results are undefined if
1444 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1445 evaluated with infinite-precision integer arithmetic. */
1446
1447 #ifndef YYMAXDEPTH
1448 # define YYMAXDEPTH 10000
1449 #endif
1450
1451
1452 #if YYERROR_VERBOSE
1453
1454 # ifndef yystrlen
1455 # if defined __GLIBC__ && defined _STRING_H
1456 # define yystrlen strlen
1457 # else
1458 /* Return the length of YYSTR. */
1459 static YYSIZE_T
1460 yystrlen (const char *yystr)
1461 {
1462 YYSIZE_T yylen;
1463 for (yylen = 0; yystr[yylen]; yylen++)
1464 continue;
1465 return yylen;
1466 }
1467 # endif
1468 # endif
1469
1470 # ifndef yystpcpy
1471 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1472 # define yystpcpy stpcpy
1473 # else
1474 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1475 YYDEST. */
1476 static char *
1477 yystpcpy (char *yydest, const char *yysrc)
1478 {
1479 char *yyd = yydest;
1480 const char *yys = yysrc;
1481
1482 while ((*yyd++ = *yys++) != '\0')
1483 continue;
1484
1485 return yyd - 1;
1486 }
1487 # endif
1488 # endif
1489
1490 # ifndef yytnamerr
1491 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1492 quotes and backslashes, so that it's suitable for yyerror. The
1493 heuristic is that double-quoting is unnecessary unless the string
1494 contains an apostrophe, a comma, or backslash (other than
1495 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1496 null, do not copy; instead, return the length of what the result
1497 would have been. */
1498 static YYSIZE_T
1499 yytnamerr (char *yyres, const char *yystr)
1500 {
1501 if (*yystr == '"')
1502 {
1503 YYSIZE_T yyn = 0;
1504 char const *yyp = yystr;
1505
1506 for (;;)
1507 switch (*++yyp)
1508 {
1509 case '\'':
1510 case ',':
1511 goto do_not_strip_quotes;
1512
1513 case '\\':
1514 if (*++yyp != '\\')
1515 goto do_not_strip_quotes;
1516 /* Fall through. */
1517 default:
1518 if (yyres)
1519 yyres[yyn] = *yyp;
1520 yyn++;
1521 break;
1522
1523 case '"':
1524 if (yyres)
1525 yyres[yyn] = '\0';
1526 return yyn;
1527 }
1528 do_not_strip_quotes: ;
1529 }
1530
1531 if (! yyres)
1532 return yystrlen (yystr);
1533
1534 return yystpcpy (yyres, yystr) - yyres;
1535 }
1536 # endif
1537
1538 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1539 about the unexpected token YYTOKEN for the state stack whose top is
1540 YYSSP.
1541
1542 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1543 not large enough to hold the message. In that case, also set
1544 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1545 required number of bytes is too large to store. */
1546 static int
1547 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1548 yytype_int16 *yyssp, int yytoken)
1549 {
1550 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTRPTR, yytname[yytoken]);
1551 YYSIZE_T yysize = yysize0;
1552 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1553 /* Internationalized format string. */
1554 const char *yyformat = YY_NULLPTRPTR;
1555 /* Arguments of yyformat. */
1556 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1557 /* Number of reported tokens (one for the "unexpected", one per
1558 "expected"). */
1559 int yycount = 0;
1560
1561 /* There are many possibilities here to consider:
1562 - If this state is a consistent state with a default action, then
1563 the only way this function was invoked is if the default action
1564 is an error action. In that case, don't check for expected
1565 tokens because there are none.
1566 - The only way there can be no lookahead present (in yychar) is if
1567 this state is a consistent state with a default action. Thus,
1568 detecting the absence of a lookahead is sufficient to determine
1569 that there is no unexpected or expected token to report. In that
1570 case, just report a simple "syntax error".
1571 - Don't assume there isn't a lookahead just because this state is a
1572 consistent state with a default action. There might have been a
1573 previous inconsistent state, consistent state with a non-default
1574 action, or user semantic action that manipulated yychar.
1575 - Of course, the expected token list depends on states to have
1576 correct lookahead information, and it depends on the parser not
1577 to perform extra reductions after fetching a lookahead from the
1578 scanner and before detecting a syntax error. Thus, state merging
1579 (from LALR or IELR) and default reductions corrupt the expected
1580 token list. However, the list is correct for canonical LR with
1581 one exception: it will still contain any token that will not be
1582 accepted due to an error action in a later state.
1583 */
1584 if (yytoken != YYEMPTY)
1585 {
1586 int yyn = yypact[*yyssp];
1587 yyarg[yycount++] = yytname[yytoken];
1588 if (!yypact_value_is_default (yyn))
1589 {
1590 /* Start YYX at -YYN if negative to avoid negative indexes in
1591 YYCHECK. In other words, skip the first -YYN actions for
1592 this state because they are default actions. */
1593 int yyxbegin = yyn < 0 ? -yyn : 0;
1594 /* Stay within bounds of both yycheck and yytname. */
1595 int yychecklim = YYLAST - yyn + 1;
1596 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1597 int yyx;
1598
1599 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1600 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1601 && !yytable_value_is_error (yytable[yyx + yyn]))
1602 {
1603 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1604 {
1605 yycount = 1;
1606 yysize = yysize0;
1607 break;
1608 }
1609 yyarg[yycount++] = yytname[yyx];
1610 {
1611 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTRPTR, yytname[yyx]);
1612 if (! (yysize <= yysize1
1613 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1614 return 2;
1615 yysize = yysize1;
1616 }
1617 }
1618 }
1619 }
1620
1621 switch (yycount)
1622 {
1623 # define YYCASE_(N, S) \
1624 case N: \
1625 yyformat = S; \
1626 break
1627 YYCASE_(0, YY_("syntax error"));
1628 YYCASE_(1, YY_("syntax error, unexpected %s"));
1629 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1630 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1631 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1632 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1633 # undef YYCASE_
1634 }
1635
1636 {
1637 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1638 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1639 return 2;
1640 yysize = yysize1;
1641 }
1642
1643 if (*yymsg_alloc < yysize)
1644 {
1645 *yymsg_alloc = 2 * yysize;
1646 if (! (yysize <= *yymsg_alloc
1647 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1648 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1649 return 1;
1650 }
1651
1652 /* Avoid sprintf, as that infringes on the user's name space.
1653 Don't have undefined behavior even if the translation
1654 produced a string with the wrong number of "%s"s. */
1655 {
1656 char *yyp = *yymsg;
1657 int yyi = 0;
1658 while ((*yyp = *yyformat) != '\0')
1659 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1660 {
1661 yyp += yytnamerr (yyp, yyarg[yyi++]);
1662 yyformat += 2;
1663 }
1664 else
1665 {
1666 yyp++;
1667 yyformat++;
1668 }
1669 }
1670 return 0;
1671 }
1672 #endif /* YYERROR_VERBOSE */
1673
1674 /*-----------------------------------------------.
1675 | Release the memory associated to this symbol. |
1676 `-----------------------------------------------*/
1677
1678 static void
1679 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1680 {
1681 YYUSE (yyvaluep);
1682 if (!yymsg)
1683 yymsg = "Deleting";
1684 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1685
1686 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1687 YYUSE (yytype);
1688 YY_IGNORE_MAYBE_UNINITIALIZED_END
1689 }
1690
1691
1692
1693
1694 /* The lookahead symbol. */
1695 int yychar;
1696
1697 /* The semantic value of the lookahead symbol. */
1698 YYSTYPE yylval;
1699 /* Number of syntax errors so far. */
1700 int yynerrs;
1701
1702
1703 /*----------.
1704 | yyparse. |
1705 `----------*/
1706
1707 int
1708 yyparse (void)
1709 {
1710 int yystate;
1711 /* Number of tokens to shift before error messages enabled. */
1712 int yyerrstatus;
1713
1714 /* The stacks and their tools:
1715 'yyss': related to states.
1716 'yyvs': related to semantic values.
1717
1718 Refer to the stacks through separate pointers, to allow yyoverflow
1719 to xreallocate them elsewhere. */
1720
1721 /* The state stack. */
1722 yytype_int16 yyssa[YYINITDEPTH];
1723 yytype_int16 *yyss;
1724 yytype_int16 *yyssp;
1725
1726 /* The semantic value stack. */
1727 YYSTYPE yyvsa[YYINITDEPTH];
1728 YYSTYPE *yyvs;
1729 YYSTYPE *yyvsp;
1730
1731 YYSIZE_T yystacksize;
1732
1733 int yyn;
1734 int yyresult;
1735 /* Lookahead token as an internal (translated) token number. */
1736 int yytoken = 0;
1737 /* The variables used to return semantic value and location from the
1738 action routines. */
1739 YYSTYPE yyval;
1740
1741 #if YYERROR_VERBOSE
1742 /* Buffer for error messages, and its allocated size. */
1743 char yymsgbuf[128];
1744 char *yymsg = yymsgbuf;
1745 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1746 #endif
1747
1748 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1749
1750 /* The number of symbols on the RHS of the reduced rule.
1751 Keep to zero when no symbol should be popped. */
1752 int yylen = 0;
1753
1754 yyssp = yyss = yyssa;
1755 yyvsp = yyvs = yyvsa;
1756 yystacksize = YYINITDEPTH;
1757
1758 YYDPRINTF ((stderr, "Starting parse\n"));
1759
1760 yystate = 0;
1761 yyerrstatus = 0;
1762 yynerrs = 0;
1763 yychar = YYEMPTY; /* Cause a token to be read. */
1764 goto yysetstate;
1765
1766 /*------------------------------------------------------------.
1767 | yynewstate -- Push a new state, which is found in yystate. |
1768 `------------------------------------------------------------*/
1769 yynewstate:
1770 /* In all cases, when you get here, the value and location stacks
1771 have just been pushed. So pushing a state here evens the stacks. */
1772 yyssp++;
1773
1774 yysetstate:
1775 *yyssp = yystate;
1776
1777 if (yyss + yystacksize - 1 <= yyssp)
1778 {
1779 /* Get the current used size of the three stacks, in elements. */
1780 YYSIZE_T yysize = yyssp - yyss + 1;
1781
1782 #ifdef yyoverflow
1783 {
1784 /* Give user a chance to xreallocate the stack. Use copies of
1785 these so that the &'s don't force the real ones into
1786 memory. */
1787 YYSTYPE *yyvs1 = yyvs;
1788 yytype_int16 *yyss1 = yyss;
1789
1790 /* Each stack pointer address is followed by the size of the
1791 data in use in that stack, in bytes. This used to be a
1792 conditional around just the two extra args, but that might
1793 be undefined if yyoverflow is a macro. */
1794 yyoverflow (YY_("memory exhausted"),
1795 &yyss1, yysize * sizeof (*yyssp),
1796 &yyvs1, yysize * sizeof (*yyvsp),
1797 &yystacksize);
1798
1799 yyss = yyss1;
1800 yyvs = yyvs1;
1801 }
1802 #else /* no yyoverflow */
1803 # ifndef YYSTACK_RELOCATE
1804 goto yyexhaustedlab;
1805 # else
1806 /* Extend the stack our own way. */
1807 if (YYMAXDEPTH <= yystacksize)
1808 goto yyexhaustedlab;
1809 yystacksize *= 2;
1810 if (YYMAXDEPTH < yystacksize)
1811 yystacksize = YYMAXDEPTH;
1812
1813 {
1814 yytype_int16 *yyss1 = yyss;
1815 union yyalloc *yyptr =
1816 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1817 if (! yyptr)
1818 goto yyexhaustedlab;
1819 YYSTACK_RELOCATE (yyss_alloc, yyss);
1820 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1821 # undef YYSTACK_RELOCATE
1822 if (yyss1 != yyssa)
1823 YYSTACK_FREE (yyss1);
1824 }
1825 # endif
1826 #endif /* no yyoverflow */
1827
1828 yyssp = yyss + yysize - 1;
1829 yyvsp = yyvs + yysize - 1;
1830
1831 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1832 (unsigned long int) yystacksize));
1833
1834 if (yyss + yystacksize - 1 <= yyssp)
1835 YYABORT;
1836 }
1837
1838 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1839
1840 if (yystate == YYFINAL)
1841 YYACCEPT;
1842
1843 goto yybackup;
1844
1845 /*-----------.
1846 | yybackup. |
1847 `-----------*/
1848 yybackup:
1849
1850 /* Do appropriate processing given the current state. Read a
1851 lookahead token if we need one and don't already have one. */
1852
1853 /* First try to decide what to do without reference to lookahead token. */
1854 yyn = yypact[yystate];
1855 if (yypact_value_is_default (yyn))
1856 goto yydefault;
1857
1858 /* Not known => get a lookahead token if don't already have one. */
1859
1860 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1861 if (yychar == YYEMPTY)
1862 {
1863 YYDPRINTF ((stderr, "Reading a token: "));
1864 yychar = yylex ();
1865 }
1866
1867 if (yychar <= YYEOF)
1868 {
1869 yychar = yytoken = YYEOF;
1870 YYDPRINTF ((stderr, "Now at end of input.\n"));
1871 }
1872 else
1873 {
1874 yytoken = YYTRANSLATE (yychar);
1875 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1876 }
1877
1878 /* If the proper action on seeing token YYTOKEN is to reduce or to
1879 detect an error, take that action. */
1880 yyn += yytoken;
1881 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1882 goto yydefault;
1883 yyn = yytable[yyn];
1884 if (yyn <= 0)
1885 {
1886 if (yytable_value_is_error (yyn))
1887 goto yyerrlab;
1888 yyn = -yyn;
1889 goto yyreduce;
1890 }
1891
1892 /* Count tokens shifted since error; after three, turn off error
1893 status. */
1894 if (yyerrstatus)
1895 yyerrstatus--;
1896
1897 /* Shift the lookahead token. */
1898 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1899
1900 /* Discard the shifted token. */
1901 yychar = YYEMPTY;
1902
1903 yystate = yyn;
1904 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1905 *++yyvsp = yylval;
1906 YY_IGNORE_MAYBE_UNINITIALIZED_END
1907
1908 goto yynewstate;
1909
1910
1911 /*-----------------------------------------------------------.
1912 | yydefault -- do the default action for the current state. |
1913 `-----------------------------------------------------------*/
1914 yydefault:
1915 yyn = yydefact[yystate];
1916 if (yyn == 0)
1917 goto yyerrlab;
1918 goto yyreduce;
1919
1920
1921 /*-----------------------------.
1922 | yyreduce -- Do a reduction. |
1923 `-----------------------------*/
1924 yyreduce:
1925 /* yyn is the number of a rule to reduce with. */
1926 yylen = yyr2[yyn];
1927
1928 /* If YYLEN is nonzero, implement the default value of the action:
1929 '$$ = $1'.
1930
1931 Otherwise, the following line sets YYVAL to garbage.
1932 This behavior is undocumented and Bison
1933 users should not rely upon it. Assigning to YYVAL
1934 unconditionally makes the parser a bit smaller, and it avoids a
1935 GCC warning that YYVAL may be used uninitialized. */
1936 yyval = yyvsp[1-yylen];
1937
1938
1939 YY_REDUCE_PRINT (yyn);
1940 switch (yyn)
1941 {
1942 case 2:
1943 #line 368 "cp-name-parser.y" /* yacc.c:1646 */
1944 { global_result = (yyvsp[0].comp); }
1945 #line 1947 "cp-name-parser.c" /* yacc.c:1646 */
1946 break;
1947
1948 case 6:
1949 #line 380 "cp-name-parser.y" /* yacc.c:1646 */
1950 { (yyval.comp) = NULL; }
1951 #line 1953 "cp-name-parser.c" /* yacc.c:1646 */
1952 break;
1953
1954 case 7:
1955 #line 382 "cp-name-parser.y" /* yacc.c:1646 */
1956 { (yyval.comp) = (yyvsp[0].comp); }
1957 #line 1959 "cp-name-parser.c" /* yacc.c:1646 */
1958 break;
1959
1960 case 8:
1961 #line 389 "cp-name-parser.y" /* yacc.c:1646 */
1962 { (yyval.comp) = (yyvsp[0].nested).comp;
1963 *(yyvsp[0].nested).last = (yyvsp[-1].comp);
1964 }
1965 #line 1967 "cp-name-parser.c" /* yacc.c:1646 */
1966 break;
1967
1968 case 9:
1969 #line 398 "cp-name-parser.y" /* yacc.c:1646 */
1970 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-2].comp), (yyvsp[-1].nested).comp);
1971 if ((yyvsp[0].comp)) (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.comp), (yyvsp[0].comp)); }
1972 #line 1974 "cp-name-parser.c" /* yacc.c:1646 */
1973 break;
1974
1975 case 10:
1976 #line 401 "cp-name-parser.y" /* yacc.c:1646 */
1977 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-2].comp), (yyvsp[-1].nested).comp);
1978 if ((yyvsp[0].comp)) (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.comp), (yyvsp[0].comp)); }
1979 #line 1981 "cp-name-parser.c" /* yacc.c:1646 */
1980 break;
1981
1982 case 11:
1983 #line 405 "cp-name-parser.y" /* yacc.c:1646 */
1984 { (yyval.comp) = (yyvsp[-1].nested).comp;
1985 if ((yyvsp[0].comp)) (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.comp), (yyvsp[0].comp)); }
1986 #line 1988 "cp-name-parser.c" /* yacc.c:1646 */
1987 break;
1988
1989 case 12:
1990 #line 408 "cp-name-parser.y" /* yacc.c:1646 */
1991 { if ((yyvsp[0].abstract).last)
1992 {
1993 /* First complete the abstract_declarator's type using
1994 the typespec from the conversion_op_name. */
1995 *(yyvsp[0].abstract).last = *(yyvsp[-1].nested).last;
1996 /* Then complete the conversion_op_name with the type. */
1997 *(yyvsp[-1].nested).last = (yyvsp[0].abstract).comp;
1998 }
1999 /* If we have an arglist, build a function type. */
2000 if ((yyvsp[0].abstract).fn.comp)
2001 (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-1].nested).comp, (yyvsp[0].abstract).fn.comp);
2002 else
2003 (yyval.comp) = (yyvsp[-1].nested).comp;
2004 if ((yyvsp[0].abstract).start) (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.comp), (yyvsp[0].abstract).start);
2005 }
2006 #line 2008 "cp-name-parser.c" /* yacc.c:1646 */
2007 break;
2008
2009 case 13:
2010 #line 427 "cp-name-parser.y" /* yacc.c:1646 */
2011 { (yyval.comp) = fill_comp ((enum demangle_component_type) (yyvsp[-1].lval), (yyvsp[0].comp), NULL); }
2012 #line 2014 "cp-name-parser.c" /* yacc.c:1646 */
2013 break;
2014
2015 case 14:
2016 #line 429 "cp-name-parser.y" /* yacc.c:1646 */
2017 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE, (yyvsp[-2].comp), (yyvsp[0].comp)); }
2018 #line 2020 "cp-name-parser.c" /* yacc.c:1646 */
2019 break;
2020
2021 case 15:
2022 #line 433 "cp-name-parser.y" /* yacc.c:1646 */
2023 {
2024 /* Match the whitespacing of cplus_demangle_operators.
2025 It would abort on unrecognized string otherwise. */
2026 (yyval.comp) = make_operator ("new", 3);
2027 }
2028 #line 2030 "cp-name-parser.c" /* yacc.c:1646 */
2029 break;
2030
2031 case 16:
2032 #line 439 "cp-name-parser.y" /* yacc.c:1646 */
2033 {
2034 /* Match the whitespacing of cplus_demangle_operators.
2035 It would abort on unrecognized string otherwise. */
2036 (yyval.comp) = make_operator ("delete ", 1);
2037 }
2038 #line 2040 "cp-name-parser.c" /* yacc.c:1646 */
2039 break;
2040
2041 case 17:
2042 #line 445 "cp-name-parser.y" /* yacc.c:1646 */
2043 {
2044 /* Match the whitespacing of cplus_demangle_operators.
2045 It would abort on unrecognized string otherwise. */
2046 (yyval.comp) = make_operator ("new[]", 3);
2047 }
2048 #line 2050 "cp-name-parser.c" /* yacc.c:1646 */
2049 break;
2050
2051 case 18:
2052 #line 451 "cp-name-parser.y" /* yacc.c:1646 */
2053 {
2054 /* Match the whitespacing of cplus_demangle_operators.
2055 It would abort on unrecognized string otherwise. */
2056 (yyval.comp) = make_operator ("delete[] ", 1);
2057 }
2058 #line 2060 "cp-name-parser.c" /* yacc.c:1646 */
2059 break;
2060
2061 case 19:
2062 #line 457 "cp-name-parser.y" /* yacc.c:1646 */
2063 { (yyval.comp) = make_operator ("+", 2); }
2064 #line 2066 "cp-name-parser.c" /* yacc.c:1646 */
2065 break;
2066
2067 case 20:
2068 #line 459 "cp-name-parser.y" /* yacc.c:1646 */
2069 { (yyval.comp) = make_operator ("-", 2); }
2070 #line 2072 "cp-name-parser.c" /* yacc.c:1646 */
2071 break;
2072
2073 case 21:
2074 #line 461 "cp-name-parser.y" /* yacc.c:1646 */
2075 { (yyval.comp) = make_operator ("*", 2); }
2076 #line 2078 "cp-name-parser.c" /* yacc.c:1646 */
2077 break;
2078
2079 case 22:
2080 #line 463 "cp-name-parser.y" /* yacc.c:1646 */
2081 { (yyval.comp) = make_operator ("/", 2); }
2082 #line 2084 "cp-name-parser.c" /* yacc.c:1646 */
2083 break;
2084
2085 case 23:
2086 #line 465 "cp-name-parser.y" /* yacc.c:1646 */
2087 { (yyval.comp) = make_operator ("%", 2); }
2088 #line 2090 "cp-name-parser.c" /* yacc.c:1646 */
2089 break;
2090
2091 case 24:
2092 #line 467 "cp-name-parser.y" /* yacc.c:1646 */
2093 { (yyval.comp) = make_operator ("^", 2); }
2094 #line 2096 "cp-name-parser.c" /* yacc.c:1646 */
2095 break;
2096
2097 case 25:
2098 #line 469 "cp-name-parser.y" /* yacc.c:1646 */
2099 { (yyval.comp) = make_operator ("&", 2); }
2100 #line 2102 "cp-name-parser.c" /* yacc.c:1646 */
2101 break;
2102
2103 case 26:
2104 #line 471 "cp-name-parser.y" /* yacc.c:1646 */
2105 { (yyval.comp) = make_operator ("|", 2); }
2106 #line 2108 "cp-name-parser.c" /* yacc.c:1646 */
2107 break;
2108
2109 case 27:
2110 #line 473 "cp-name-parser.y" /* yacc.c:1646 */
2111 { (yyval.comp) = make_operator ("~", 1); }
2112 #line 2114 "cp-name-parser.c" /* yacc.c:1646 */
2113 break;
2114
2115 case 28:
2116 #line 475 "cp-name-parser.y" /* yacc.c:1646 */
2117 { (yyval.comp) = make_operator ("!", 1); }
2118 #line 2120 "cp-name-parser.c" /* yacc.c:1646 */
2119 break;
2120
2121 case 29:
2122 #line 477 "cp-name-parser.y" /* yacc.c:1646 */
2123 { (yyval.comp) = make_operator ("=", 2); }
2124 #line 2126 "cp-name-parser.c" /* yacc.c:1646 */
2125 break;
2126
2127 case 30:
2128 #line 479 "cp-name-parser.y" /* yacc.c:1646 */
2129 { (yyval.comp) = make_operator ("<", 2); }
2130 #line 2132 "cp-name-parser.c" /* yacc.c:1646 */
2131 break;
2132
2133 case 31:
2134 #line 481 "cp-name-parser.y" /* yacc.c:1646 */
2135 { (yyval.comp) = make_operator (">", 2); }
2136 #line 2138 "cp-name-parser.c" /* yacc.c:1646 */
2137 break;
2138
2139 case 32:
2140 #line 483 "cp-name-parser.y" /* yacc.c:1646 */
2141 { (yyval.comp) = make_operator ((yyvsp[0].opname), 2); }
2142 #line 2144 "cp-name-parser.c" /* yacc.c:1646 */
2143 break;
2144
2145 case 33:
2146 #line 485 "cp-name-parser.y" /* yacc.c:1646 */
2147 { (yyval.comp) = make_operator ("<<", 2); }
2148 #line 2150 "cp-name-parser.c" /* yacc.c:1646 */
2149 break;
2150
2151 case 34:
2152 #line 487 "cp-name-parser.y" /* yacc.c:1646 */
2153 { (yyval.comp) = make_operator (">>", 2); }
2154 #line 2156 "cp-name-parser.c" /* yacc.c:1646 */
2155 break;
2156
2157 case 35:
2158 #line 489 "cp-name-parser.y" /* yacc.c:1646 */
2159 { (yyval.comp) = make_operator ("==", 2); }
2160 #line 2162 "cp-name-parser.c" /* yacc.c:1646 */
2161 break;
2162
2163 case 36:
2164 #line 491 "cp-name-parser.y" /* yacc.c:1646 */
2165 { (yyval.comp) = make_operator ("!=", 2); }
2166 #line 2168 "cp-name-parser.c" /* yacc.c:1646 */
2167 break;
2168
2169 case 37:
2170 #line 493 "cp-name-parser.y" /* yacc.c:1646 */
2171 { (yyval.comp) = make_operator ("<=", 2); }
2172 #line 2174 "cp-name-parser.c" /* yacc.c:1646 */
2173 break;
2174
2175 case 38:
2176 #line 495 "cp-name-parser.y" /* yacc.c:1646 */
2177 { (yyval.comp) = make_operator (">=", 2); }
2178 #line 2180 "cp-name-parser.c" /* yacc.c:1646 */
2179 break;
2180
2181 case 39:
2182 #line 497 "cp-name-parser.y" /* yacc.c:1646 */
2183 { (yyval.comp) = make_operator ("&&", 2); }
2184 #line 2186 "cp-name-parser.c" /* yacc.c:1646 */
2185 break;
2186
2187 case 40:
2188 #line 499 "cp-name-parser.y" /* yacc.c:1646 */
2189 { (yyval.comp) = make_operator ("||", 2); }
2190 #line 2192 "cp-name-parser.c" /* yacc.c:1646 */
2191 break;
2192
2193 case 41:
2194 #line 501 "cp-name-parser.y" /* yacc.c:1646 */
2195 { (yyval.comp) = make_operator ("++", 1); }
2196 #line 2198 "cp-name-parser.c" /* yacc.c:1646 */
2197 break;
2198
2199 case 42:
2200 #line 503 "cp-name-parser.y" /* yacc.c:1646 */
2201 { (yyval.comp) = make_operator ("--", 1); }
2202 #line 2204 "cp-name-parser.c" /* yacc.c:1646 */
2203 break;
2204
2205 case 43:
2206 #line 505 "cp-name-parser.y" /* yacc.c:1646 */
2207 { (yyval.comp) = make_operator (",", 2); }
2208 #line 2210 "cp-name-parser.c" /* yacc.c:1646 */
2209 break;
2210
2211 case 44:
2212 #line 507 "cp-name-parser.y" /* yacc.c:1646 */
2213 { (yyval.comp) = make_operator ("->*", 2); }
2214 #line 2216 "cp-name-parser.c" /* yacc.c:1646 */
2215 break;
2216
2217 case 45:
2218 #line 509 "cp-name-parser.y" /* yacc.c:1646 */
2219 { (yyval.comp) = make_operator ("->", 2); }
2220 #line 2222 "cp-name-parser.c" /* yacc.c:1646 */
2221 break;
2222
2223 case 46:
2224 #line 511 "cp-name-parser.y" /* yacc.c:1646 */
2225 { (yyval.comp) = make_operator ("()", 2); }
2226 #line 2228 "cp-name-parser.c" /* yacc.c:1646 */
2227 break;
2228
2229 case 47:
2230 #line 513 "cp-name-parser.y" /* yacc.c:1646 */
2231 { (yyval.comp) = make_operator ("[]", 2); }
2232 #line 2234 "cp-name-parser.c" /* yacc.c:1646 */
2233 break;
2234
2235 case 48:
2236 #line 521 "cp-name-parser.y" /* yacc.c:1646 */
2237 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_CONVERSION, (yyvsp[0].comp), NULL); }
2238 #line 2240 "cp-name-parser.c" /* yacc.c:1646 */
2239 break;
2240
2241 case 49:
2242 #line 526 "cp-name-parser.y" /* yacc.c:1646 */
2243 { (yyval.nested).comp = (yyvsp[-1].nested1).comp;
2244 d_right ((yyvsp[-1].nested1).last) = (yyvsp[0].comp);
2245 (yyval.nested).last = &d_left ((yyvsp[0].comp));
2246 }
2247 #line 2249 "cp-name-parser.c" /* yacc.c:1646 */
2248 break;
2249
2250 case 50:
2251 #line 531 "cp-name-parser.y" /* yacc.c:1646 */
2252 { (yyval.nested).comp = (yyvsp[0].comp);
2253 (yyval.nested).last = &d_left ((yyvsp[0].comp));
2254 }
2255 #line 2257 "cp-name-parser.c" /* yacc.c:1646 */
2256 break;
2257
2258 case 51:
2259 #line 535 "cp-name-parser.y" /* yacc.c:1646 */
2260 { (yyval.nested).comp = (yyvsp[-1].nested1).comp;
2261 d_right ((yyvsp[-1].nested1).last) = (yyvsp[0].comp);
2262 (yyval.nested).last = &d_left ((yyvsp[0].comp));
2263 }
2264 #line 2266 "cp-name-parser.c" /* yacc.c:1646 */
2265 break;
2266
2267 case 52:
2268 #line 540 "cp-name-parser.y" /* yacc.c:1646 */
2269 { (yyval.nested).comp = (yyvsp[0].comp);
2270 (yyval.nested).last = &d_left ((yyvsp[0].comp));
2271 }
2272 #line 2274 "cp-name-parser.c" /* yacc.c:1646 */
2273 break;
2274
2275 case 54:
2276 #line 549 "cp-name-parser.y" /* yacc.c:1646 */
2277 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_TEMPLATE, (yyvsp[-3].comp), (yyvsp[-1].nested).comp); }
2278 #line 2280 "cp-name-parser.c" /* yacc.c:1646 */
2279 break;
2280
2281 case 55:
2282 #line 551 "cp-name-parser.y" /* yacc.c:1646 */
2283 { (yyval.comp) = make_dtor (gnu_v3_complete_object_dtor, (yyvsp[0].comp)); }
2284 #line 2286 "cp-name-parser.c" /* yacc.c:1646 */
2285 break;
2286
2287 case 57:
2288 #line 564 "cp-name-parser.y" /* yacc.c:1646 */
2289 { (yyval.comp) = (yyvsp[0].comp); }
2290 #line 2292 "cp-name-parser.c" /* yacc.c:1646 */
2291 break;
2292
2293 case 58:
2294 #line 570 "cp-name-parser.y" /* yacc.c:1646 */
2295 { (yyval.comp) = (yyvsp[-1].nested1).comp; d_right ((yyvsp[-1].nested1).last) = (yyvsp[0].comp); }
2296 #line 2298 "cp-name-parser.c" /* yacc.c:1646 */
2297 break;
2298
2299 case 60:
2300 #line 573 "cp-name-parser.y" /* yacc.c:1646 */
2301 { (yyval.comp) = (yyvsp[-1].nested1).comp; d_right ((yyvsp[-1].nested1).last) = (yyvsp[0].comp); }
2302 #line 2304 "cp-name-parser.c" /* yacc.c:1646 */
2303 break;
2304
2305 case 65:
2306 #line 583 "cp-name-parser.y" /* yacc.c:1646 */
2307 { (yyval.comp) = (yyvsp[0].comp); }
2308 #line 2310 "cp-name-parser.c" /* yacc.c:1646 */
2309 break;
2310
2311 case 66:
2312 #line 587 "cp-name-parser.y" /* yacc.c:1646 */
2313 { (yyval.comp) = (yyvsp[-1].nested1).comp; d_right ((yyvsp[-1].nested1).last) = (yyvsp[0].comp); }
2314 #line 2316 "cp-name-parser.c" /* yacc.c:1646 */
2315 break;
2316
2317 case 68:
2318 #line 592 "cp-name-parser.y" /* yacc.c:1646 */
2319 { (yyval.nested1).comp = fill_comp (DEMANGLE_COMPONENT_QUAL_NAME, (yyvsp[-1].comp), NULL);
2320 (yyval.nested1).last = (yyval.nested1).comp;
2321 }
2322 #line 2324 "cp-name-parser.c" /* yacc.c:1646 */
2323 break;
2324
2325 case 69:
2326 #line 596 "cp-name-parser.y" /* yacc.c:1646 */
2327 { (yyval.nested1).comp = (yyvsp[-2].nested1).comp;
2328 d_right ((yyvsp[-2].nested1).last) = fill_comp (DEMANGLE_COMPONENT_QUAL_NAME, (yyvsp[-1].comp), NULL);
2329 (yyval.nested1).last = d_right ((yyvsp[-2].nested1).last);
2330 }
2331 #line 2333 "cp-name-parser.c" /* yacc.c:1646 */
2332 break;
2333
2334 case 70:
2335 #line 601 "cp-name-parser.y" /* yacc.c:1646 */
2336 { (yyval.nested1).comp = fill_comp (DEMANGLE_COMPONENT_QUAL_NAME, (yyvsp[-1].comp), NULL);
2337 (yyval.nested1).last = (yyval.nested1).comp;
2338 }
2339 #line 2341 "cp-name-parser.c" /* yacc.c:1646 */
2340 break;
2341
2342 case 71:
2343 #line 605 "cp-name-parser.y" /* yacc.c:1646 */
2344 { (yyval.nested1).comp = (yyvsp[-2].nested1).comp;
2345 d_right ((yyvsp[-2].nested1).last) = fill_comp (DEMANGLE_COMPONENT_QUAL_NAME, (yyvsp[-1].comp), NULL);
2346 (yyval.nested1).last = d_right ((yyvsp[-2].nested1).last);
2347 }
2348 #line 2350 "cp-name-parser.c" /* yacc.c:1646 */
2349 break;
2350
2351 case 72:
2352 #line 614 "cp-name-parser.y" /* yacc.c:1646 */
2353 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_TEMPLATE, (yyvsp[-3].comp), (yyvsp[-1].nested).comp); }
2354 #line 2356 "cp-name-parser.c" /* yacc.c:1646 */
2355 break;
2356
2357 case 73:
2358 #line 618 "cp-name-parser.y" /* yacc.c:1646 */
2359 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, (yyvsp[0].comp), NULL);
2360 (yyval.nested).last = &d_right ((yyval.nested).comp); }
2361 #line 2363 "cp-name-parser.c" /* yacc.c:1646 */
2362 break;
2363
2364 case 74:
2365 #line 621 "cp-name-parser.y" /* yacc.c:1646 */
2366 { (yyval.nested).comp = (yyvsp[-2].nested).comp;
2367 *(yyvsp[-2].nested).last = fill_comp (DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, (yyvsp[0].comp), NULL);
2368 (yyval.nested).last = &d_right (*(yyvsp[-2].nested).last);
2369 }
2370 #line 2372 "cp-name-parser.c" /* yacc.c:1646 */
2371 break;
2372
2373 case 76:
2374 #line 633 "cp-name-parser.y" /* yacc.c:1646 */
2375 { (yyval.comp) = (yyvsp[0].abstract).comp;
2376 *(yyvsp[0].abstract).last = (yyvsp[-1].comp);
2377 }
2378 #line 2380 "cp-name-parser.c" /* yacc.c:1646 */
2379 break;
2380
2381 case 77:
2382 #line 637 "cp-name-parser.y" /* yacc.c:1646 */
2383 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_UNARY, make_operator ("&", 1), (yyvsp[0].comp)); }
2384 #line 2386 "cp-name-parser.c" /* yacc.c:1646 */
2385 break;
2386
2387 case 78:
2388 #line 639 "cp-name-parser.y" /* yacc.c:1646 */
2389 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_UNARY, make_operator ("&", 1), (yyvsp[-1].comp)); }
2390 #line 2392 "cp-name-parser.c" /* yacc.c:1646 */
2391 break;
2392
2393 case 80:
2394 #line 644 "cp-name-parser.y" /* yacc.c:1646 */
2395 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_ARGLIST, (yyvsp[0].comp), NULL);
2396 (yyval.nested).last = &d_right ((yyval.nested).comp);
2397 }
2398 #line 2400 "cp-name-parser.c" /* yacc.c:1646 */
2399 break;
2400
2401 case 81:
2402 #line 648 "cp-name-parser.y" /* yacc.c:1646 */
2403 { *(yyvsp[0].abstract).last = (yyvsp[-1].comp);
2404 (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_ARGLIST, (yyvsp[0].abstract).comp, NULL);
2405 (yyval.nested).last = &d_right ((yyval.nested).comp);
2406 }
2407 #line 2409 "cp-name-parser.c" /* yacc.c:1646 */
2408 break;
2409
2410 case 82:
2411 #line 653 "cp-name-parser.y" /* yacc.c:1646 */
2412 { *(yyvsp[-2].nested).last = fill_comp (DEMANGLE_COMPONENT_ARGLIST, (yyvsp[0].comp), NULL);
2413 (yyval.nested).comp = (yyvsp[-2].nested).comp;
2414 (yyval.nested).last = &d_right (*(yyvsp[-2].nested).last);
2415 }
2416 #line 2418 "cp-name-parser.c" /* yacc.c:1646 */
2417 break;
2418
2419 case 83:
2420 #line 658 "cp-name-parser.y" /* yacc.c:1646 */
2421 { *(yyvsp[0].abstract).last = (yyvsp[-1].comp);
2422 *(yyvsp[-3].nested).last = fill_comp (DEMANGLE_COMPONENT_ARGLIST, (yyvsp[0].abstract).comp, NULL);
2423 (yyval.nested).comp = (yyvsp[-3].nested).comp;
2424 (yyval.nested).last = &d_right (*(yyvsp[-3].nested).last);
2425 }
2426 #line 2428 "cp-name-parser.c" /* yacc.c:1646 */
2427 break;
2428
2429 case 84:
2430 #line 664 "cp-name-parser.y" /* yacc.c:1646 */
2431 { *(yyvsp[-2].nested).last
2432 = fill_comp (DEMANGLE_COMPONENT_ARGLIST,
2433 make_builtin_type ("..."),
2434 NULL);
2435 (yyval.nested).comp = (yyvsp[-2].nested).comp;
2436 (yyval.nested).last = &d_right (*(yyvsp[-2].nested).last);
2437 }
2438 #line 2440 "cp-name-parser.c" /* yacc.c:1646 */
2439 break;
2440
2441 case 85:
2442 #line 674 "cp-name-parser.y" /* yacc.c:1646 */
2443 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_FUNCTION_TYPE, NULL, (yyvsp[-2].nested).comp);
2444 (yyval.nested).last = &d_left ((yyval.nested).comp);
2445 (yyval.nested).comp = d_qualify ((yyval.nested).comp, (yyvsp[0].lval), 1); }
2446 #line 2448 "cp-name-parser.c" /* yacc.c:1646 */
2447 break;
2448
2449 case 86:
2450 #line 678 "cp-name-parser.y" /* yacc.c:1646 */
2451 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_FUNCTION_TYPE, NULL, NULL);
2452 (yyval.nested).last = &d_left ((yyval.nested).comp);
2453 (yyval.nested).comp = d_qualify ((yyval.nested).comp, (yyvsp[0].lval), 1); }
2454 #line 2456 "cp-name-parser.c" /* yacc.c:1646 */
2455 break;
2456
2457 case 87:
2458 #line 682 "cp-name-parser.y" /* yacc.c:1646 */
2459 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_FUNCTION_TYPE, NULL, NULL);
2460 (yyval.nested).last = &d_left ((yyval.nested).comp);
2461 (yyval.nested).comp = d_qualify ((yyval.nested).comp, (yyvsp[0].lval), 1); }
2462 #line 2464 "cp-name-parser.c" /* yacc.c:1646 */
2463 break;
2464
2465 case 88:
2466 #line 689 "cp-name-parser.y" /* yacc.c:1646 */
2467 { (yyval.lval) = 0; }
2468 #line 2470 "cp-name-parser.c" /* yacc.c:1646 */
2469 break;
2470
2471 case 90:
2472 #line 694 "cp-name-parser.y" /* yacc.c:1646 */
2473 { (yyval.lval) = QUAL_RESTRICT; }
2474 #line 2476 "cp-name-parser.c" /* yacc.c:1646 */
2475 break;
2476
2477 case 91:
2478 #line 696 "cp-name-parser.y" /* yacc.c:1646 */
2479 { (yyval.lval) = QUAL_VOLATILE; }
2480 #line 2482 "cp-name-parser.c" /* yacc.c:1646 */
2481 break;
2482
2483 case 92:
2484 #line 698 "cp-name-parser.y" /* yacc.c:1646 */
2485 { (yyval.lval) = QUAL_CONST; }
2486 #line 2488 "cp-name-parser.c" /* yacc.c:1646 */
2487 break;
2488
2489 case 94:
2490 #line 703 "cp-name-parser.y" /* yacc.c:1646 */
2491 { (yyval.lval) = (yyvsp[-1].lval) | (yyvsp[0].lval); }
2492 #line 2494 "cp-name-parser.c" /* yacc.c:1646 */
2493 break;
2494
2495 case 95:
2496 #line 710 "cp-name-parser.y" /* yacc.c:1646 */
2497 { (yyval.lval) = 0; }
2498 #line 2500 "cp-name-parser.c" /* yacc.c:1646 */
2499 break;
2500
2501 case 96:
2502 #line 712 "cp-name-parser.y" /* yacc.c:1646 */
2503 { (yyval.lval) = INT_SIGNED; }
2504 #line 2506 "cp-name-parser.c" /* yacc.c:1646 */
2505 break;
2506
2507 case 97:
2508 #line 714 "cp-name-parser.y" /* yacc.c:1646 */
2509 { (yyval.lval) = INT_UNSIGNED; }
2510 #line 2512 "cp-name-parser.c" /* yacc.c:1646 */
2511 break;
2512
2513 case 98:
2514 #line 716 "cp-name-parser.y" /* yacc.c:1646 */
2515 { (yyval.lval) = INT_CHAR; }
2516 #line 2518 "cp-name-parser.c" /* yacc.c:1646 */
2517 break;
2518
2519 case 99:
2520 #line 718 "cp-name-parser.y" /* yacc.c:1646 */
2521 { (yyval.lval) = INT_LONG; }
2522 #line 2524 "cp-name-parser.c" /* yacc.c:1646 */
2523 break;
2524
2525 case 100:
2526 #line 720 "cp-name-parser.y" /* yacc.c:1646 */
2527 { (yyval.lval) = INT_SHORT; }
2528 #line 2530 "cp-name-parser.c" /* yacc.c:1646 */
2529 break;
2530
2531 case 102:
2532 #line 725 "cp-name-parser.y" /* yacc.c:1646 */
2533 { (yyval.lval) = (yyvsp[-1].lval) | (yyvsp[0].lval); if ((yyvsp[-1].lval) & (yyvsp[0].lval) & INT_LONG) (yyval.lval) = (yyvsp[-1].lval) | INT_LLONG; }
2534 #line 2536 "cp-name-parser.c" /* yacc.c:1646 */
2535 break;
2536
2537 case 103:
2538 #line 729 "cp-name-parser.y" /* yacc.c:1646 */
2539 { (yyval.comp) = d_int_type ((yyvsp[0].lval)); }
2540 #line 2542 "cp-name-parser.c" /* yacc.c:1646 */
2541 break;
2542
2543 case 104:
2544 #line 731 "cp-name-parser.y" /* yacc.c:1646 */
2545 { (yyval.comp) = make_builtin_type ("float"); }
2546 #line 2548 "cp-name-parser.c" /* yacc.c:1646 */
2547 break;
2548
2549 case 105:
2550 #line 733 "cp-name-parser.y" /* yacc.c:1646 */
2551 { (yyval.comp) = make_builtin_type ("double"); }
2552 #line 2554 "cp-name-parser.c" /* yacc.c:1646 */
2553 break;
2554
2555 case 106:
2556 #line 735 "cp-name-parser.y" /* yacc.c:1646 */
2557 { (yyval.comp) = make_builtin_type ("long double"); }
2558 #line 2560 "cp-name-parser.c" /* yacc.c:1646 */
2559 break;
2560
2561 case 107:
2562 #line 737 "cp-name-parser.y" /* yacc.c:1646 */
2563 { (yyval.comp) = make_builtin_type ("bool"); }
2564 #line 2566 "cp-name-parser.c" /* yacc.c:1646 */
2565 break;
2566
2567 case 108:
2568 #line 739 "cp-name-parser.y" /* yacc.c:1646 */
2569 { (yyval.comp) = make_builtin_type ("wchar_t"); }
2570 #line 2572 "cp-name-parser.c" /* yacc.c:1646 */
2571 break;
2572
2573 case 109:
2574 #line 741 "cp-name-parser.y" /* yacc.c:1646 */
2575 { (yyval.comp) = make_builtin_type ("void"); }
2576 #line 2578 "cp-name-parser.c" /* yacc.c:1646 */
2577 break;
2578
2579 case 110:
2580 #line 745 "cp-name-parser.y" /* yacc.c:1646 */
2581 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_POINTER, NULL, NULL);
2582 (yyval.nested).last = &d_left ((yyval.nested).comp);
2583 (yyval.nested).comp = d_qualify ((yyval.nested).comp, (yyvsp[0].lval), 0); }
2584 #line 2586 "cp-name-parser.c" /* yacc.c:1646 */
2585 break;
2586
2587 case 111:
2588 #line 750 "cp-name-parser.y" /* yacc.c:1646 */
2589 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_REFERENCE, NULL, NULL);
2590 (yyval.nested).last = &d_left ((yyval.nested).comp); }
2591 #line 2593 "cp-name-parser.c" /* yacc.c:1646 */
2592 break;
2593
2594 case 112:
2595 #line 753 "cp-name-parser.y" /* yacc.c:1646 */
2596 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_RVALUE_REFERENCE, NULL, NULL);
2597 (yyval.nested).last = &d_left ((yyval.nested).comp); }
2598 #line 2600 "cp-name-parser.c" /* yacc.c:1646 */
2599 break;
2600
2601 case 113:
2602 #line 756 "cp-name-parser.y" /* yacc.c:1646 */
2603 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_PTRMEM_TYPE, (yyvsp[-2].nested1).comp, NULL);
2604 /* Convert the innermost DEMANGLE_COMPONENT_QUAL_NAME to a DEMANGLE_COMPONENT_NAME. */
2605 *(yyvsp[-2].nested1).last = *d_left ((yyvsp[-2].nested1).last);
2606 (yyval.nested).last = &d_right ((yyval.nested).comp);
2607 (yyval.nested).comp = d_qualify ((yyval.nested).comp, (yyvsp[0].lval), 0); }
2608 #line 2610 "cp-name-parser.c" /* yacc.c:1646 */
2609 break;
2610
2611 case 114:
2612 #line 762 "cp-name-parser.y" /* yacc.c:1646 */
2613 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_PTRMEM_TYPE, (yyvsp[-2].nested1).comp, NULL);
2614 /* Convert the innermost DEMANGLE_COMPONENT_QUAL_NAME to a DEMANGLE_COMPONENT_NAME. */
2615 *(yyvsp[-2].nested1).last = *d_left ((yyvsp[-2].nested1).last);
2616 (yyval.nested).last = &d_right ((yyval.nested).comp);
2617 (yyval.nested).comp = d_qualify ((yyval.nested).comp, (yyvsp[0].lval), 0); }
2618 #line 2620 "cp-name-parser.c" /* yacc.c:1646 */
2619 break;
2620
2621 case 115:
2622 #line 770 "cp-name-parser.y" /* yacc.c:1646 */
2623 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_ARRAY_TYPE, NULL, NULL); }
2624 #line 2626 "cp-name-parser.c" /* yacc.c:1646 */
2625 break;
2626
2627 case 116:
2628 #line 772 "cp-name-parser.y" /* yacc.c:1646 */
2629 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_ARRAY_TYPE, (yyvsp[-1].comp), NULL); }
2630 #line 2632 "cp-name-parser.c" /* yacc.c:1646 */
2631 break;
2632
2633 case 117:
2634 #line 786 "cp-name-parser.y" /* yacc.c:1646 */
2635 { (yyval.comp) = d_qualify ((yyvsp[-1].comp), (yyvsp[0].lval), 0); }
2636 #line 2638 "cp-name-parser.c" /* yacc.c:1646 */
2637 break;
2638
2639 case 119:
2640 #line 789 "cp-name-parser.y" /* yacc.c:1646 */
2641 { (yyval.comp) = d_qualify ((yyvsp[-1].comp), (yyvsp[-2].lval) | (yyvsp[0].lval), 0); }
2642 #line 2644 "cp-name-parser.c" /* yacc.c:1646 */
2643 break;
2644
2645 case 120:
2646 #line 791 "cp-name-parser.y" /* yacc.c:1646 */
2647 { (yyval.comp) = d_qualify ((yyvsp[0].comp), (yyvsp[-1].lval), 0); }
2648 #line 2650 "cp-name-parser.c" /* yacc.c:1646 */
2649 break;
2650
2651 case 121:
2652 #line 794 "cp-name-parser.y" /* yacc.c:1646 */
2653 { (yyval.comp) = d_qualify ((yyvsp[-1].comp), (yyvsp[0].lval), 0); }
2654 #line 2656 "cp-name-parser.c" /* yacc.c:1646 */
2655 break;
2656
2657 case 123:
2658 #line 797 "cp-name-parser.y" /* yacc.c:1646 */
2659 { (yyval.comp) = d_qualify ((yyvsp[-1].comp), (yyvsp[-2].lval) | (yyvsp[0].lval), 0); }
2660 #line 2662 "cp-name-parser.c" /* yacc.c:1646 */
2661 break;
2662
2663 case 124:
2664 #line 799 "cp-name-parser.y" /* yacc.c:1646 */
2665 { (yyval.comp) = d_qualify ((yyvsp[0].comp), (yyvsp[-1].lval), 0); }
2666 #line 2668 "cp-name-parser.c" /* yacc.c:1646 */
2667 break;
2668
2669 case 125:
2670 #line 802 "cp-name-parser.y" /* yacc.c:1646 */
2671 { (yyval.comp) = d_qualify ((yyvsp[-1].comp), (yyvsp[0].lval), 0); }
2672 #line 2674 "cp-name-parser.c" /* yacc.c:1646 */
2673 break;
2674
2675 case 126:
2676 #line 804 "cp-name-parser.y" /* yacc.c:1646 */
2677 { (yyval.comp) = (yyvsp[0].comp); }
2678 #line 2680 "cp-name-parser.c" /* yacc.c:1646 */
2679 break;
2680
2681 case 127:
2682 #line 806 "cp-name-parser.y" /* yacc.c:1646 */
2683 { (yyval.comp) = d_qualify ((yyvsp[-1].comp), (yyvsp[-3].lval) | (yyvsp[0].lval), 0); }
2684 #line 2686 "cp-name-parser.c" /* yacc.c:1646 */
2685 break;
2686
2687 case 128:
2688 #line 808 "cp-name-parser.y" /* yacc.c:1646 */
2689 { (yyval.comp) = d_qualify ((yyvsp[0].comp), (yyvsp[-2].lval), 0); }
2690 #line 2692 "cp-name-parser.c" /* yacc.c:1646 */
2691 break;
2692
2693 case 129:
2694 #line 813 "cp-name-parser.y" /* yacc.c:1646 */
2695 { (yyval.abstract).comp = (yyvsp[0].nested).comp; (yyval.abstract).last = (yyvsp[0].nested).last;
2696 (yyval.abstract).fn.comp = NULL; (yyval.abstract).fn.last = NULL; }
2697 #line 2699 "cp-name-parser.c" /* yacc.c:1646 */
2698 break;
2699
2700 case 130:
2701 #line 816 "cp-name-parser.y" /* yacc.c:1646 */
2702 { (yyval.abstract) = (yyvsp[0].abstract); (yyval.abstract).fn.comp = NULL; (yyval.abstract).fn.last = NULL;
2703 if ((yyvsp[0].abstract).fn.comp) { (yyval.abstract).last = (yyvsp[0].abstract).fn.last; *(yyvsp[0].abstract).last = (yyvsp[0].abstract).fn.comp; }
2704 *(yyval.abstract).last = (yyvsp[-1].nested).comp;
2705 (yyval.abstract).last = (yyvsp[-1].nested).last; }
2706 #line 2708 "cp-name-parser.c" /* yacc.c:1646 */
2707 break;
2708
2709 case 131:
2710 #line 821 "cp-name-parser.y" /* yacc.c:1646 */
2711 { (yyval.abstract).fn.comp = NULL; (yyval.abstract).fn.last = NULL;
2712 if ((yyvsp[0].abstract).fn.comp) { (yyval.abstract).last = (yyvsp[0].abstract).fn.last; *(yyvsp[0].abstract).last = (yyvsp[0].abstract).fn.comp; }
2713 }
2714 #line 2716 "cp-name-parser.c" /* yacc.c:1646 */
2715 break;
2716
2717 case 132:
2718 #line 828 "cp-name-parser.y" /* yacc.c:1646 */
2719 { (yyval.abstract) = (yyvsp[-1].abstract); (yyval.abstract).fn.comp = NULL; (yyval.abstract).fn.last = NULL; (yyval.abstract).fold_flag = 1;
2720 if ((yyvsp[-1].abstract).fn.comp) { (yyval.abstract).last = (yyvsp[-1].abstract).fn.last; *(yyvsp[-1].abstract).last = (yyvsp[-1].abstract).fn.comp; }
2721 }
2722 #line 2724 "cp-name-parser.c" /* yacc.c:1646 */
2723 break;
2724
2725 case 133:
2726 #line 832 "cp-name-parser.y" /* yacc.c:1646 */
2727 { (yyval.abstract).fold_flag = 0;
2728 if ((yyvsp[-1].abstract).fn.comp) { (yyval.abstract).last = (yyvsp[-1].abstract).fn.last; *(yyvsp[-1].abstract).last = (yyvsp[-1].abstract).fn.comp; }
2729 if ((yyvsp[-1].abstract).fold_flag)
2730 {
2731 *(yyval.abstract).last = (yyvsp[0].nested).comp;
2732 (yyval.abstract).last = (yyvsp[0].nested).last;
2733 }
2734 else
2735 (yyval.abstract).fn = (yyvsp[0].nested);
2736 }
2737 #line 2739 "cp-name-parser.c" /* yacc.c:1646 */
2738 break;
2739
2740 case 134:
2741 #line 843 "cp-name-parser.y" /* yacc.c:1646 */
2742 { (yyval.abstract).fn.comp = NULL; (yyval.abstract).fn.last = NULL; (yyval.abstract).fold_flag = 0;
2743 if ((yyvsp[-1].abstract).fn.comp) { (yyval.abstract).last = (yyvsp[-1].abstract).fn.last; *(yyvsp[-1].abstract).last = (yyvsp[-1].abstract).fn.comp; }
2744 *(yyvsp[-1].abstract).last = (yyvsp[0].comp);
2745 (yyval.abstract).last = &d_right ((yyvsp[0].comp));
2746 }
2747 #line 2749 "cp-name-parser.c" /* yacc.c:1646 */
2748 break;
2749
2750 case 135:
2751 #line 849 "cp-name-parser.y" /* yacc.c:1646 */
2752 { (yyval.abstract).fn.comp = NULL; (yyval.abstract).fn.last = NULL; (yyval.abstract).fold_flag = 0;
2753 (yyval.abstract).comp = (yyvsp[0].comp);
2754 (yyval.abstract).last = &d_right ((yyvsp[0].comp));
2755 }
2756 #line 2758 "cp-name-parser.c" /* yacc.c:1646 */
2757 break;
2758
2759 case 136:
2760 #line 867 "cp-name-parser.y" /* yacc.c:1646 */
2761 { (yyval.abstract).comp = (yyvsp[0].nested).comp; (yyval.abstract).last = (yyvsp[0].nested).last;
2762 (yyval.abstract).fn.comp = NULL; (yyval.abstract).fn.last = NULL; (yyval.abstract).start = NULL; }
2763 #line 2765 "cp-name-parser.c" /* yacc.c:1646 */
2764 break;
2765
2766 case 137:
2767 #line 870 "cp-name-parser.y" /* yacc.c:1646 */
2768 { (yyval.abstract) = (yyvsp[0].abstract);
2769 if ((yyvsp[0].abstract).last)
2770 *(yyval.abstract).last = (yyvsp[-1].nested).comp;
2771 else
2772 (yyval.abstract).comp = (yyvsp[-1].nested).comp;
2773 (yyval.abstract).last = (yyvsp[-1].nested).last;
2774 }
2775 #line 2777 "cp-name-parser.c" /* yacc.c:1646 */
2776 break;
2777
2778 case 138:
2779 #line 878 "cp-name-parser.y" /* yacc.c:1646 */
2780 { (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; }
2781 #line 2783 "cp-name-parser.c" /* yacc.c:1646 */
2782 break;
2783
2784 case 139:
2785 #line 880 "cp-name-parser.y" /* yacc.c:1646 */
2786 { (yyval.abstract).start = (yyvsp[0].comp);
2787 if ((yyvsp[-3].abstract).fn.comp) { (yyval.abstract).last = (yyvsp[-3].abstract).fn.last; *(yyvsp[-3].abstract).last = (yyvsp[-3].abstract).fn.comp; }
2788 if ((yyvsp[-3].abstract).fold_flag)
2789 {
2790 *(yyval.abstract).last = (yyvsp[-2].nested).comp;
2791 (yyval.abstract).last = (yyvsp[-2].nested).last;
2792 }
2793 else
2794 (yyval.abstract).fn = (yyvsp[-2].nested);
2795 }
2796 #line 2798 "cp-name-parser.c" /* yacc.c:1646 */
2797 break;
2798
2799 case 140:
2800 #line 891 "cp-name-parser.y" /* yacc.c:1646 */
2801 { (yyval.abstract).fn = (yyvsp[-1].nested);
2802 (yyval.abstract).start = (yyvsp[0].comp);
2803 (yyval.abstract).comp = NULL; (yyval.abstract).last = NULL;
2804 }
2805 #line 2807 "cp-name-parser.c" /* yacc.c:1646 */
2806 break;
2807
2808 case 142:
2809 #line 899 "cp-name-parser.y" /* yacc.c:1646 */
2810 { (yyval.comp) = (yyvsp[0].abstract).comp;
2811 *(yyvsp[0].abstract).last = (yyvsp[-1].comp);
2812 }
2813 #line 2815 "cp-name-parser.c" /* yacc.c:1646 */
2814 break;
2815
2816 case 143:
2817 #line 905 "cp-name-parser.y" /* yacc.c:1646 */
2818 { (yyval.nested).comp = (yyvsp[0].nested).comp;
2819 (yyval.nested).last = (yyvsp[-1].nested).last;
2820 *(yyvsp[0].nested).last = (yyvsp[-1].nested).comp; }
2821 #line 2823 "cp-name-parser.c" /* yacc.c:1646 */
2822 break;
2823
2824 case 145:
2825 #line 913 "cp-name-parser.y" /* yacc.c:1646 */
2826 { (yyval.nested) = (yyvsp[-1].nested); }
2827 #line 2829 "cp-name-parser.c" /* yacc.c:1646 */
2828 break;
2829
2830 case 146:
2831 #line 915 "cp-name-parser.y" /* yacc.c:1646 */
2832 { (yyval.nested).comp = (yyvsp[-1].nested).comp;
2833 *(yyvsp[-1].nested).last = (yyvsp[0].nested).comp;
2834 (yyval.nested).last = (yyvsp[0].nested).last;
2835 }
2836 #line 2838 "cp-name-parser.c" /* yacc.c:1646 */
2837 break;
2838
2839 case 147:
2840 #line 920 "cp-name-parser.y" /* yacc.c:1646 */
2841 { (yyval.nested).comp = (yyvsp[-1].nested).comp;
2842 *(yyvsp[-1].nested).last = (yyvsp[0].comp);
2843 (yyval.nested).last = &d_right ((yyvsp[0].comp));
2844 }
2845 #line 2847 "cp-name-parser.c" /* yacc.c:1646 */
2846 break;
2847
2848 case 148:
2849 #line 925 "cp-name-parser.y" /* yacc.c:1646 */
2850 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[0].comp), NULL);
2851 (yyval.nested).last = &d_right ((yyval.nested).comp);
2852 }
2853 #line 2855 "cp-name-parser.c" /* yacc.c:1646 */
2854 break;
2855
2856 case 149:
2857 #line 937 "cp-name-parser.y" /* yacc.c:1646 */
2858 { (yyval.nested).comp = (yyvsp[0].nested).comp;
2859 (yyval.nested).last = (yyvsp[-1].nested).last;
2860 *(yyvsp[0].nested).last = (yyvsp[-1].nested).comp; }
2861 #line 2863 "cp-name-parser.c" /* yacc.c:1646 */
2862 break;
2863
2864 case 150:
2865 #line 941 "cp-name-parser.y" /* yacc.c:1646 */
2866 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[0].comp), NULL);
2867 (yyval.nested).last = &d_right ((yyval.nested).comp);
2868 }
2869 #line 2871 "cp-name-parser.c" /* yacc.c:1646 */
2870 break;
2871
2872 case 152:
2873 #line 953 "cp-name-parser.y" /* yacc.c:1646 */
2874 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-3].comp), (yyvsp[-2].nested).comp);
2875 (yyval.nested).last = (yyvsp[-2].nested).last;
2876 (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.nested).comp, (yyvsp[0].comp));
2877 }
2878 #line 2880 "cp-name-parser.c" /* yacc.c:1646 */
2879 break;
2880
2881 case 153:
2882 #line 958 "cp-name-parser.y" /* yacc.c:1646 */
2883 { (yyval.nested).comp = (yyvsp[-3].nested).comp;
2884 *(yyvsp[-3].nested).last = (yyvsp[-2].nested).comp;
2885 (yyval.nested).last = (yyvsp[-2].nested).last;
2886 (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_LOCAL_NAME, (yyval.nested).comp, (yyvsp[0].comp));
2887 }
2888 #line 2890 "cp-name-parser.c" /* yacc.c:1646 */
2889 break;
2890
2891 case 154:
2892 #line 967 "cp-name-parser.y" /* yacc.c:1646 */
2893 { (yyval.nested).comp = (yyvsp[-1].nested).comp;
2894 (yyval.nested).last = (yyvsp[-2].nested).last;
2895 *(yyvsp[-1].nested).last = (yyvsp[-2].nested).comp; }
2896 #line 2898 "cp-name-parser.c" /* yacc.c:1646 */
2897 break;
2898
2899 case 155:
2900 #line 971 "cp-name-parser.y" /* yacc.c:1646 */
2901 { (yyval.nested).comp = (yyvsp[-1].nested).comp;
2902 *(yyvsp[-1].nested).last = (yyvsp[0].nested).comp;
2903 (yyval.nested).last = (yyvsp[0].nested).last;
2904 }
2905 #line 2907 "cp-name-parser.c" /* yacc.c:1646 */
2906 break;
2907
2908 case 156:
2909 #line 976 "cp-name-parser.y" /* yacc.c:1646 */
2910 { (yyval.nested).comp = (yyvsp[-1].nested).comp;
2911 *(yyvsp[-1].nested).last = (yyvsp[0].comp);
2912 (yyval.nested).last = &d_right ((yyvsp[0].comp));
2913 }
2914 #line 2916 "cp-name-parser.c" /* yacc.c:1646 */
2915 break;
2916
2917 case 157:
2918 #line 981 "cp-name-parser.y" /* yacc.c:1646 */
2919 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-1].comp), (yyvsp[0].nested).comp);
2920 (yyval.nested).last = (yyvsp[0].nested).last;
2921 }
2922 #line 2924 "cp-name-parser.c" /* yacc.c:1646 */
2923 break;
2924
2925 case 158:
2926 #line 985 "cp-name-parser.y" /* yacc.c:1646 */
2927 { (yyval.nested).comp = fill_comp (DEMANGLE_COMPONENT_TYPED_NAME, (yyvsp[-1].comp), (yyvsp[0].comp));
2928 (yyval.nested).last = &d_right ((yyvsp[0].comp));
2929 }
2930 #line 2932 "cp-name-parser.c" /* yacc.c:1646 */
2931 break;
2932
2933 case 159:
2934 #line 991 "cp-name-parser.y" /* yacc.c:1646 */
2935 { (yyval.comp) = (yyvsp[-1].comp); }
2936 #line 2938 "cp-name-parser.c" /* yacc.c:1646 */
2937 break;
2938
2939 case 161:
2940 #line 1000 "cp-name-parser.y" /* yacc.c:1646 */
2941 { (yyval.comp) = d_binary (">", (yyvsp[-2].comp), (yyvsp[0].comp)); }
2942 #line 2944 "cp-name-parser.c" /* yacc.c:1646 */
2943 break;
2944
2945 case 162:
2946 #line 1007 "cp-name-parser.y" /* yacc.c:1646 */
2947 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_UNARY, make_operator ("&", 1), (yyvsp[0].comp)); }
2948 #line 2950 "cp-name-parser.c" /* yacc.c:1646 */
2949 break;
2950
2951 case 163:
2952 #line 1009 "cp-name-parser.y" /* yacc.c:1646 */
2953 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_UNARY, make_operator ("&", 1), (yyvsp[-1].comp)); }
2954 #line 2956 "cp-name-parser.c" /* yacc.c:1646 */
2955 break;
2956
2957 case 164:
2958 #line 1014 "cp-name-parser.y" /* yacc.c:1646 */
2959 { (yyval.comp) = d_unary ("-", (yyvsp[0].comp)); }
2960 #line 2962 "cp-name-parser.c" /* yacc.c:1646 */
2961 break;
2962
2963 case 165:
2964 #line 1018 "cp-name-parser.y" /* yacc.c:1646 */
2965 { (yyval.comp) = d_unary ("!", (yyvsp[0].comp)); }
2966 #line 2968 "cp-name-parser.c" /* yacc.c:1646 */
2967 break;
2968
2969 case 166:
2970 #line 1022 "cp-name-parser.y" /* yacc.c:1646 */
2971 { (yyval.comp) = d_unary ("~", (yyvsp[0].comp)); }
2972 #line 2974 "cp-name-parser.c" /* yacc.c:1646 */
2973 break;
2974
2975 case 167:
2976 #line 1029 "cp-name-parser.y" /* yacc.c:1646 */
2977 { if ((yyvsp[0].comp)->type == DEMANGLE_COMPONENT_LITERAL
2978 || (yyvsp[0].comp)->type == DEMANGLE_COMPONENT_LITERAL_NEG)
2979 {
2980 (yyval.comp) = (yyvsp[0].comp);
2981 d_left ((yyvsp[0].comp)) = (yyvsp[-2].comp);
2982 }
2983 else
2984 (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_UNARY,
2985 fill_comp (DEMANGLE_COMPONENT_CAST, (yyvsp[-2].comp), NULL),
2986 (yyvsp[0].comp));
2987 }
2988 #line 2990 "cp-name-parser.c" /* yacc.c:1646 */
2989 break;
2990
2991 case 168:
2992 #line 1045 "cp-name-parser.y" /* yacc.c:1646 */
2993 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_UNARY,
2994 fill_comp (DEMANGLE_COMPONENT_CAST, (yyvsp[-4].comp), NULL),
2995 (yyvsp[-1].comp));
2996 }
2997 #line 2999 "cp-name-parser.c" /* yacc.c:1646 */
2998 break;
2999
3000 case 169:
3001 #line 1052 "cp-name-parser.y" /* yacc.c:1646 */
3002 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_UNARY,
3003 fill_comp (DEMANGLE_COMPONENT_CAST, (yyvsp[-4].comp), NULL),
3004 (yyvsp[-1].comp));
3005 }
3006 #line 3008 "cp-name-parser.c" /* yacc.c:1646 */
3007 break;
3008
3009 case 170:
3010 #line 1059 "cp-name-parser.y" /* yacc.c:1646 */
3011 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_UNARY,
3012 fill_comp (DEMANGLE_COMPONENT_CAST, (yyvsp[-4].comp), NULL),
3013 (yyvsp[-1].comp));
3014 }
3015 #line 3017 "cp-name-parser.c" /* yacc.c:1646 */
3016 break;
3017
3018 case 171:
3019 #line 1078 "cp-name-parser.y" /* yacc.c:1646 */
3020 { (yyval.comp) = d_binary ("*", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3021 #line 3023 "cp-name-parser.c" /* yacc.c:1646 */
3022 break;
3023
3024 case 172:
3025 #line 1082 "cp-name-parser.y" /* yacc.c:1646 */
3026 { (yyval.comp) = d_binary ("/", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3027 #line 3029 "cp-name-parser.c" /* yacc.c:1646 */
3028 break;
3029
3030 case 173:
3031 #line 1086 "cp-name-parser.y" /* yacc.c:1646 */
3032 { (yyval.comp) = d_binary ("%", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3033 #line 3035 "cp-name-parser.c" /* yacc.c:1646 */
3034 break;
3035
3036 case 174:
3037 #line 1090 "cp-name-parser.y" /* yacc.c:1646 */
3038 { (yyval.comp) = d_binary ("+", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3039 #line 3041 "cp-name-parser.c" /* yacc.c:1646 */
3040 break;
3041
3042 case 175:
3043 #line 1094 "cp-name-parser.y" /* yacc.c:1646 */
3044 { (yyval.comp) = d_binary ("-", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3045 #line 3047 "cp-name-parser.c" /* yacc.c:1646 */
3046 break;
3047
3048 case 176:
3049 #line 1098 "cp-name-parser.y" /* yacc.c:1646 */
3050 { (yyval.comp) = d_binary ("<<", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3051 #line 3053 "cp-name-parser.c" /* yacc.c:1646 */
3052 break;
3053
3054 case 177:
3055 #line 1102 "cp-name-parser.y" /* yacc.c:1646 */
3056 { (yyval.comp) = d_binary (">>", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3057 #line 3059 "cp-name-parser.c" /* yacc.c:1646 */
3058 break;
3059
3060 case 178:
3061 #line 1106 "cp-name-parser.y" /* yacc.c:1646 */
3062 { (yyval.comp) = d_binary ("==", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3063 #line 3065 "cp-name-parser.c" /* yacc.c:1646 */
3064 break;
3065
3066 case 179:
3067 #line 1110 "cp-name-parser.y" /* yacc.c:1646 */
3068 { (yyval.comp) = d_binary ("!=", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3069 #line 3071 "cp-name-parser.c" /* yacc.c:1646 */
3070 break;
3071
3072 case 180:
3073 #line 1114 "cp-name-parser.y" /* yacc.c:1646 */
3074 { (yyval.comp) = d_binary ("<=", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3075 #line 3077 "cp-name-parser.c" /* yacc.c:1646 */
3076 break;
3077
3078 case 181:
3079 #line 1118 "cp-name-parser.y" /* yacc.c:1646 */
3080 { (yyval.comp) = d_binary (">=", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3081 #line 3083 "cp-name-parser.c" /* yacc.c:1646 */
3082 break;
3083
3084 case 182:
3085 #line 1122 "cp-name-parser.y" /* yacc.c:1646 */
3086 { (yyval.comp) = d_binary ("<", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3087 #line 3089 "cp-name-parser.c" /* yacc.c:1646 */
3088 break;
3089
3090 case 183:
3091 #line 1126 "cp-name-parser.y" /* yacc.c:1646 */
3092 { (yyval.comp) = d_binary ("&", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3093 #line 3095 "cp-name-parser.c" /* yacc.c:1646 */
3094 break;
3095
3096 case 184:
3097 #line 1130 "cp-name-parser.y" /* yacc.c:1646 */
3098 { (yyval.comp) = d_binary ("^", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3099 #line 3101 "cp-name-parser.c" /* yacc.c:1646 */
3100 break;
3101
3102 case 185:
3103 #line 1134 "cp-name-parser.y" /* yacc.c:1646 */
3104 { (yyval.comp) = d_binary ("|", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3105 #line 3107 "cp-name-parser.c" /* yacc.c:1646 */
3106 break;
3107
3108 case 186:
3109 #line 1138 "cp-name-parser.y" /* yacc.c:1646 */
3110 { (yyval.comp) = d_binary ("&&", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3111 #line 3113 "cp-name-parser.c" /* yacc.c:1646 */
3112 break;
3113
3114 case 187:
3115 #line 1142 "cp-name-parser.y" /* yacc.c:1646 */
3116 { (yyval.comp) = d_binary ("||", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3117 #line 3119 "cp-name-parser.c" /* yacc.c:1646 */
3118 break;
3119
3120 case 188:
3121 #line 1147 "cp-name-parser.y" /* yacc.c:1646 */
3122 { (yyval.comp) = d_binary ("->", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3123 #line 3125 "cp-name-parser.c" /* yacc.c:1646 */
3124 break;
3125
3126 case 189:
3127 #line 1151 "cp-name-parser.y" /* yacc.c:1646 */
3128 { (yyval.comp) = d_binary (".", (yyvsp[-2].comp), (yyvsp[0].comp)); }
3129 #line 3131 "cp-name-parser.c" /* yacc.c:1646 */
3130 break;
3131
3132 case 190:
3133 #line 1155 "cp-name-parser.y" /* yacc.c:1646 */
3134 { (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_TRINARY, make_operator ("?", 3),
3135 fill_comp (DEMANGLE_COMPONENT_TRINARY_ARG1, (yyvsp[-4].comp),
3136 fill_comp (DEMANGLE_COMPONENT_TRINARY_ARG2, (yyvsp[-2].comp), (yyvsp[0].comp))));
3137 }
3138 #line 3140 "cp-name-parser.c" /* yacc.c:1646 */
3139 break;
3140
3141 case 193:
3142 #line 1169 "cp-name-parser.y" /* yacc.c:1646 */
3143 {
3144 /* Match the whitespacing of cplus_demangle_operators.
3145 It would abort on unrecognized string otherwise. */
3146 (yyval.comp) = d_unary ("sizeof ", (yyvsp[-1].comp));
3147 }
3148 #line 3150 "cp-name-parser.c" /* yacc.c:1646 */
3149 break;
3150
3151 case 194:
3152 #line 1178 "cp-name-parser.y" /* yacc.c:1646 */
3153 { struct demangle_component *i;
3154 i = make_name ("1", 1);
3155 (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_LITERAL,
3156 make_builtin_type ("bool"),
3157 i);
3158 }
3159 #line 3161 "cp-name-parser.c" /* yacc.c:1646 */
3160 break;
3161
3162 case 195:
3163 #line 1187 "cp-name-parser.y" /* yacc.c:1646 */
3164 { struct demangle_component *i;
3165 i = make_name ("0", 1);
3166 (yyval.comp) = fill_comp (DEMANGLE_COMPONENT_LITERAL,
3167 make_builtin_type ("bool"),
3168 i);
3169 }
3170 #line 3172 "cp-name-parser.c" /* yacc.c:1646 */
3171 break;
3172
3173
3174 #line 3176 "cp-name-parser.c" /* yacc.c:1646 */
3175 default: break;
3176 }
3177 /* User semantic actions sometimes alter yychar, and that requires
3178 that yytoken be updated with the new translation. We take the
3179 approach of translating immediately before every use of yytoken.
3180 One alternative is translating here after every semantic action,
3181 but that translation would be missed if the semantic action invokes
3182 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3183 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3184 incorrect destructor might then be invoked immediately. In the
3185 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3186 to an incorrect destructor call or verbose syntax error message
3187 before the lookahead is translated. */
3188 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3189
3190 YYPOPSTACK (yylen);
3191 yylen = 0;
3192 YY_STACK_PRINT (yyss, yyssp);
3193
3194 *++yyvsp = yyval;
3195
3196 /* Now 'shift' the result of the reduction. Determine what state
3197 that goes to, based on the state we popped back to and the rule
3198 number reduced by. */
3199
3200 yyn = yyr1[yyn];
3201
3202 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3203 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3204 yystate = yytable[yystate];
3205 else
3206 yystate = yydefgoto[yyn - YYNTOKENS];
3207
3208 goto yynewstate;
3209
3210
3211 /*--------------------------------------.
3212 | yyerrlab -- here on detecting error. |
3213 `--------------------------------------*/
3214 yyerrlab:
3215 /* Make sure we have latest lookahead translation. See comments at
3216 user semantic actions for why this is necessary. */
3217 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3218
3219 /* If not already recovering from an error, report this error. */
3220 if (!yyerrstatus)
3221 {
3222 ++yynerrs;
3223 #if ! YYERROR_VERBOSE
3224 yyerror (YY_("syntax error"));
3225 #else
3226 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3227 yyssp, yytoken)
3228 {
3229 char const *yymsgp = YY_("syntax error");
3230 int yysyntax_error_status;
3231 yysyntax_error_status = YYSYNTAX_ERROR;
3232 if (yysyntax_error_status == 0)
3233 yymsgp = yymsg;
3234 else if (yysyntax_error_status == 1)
3235 {
3236 if (yymsg != yymsgbuf)
3237 YYSTACK_FREE (yymsg);
3238 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3239 if (!yymsg)
3240 {
3241 yymsg = yymsgbuf;
3242 yymsg_alloc = sizeof yymsgbuf;
3243 yysyntax_error_status = 2;
3244 }
3245 else
3246 {
3247 yysyntax_error_status = YYSYNTAX_ERROR;
3248 yymsgp = yymsg;
3249 }
3250 }
3251 yyerror (yymsgp);
3252 if (yysyntax_error_status == 2)
3253 goto yyexhaustedlab;
3254 }
3255 # undef YYSYNTAX_ERROR
3256 #endif
3257 }
3258
3259
3260
3261 if (yyerrstatus == 3)
3262 {
3263 /* If just tried and failed to reuse lookahead token after an
3264 error, discard it. */
3265
3266 if (yychar <= YYEOF)
3267 {
3268 /* Return failure if at end of input. */
3269 if (yychar == YYEOF)
3270 YYABORT;
3271 }
3272 else
3273 {
3274 yydestruct ("Error: discarding",
3275 yytoken, &yylval);
3276 yychar = YYEMPTY;
3277 }
3278 }
3279
3280 /* Else will try to reuse lookahead token after shifting the error
3281 token. */
3282 goto yyerrlab1;
3283
3284
3285 /*---------------------------------------------------.
3286 | yyerrorlab -- error raised explicitly by YYERROR. |
3287 `---------------------------------------------------*/
3288 yyerrorlab:
3289
3290 /* Pacify compilers like GCC when the user code never invokes
3291 YYERROR and the label yyerrorlab therefore never appears in user
3292 code. */
3293 if (/*CONSTCOND*/ 0)
3294 goto yyerrorlab;
3295
3296 /* Do not reclaim the symbols of the rule whose action triggered
3297 this YYERROR. */
3298 YYPOPSTACK (yylen);
3299 yylen = 0;
3300 YY_STACK_PRINT (yyss, yyssp);
3301 yystate = *yyssp;
3302 goto yyerrlab1;
3303
3304
3305 /*-------------------------------------------------------------.
3306 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3307 `-------------------------------------------------------------*/
3308 yyerrlab1:
3309 yyerrstatus = 3; /* Each real token shifted decrements this. */
3310
3311 for (;;)
3312 {
3313 yyn = yypact[yystate];
3314 if (!yypact_value_is_default (yyn))
3315 {
3316 yyn += YYTERROR;
3317 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3318 {
3319 yyn = yytable[yyn];
3320 if (0 < yyn)
3321 break;
3322 }
3323 }
3324
3325 /* Pop the current state because it cannot handle the error token. */
3326 if (yyssp == yyss)
3327 YYABORT;
3328
3329
3330 yydestruct ("Error: popping",
3331 yystos[yystate], yyvsp);
3332 YYPOPSTACK (1);
3333 yystate = *yyssp;
3334 YY_STACK_PRINT (yyss, yyssp);
3335 }
3336
3337 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
3338 *++yyvsp = yylval;
3339 YY_IGNORE_MAYBE_UNINITIALIZED_END
3340
3341
3342 /* Shift the error token. */
3343 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3344
3345 yystate = yyn;
3346 goto yynewstate;
3347
3348
3349 /*-------------------------------------.
3350 | yyacceptlab -- YYACCEPT comes here. |
3351 `-------------------------------------*/
3352 yyacceptlab:
3353 yyresult = 0;
3354 goto yyreturn;
3355
3356 /*-----------------------------------.
3357 | yyabortlab -- YYABORT comes here. |
3358 `-----------------------------------*/
3359 yyabortlab:
3360 yyresult = 1;
3361 goto yyreturn;
3362
3363 #if !defined yyoverflow || YYERROR_VERBOSE
3364 /*-------------------------------------------------.
3365 | yyexhaustedlab -- memory exhaustion comes here. |
3366 `-------------------------------------------------*/
3367 yyexhaustedlab:
3368 yyerror (YY_("memory exhausted"));
3369 yyresult = 2;
3370 /* Fall through. */
3371 #endif
3372
3373 yyreturn:
3374 if (yychar != YYEMPTY)
3375 {
3376 /* Make sure we have latest lookahead translation. See comments at
3377 user semantic actions for why this is necessary. */
3378 yytoken = YYTRANSLATE (yychar);
3379 yydestruct ("Cleanup: discarding lookahead",
3380 yytoken, &yylval);
3381 }
3382 /* Do not reclaim the symbols of the rule whose action triggered
3383 this YYABORT or YYACCEPT. */
3384 YYPOPSTACK (yylen);
3385 YY_STACK_PRINT (yyss, yyssp);
3386 while (yyssp != yyss)
3387 {
3388 yydestruct ("Cleanup: popping",
3389 yystos[*yyssp], yyvsp);
3390 YYPOPSTACK (1);
3391 }
3392 #ifndef yyoverflow
3393 if (yyss != yyssa)
3394 YYSTACK_FREE (yyss);
3395 #endif
3396 #if YYERROR_VERBOSE
3397 if (yymsg != yymsgbuf)
3398 YYSTACK_FREE (yymsg);
3399 #endif
3400 return yyresult;
3401 }
3402 #line 1197 "cp-name-parser.y" /* yacc.c:1906 */
3403
3404
3405 /* Apply QUALIFIERS to LHS and return a qualified component. IS_METHOD
3406 is set if LHS is a method, in which case the qualifiers are logically
3407 applied to "this". We apply qualifiers in a consistent order; LHS
3408 may already be qualified; duplicate qualifiers are not created. */
3409
3410 struct demangle_component *
3411 d_qualify (struct demangle_component *lhs, int qualifiers, int is_method)
3412 {
3413 struct demangle_component **inner_p;
3414 enum demangle_component_type type;
3415
3416 /* For now the order is CONST (innermost), VOLATILE, RESTRICT. */
3417
3418 #define HANDLE_QUAL(TYPE, MTYPE, QUAL) \
3419 if ((qualifiers & QUAL) && (type != TYPE) && (type != MTYPE)) \
3420 { \
3421 *inner_p = fill_comp (is_method ? MTYPE : TYPE, \
3422 *inner_p, NULL); \
3423 inner_p = &d_left (*inner_p); \
3424 type = (*inner_p)->type; \
3425 } \
3426 else if (type == TYPE || type == MTYPE) \
3427 { \
3428 inner_p = &d_left (*inner_p); \
3429 type = (*inner_p)->type; \
3430 }
3431
3432 inner_p = &lhs;
3433
3434 type = (*inner_p)->type;
3435
3436 HANDLE_QUAL (DEMANGLE_COMPONENT_RESTRICT, DEMANGLE_COMPONENT_RESTRICT_THIS, QUAL_RESTRICT);
3437 HANDLE_QUAL (DEMANGLE_COMPONENT_VOLATILE, DEMANGLE_COMPONENT_VOLATILE_THIS, QUAL_VOLATILE);
3438 HANDLE_QUAL (DEMANGLE_COMPONENT_CONST, DEMANGLE_COMPONENT_CONST_THIS, QUAL_CONST);
3439
3440 return lhs;
3441 }
3442
3443 /* Return a builtin type corresponding to FLAGS. */
3444
3445 static struct demangle_component *
3446 d_int_type (int flags)
3447 {
3448 const char *name;
3449
3450 switch (flags)
3451 {
3452 case INT_SIGNED | INT_CHAR:
3453 name = "signed char";
3454 break;
3455 case INT_CHAR:
3456 name = "char";
3457 break;
3458 case INT_UNSIGNED | INT_CHAR:
3459 name = "unsigned char";
3460 break;
3461 case 0:
3462 case INT_SIGNED:
3463 name = "int";
3464 break;
3465 case INT_UNSIGNED:
3466 name = "unsigned int";
3467 break;
3468 case INT_LONG:
3469 case INT_SIGNED | INT_LONG:
3470 name = "long";
3471 break;
3472 case INT_UNSIGNED | INT_LONG:
3473 name = "unsigned long";
3474 break;
3475 case INT_SHORT:
3476 case INT_SIGNED | INT_SHORT:
3477 name = "short";
3478 break;
3479 case INT_UNSIGNED | INT_SHORT:
3480 name = "unsigned short";
3481 break;
3482 case INT_LLONG | INT_LONG:
3483 case INT_SIGNED | INT_LLONG | INT_LONG:
3484 name = "long long";
3485 break;
3486 case INT_UNSIGNED | INT_LLONG | INT_LONG:
3487 name = "unsigned long long";
3488 break;
3489 default:
3490 return NULL;
3491 }
3492
3493 return make_builtin_type (name);
3494 }
3495
3496 /* Wrapper to create a unary operation. */
3497
3498 static struct demangle_component *
3499 d_unary (const char *name, struct demangle_component *lhs)
3500 {
3501 return fill_comp (DEMANGLE_COMPONENT_UNARY, make_operator (name, 1), lhs);
3502 }
3503
3504 /* Wrapper to create a binary operation. */
3505
3506 static struct demangle_component *
3507 d_binary (const char *name, struct demangle_component *lhs, struct demangle_component *rhs)
3508 {
3509 return fill_comp (DEMANGLE_COMPONENT_BINARY, make_operator (name, 2),
3510 fill_comp (DEMANGLE_COMPONENT_BINARY_ARGS, lhs, rhs));
3511 }
3512
3513 /* Like ISALPHA, but also returns true for the union of all UTF-8
3514 multi-byte sequence bytes and non-ASCII characters in
3515 extended-ASCII charsets (e.g., Latin1). I.e., returns true if the
3516 high bit is set. Note that not all UTF-8 ranges are allowed in C++
3517 identifiers, but we don't need to be pedantic so for simplicity we
3518 ignore that here. Plus this avoids the complication of actually
3519 knowing what was the right encoding. */
3520
3521 static inline bool
3522 cp_ident_is_alpha (unsigned char ch)
3523 {
3524 return ISALPHA (ch) || ch >= 0x80;
3525 }
3526
3527 /* Similarly, but Like ISALNUM. */
3528
3529 static inline bool
3530 cp_ident_is_alnum (unsigned char ch)
3531 {
3532 return ISALNUM (ch) || ch >= 0x80;
3533 }
3534
3535 /* Find the end of a symbol name starting at LEXPTR. */
3536
3537 static const char *
3538 symbol_end (const char *lexptr)
3539 {
3540 const char *p = lexptr;
3541
3542 while (*p && (cp_ident_is_alnum (*p) || *p == '_' || *p == '$' || *p == '.'))
3543 p++;
3544
3545 return p;
3546 }
3547
3548 /* Take care of parsing a number (anything that starts with a digit).
3549 The number starts at P and contains LEN characters. Store the result in
3550 YYLVAL. */
3551
3552 static int
3553 parse_number (const char *p, int len, int parsed_float)
3554 {
3555 int unsigned_p = 0;
3556
3557 /* Number of "L" suffixes encountered. */
3558 int long_p = 0;
3559
3560 struct demangle_component *signed_type;
3561 struct demangle_component *unsigned_type;
3562 struct demangle_component *type, *name;
3563 enum demangle_component_type literal_type;
3564
3565 if (p[0] == '-')
3566 {
3567 literal_type = DEMANGLE_COMPONENT_LITERAL_NEG;
3568 p++;
3569 len--;
3570 }
3571 else
3572 literal_type = DEMANGLE_COMPONENT_LITERAL;
3573
3574 if (parsed_float)
3575 {
3576 /* It's a float since it contains a point or an exponent. */
3577 char c;
3578
3579 /* The GDB lexer checks the result of scanf at this point. Not doing
3580 this leaves our error checking slightly weaker but only for invalid
3581 data. */
3582
3583 /* See if it has `f' or `l' suffix (float or long double). */
3584
3585 c = TOLOWER (p[len - 1]);
3586
3587 if (c == 'f')
3588 {
3589 len--;
3590 type = make_builtin_type ("float");
3591 }
3592 else if (c == 'l')
3593 {
3594 len--;
3595 type = make_builtin_type ("long double");
3596 }
3597 else if (ISDIGIT (c) || c == '.')
3598 type = make_builtin_type ("double");
3599 else
3600 return ERROR;
3601
3602 name = make_name (p, len);
3603 yylval.comp = fill_comp (literal_type, type, name);
3604
3605 return FLOAT;
3606 }
3607
3608 /* This treats 0x1 and 1 as different literals. We also do not
3609 automatically generate unsigned types. */
3610
3611 long_p = 0;
3612 unsigned_p = 0;
3613 while (len > 0)
3614 {
3615 if (p[len - 1] == 'l' || p[len - 1] == 'L')
3616 {
3617 len--;
3618 long_p++;
3619 continue;
3620 }
3621 if (p[len - 1] == 'u' || p[len - 1] == 'U')
3622 {
3623 len--;
3624 unsigned_p++;
3625 continue;
3626 }
3627 break;
3628 }
3629
3630 if (long_p == 0)
3631 {
3632 unsigned_type = make_builtin_type ("unsigned int");
3633 signed_type = make_builtin_type ("int");
3634 }
3635 else if (long_p == 1)
3636 {
3637 unsigned_type = make_builtin_type ("unsigned long");
3638 signed_type = make_builtin_type ("long");
3639 }
3640 else
3641 {
3642 unsigned_type = make_builtin_type ("unsigned long long");
3643 signed_type = make_builtin_type ("long long");
3644 }
3645
3646 if (unsigned_p)
3647 type = unsigned_type;
3648 else
3649 type = signed_type;
3650
3651 name = make_name (p, len);
3652 yylval.comp = fill_comp (literal_type, type, name);
3653
3654 return INT;
3655 }
3656
3657 static char backslashable[] = "abefnrtv";
3658 static char represented[] = "\a\b\e\f\n\r\t\v";
3659
3660 /* Translate the backslash the way we would in the host character set. */
3661 static int
3662 c_parse_backslash (int host_char, int *target_char)
3663 {
3664 const char *ix;
3665 ix = strchr (backslashable, host_char);
3666 if (! ix)
3667 return 0;
3668 else
3669 *target_char = represented[ix - backslashable];
3670 return 1;
3671 }
3672
3673 /* Parse a C escape sequence. STRING_PTR points to a variable
3674 containing a pointer to the string to parse. That pointer
3675 should point to the character after the \. That pointer
3676 is updated past the characters we use. The value of the
3677 escape sequence is returned.
3678
3679 A negative value means the sequence \ newline was seen,
3680 which is supposed to be equivalent to nothing at all.
3681
3682 If \ is followed by a null character, we return a negative
3683 value and leave the string pointer pointing at the null character.
3684
3685 If \ is followed by 000, we return 0 and leave the string pointer
3686 after the zeros. A value of 0 does not mean end of string. */
3687
3688 static int
3689 cp_parse_escape (const char **string_ptr)
3690 {
3691 int target_char;
3692 int c = *(*string_ptr)++;
3693 if (c_parse_backslash (c, &target_char))
3694 return target_char;
3695 else
3696 switch (c)
3697 {
3698 case '\n':
3699 return -2;
3700 case 0:
3701 (*string_ptr)--;
3702 return 0;
3703 case '^':
3704 {
3705 c = *(*string_ptr)++;
3706
3707 if (c == '?')
3708 return 0177;
3709 else if (c == '\\')
3710 target_char = cp_parse_escape (string_ptr);
3711 else
3712 target_char = c;
3713
3714 /* Now target_char is something like `c', and we want to find
3715 its control-character equivalent. */
3716 target_char = target_char & 037;
3717
3718 return target_char;
3719 }
3720
3721 case '0':
3722 case '1':
3723 case '2':
3724 case '3':
3725 case '4':
3726 case '5':
3727 case '6':
3728 case '7':
3729 {
3730 int i = c - '0';
3731 int count = 0;
3732 while (++count < 3)
3733 {
3734 c = (**string_ptr);
3735 if (c >= '0' && c <= '7')
3736 {
3737 (*string_ptr)++;
3738 i *= 8;
3739 i += c - '0';
3740 }
3741 else
3742 {
3743 break;
3744 }
3745 }
3746 return i;
3747 }
3748 default:
3749 return c;
3750 }
3751 }
3752
3753 #define HANDLE_SPECIAL(string, comp) \
3754 if (strncmp (tokstart, string, sizeof (string) - 1) == 0) \
3755 { \
3756 lexptr = tokstart + sizeof (string) - 1; \
3757 yylval.lval = comp; \
3758 return DEMANGLER_SPECIAL; \
3759 }
3760
3761 #define HANDLE_TOKEN2(string, token) \
3762 if (lexptr[1] == string[1]) \
3763 { \
3764 lexptr += 2; \
3765 yylval.opname = string; \
3766 return token; \
3767 }
3768
3769 #define HANDLE_TOKEN3(string, token) \
3770 if (lexptr[1] == string[1] && lexptr[2] == string[2]) \
3771 { \
3772 lexptr += 3; \
3773 yylval.opname = string; \
3774 return token; \
3775 }
3776
3777 /* Read one token, getting characters through LEXPTR. */
3778
3779 static int
3780 yylex (void)
3781 {
3782 int c;
3783 int namelen;
3784 const char *tokstart;
3785
3786 retry:
3787 prev_lexptr = lexptr;
3788 tokstart = lexptr;
3789
3790 switch (c = *tokstart)
3791 {
3792 case 0:
3793 return 0;
3794
3795 case ' ':
3796 case '\t':
3797 case '\n':
3798 lexptr++;
3799 goto retry;
3800
3801 case '\'':
3802 /* We either have a character constant ('0' or '\177' for example)
3803 or we have a quoted symbol reference ('foo(int,int)' in C++
3804 for example). */
3805 lexptr++;
3806 c = *lexptr++;
3807 if (c == '\\')
3808 c = cp_parse_escape (&lexptr);
3809 else if (c == '\'')
3810 {
3811 yyerror (_("empty character constant"));
3812 return ERROR;
3813 }
3814
3815 c = *lexptr++;
3816 if (c != '\'')
3817 {
3818 yyerror (_("invalid character constant"));
3819 return ERROR;
3820 }
3821
3822 /* FIXME: We should refer to a canonical form of the character,
3823 presumably the same one that appears in manglings - the decimal
3824 representation. But if that isn't in our input then we have to
3825 allocate memory for it somewhere. */
3826 yylval.comp = fill_comp (DEMANGLE_COMPONENT_LITERAL,
3827 make_builtin_type ("char"),
3828 make_name (tokstart, lexptr - tokstart));
3829
3830 return INT;
3831
3832 case '(':
3833 if (strncmp (tokstart, "(anonymous namespace)", 21) == 0)
3834 {
3835 lexptr += 21;
3836 yylval.comp = make_name ("(anonymous namespace)",
3837 sizeof "(anonymous namespace)" - 1);
3838 return NAME;
3839 }
3840 /* FALL THROUGH */
3841
3842 case ')':
3843 case ',':
3844 lexptr++;
3845 return c;
3846
3847 case '.':
3848 if (lexptr[1] == '.' && lexptr[2] == '.')
3849 {
3850 lexptr += 3;
3851 return ELLIPSIS;
3852 }
3853
3854 /* Might be a floating point number. */
3855 if (lexptr[1] < '0' || lexptr[1] > '9')
3856 goto symbol; /* Nope, must be a symbol. */
3857
3858 goto try_number;
3859
3860 case '-':
3861 HANDLE_TOKEN2 ("-=", ASSIGN_MODIFY);
3862 HANDLE_TOKEN2 ("--", DECREMENT);
3863 HANDLE_TOKEN2 ("->", ARROW);
3864
3865 /* For construction vtables. This is kind of hokey. */
3866 if (strncmp (tokstart, "-in-", 4) == 0)
3867 {
3868 lexptr += 4;
3869 return CONSTRUCTION_IN;
3870 }
3871
3872 if (lexptr[1] < '0' || lexptr[1] > '9')
3873 {
3874 lexptr++;
3875 return '-';
3876 }
3877 /* FALL THRU into number case. */
3878
3879 try_number:
3880 case '0':
3881 case '1':
3882 case '2':
3883 case '3':
3884 case '4':
3885 case '5':
3886 case '6':
3887 case '7':
3888 case '8':
3889 case '9':
3890 {
3891 /* It's a number. */
3892 int got_dot = 0, got_e = 0, toktype;
3893 const char *p = tokstart;
3894 int hex = 0;
3895
3896 if (c == '-')
3897 p++;
3898
3899 if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
3900 {
3901 p += 2;
3902 hex = 1;
3903 }
3904 else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
3905 {
3906 p += 2;
3907 hex = 0;
3908 }
3909
3910 for (;; ++p)
3911 {
3912 /* This test includes !hex because 'e' is a valid hex digit
3913 and thus does not indicate a floating point number when
3914 the radix is hex. */
3915 if (!hex && !got_e && (*p == 'e' || *p == 'E'))
3916 got_dot = got_e = 1;
3917 /* This test does not include !hex, because a '.' always indicates
3918 a decimal floating point number regardless of the radix.
3919
3920 NOTE drow/2005-03-09: This comment is not accurate in C99;
3921 however, it's not clear that all the floating point support
3922 in this file is doing any good here. */
3923 else if (!got_dot && *p == '.')
3924 got_dot = 1;
3925 else if (got_e && (p[-1] == 'e' || p[-1] == 'E')
3926 && (*p == '-' || *p == '+'))
3927 /* This is the sign of the exponent, not the end of the
3928 number. */
3929 continue;
3930 /* We will take any letters or digits. parse_number will
3931 complain if past the radix, or if L or U are not final. */
3932 else if (! ISALNUM (*p))
3933 break;
3934 }
3935 toktype = parse_number (tokstart, p - tokstart, got_dot|got_e);
3936 if (toktype == ERROR)
3937 {
3938 char *err_copy = (char *) alloca (p - tokstart + 1);
3939
3940 memcpy (err_copy, tokstart, p - tokstart);
3941 err_copy[p - tokstart] = 0;
3942 yyerror (_("invalid number"));
3943 return ERROR;
3944 }
3945 lexptr = p;
3946 return toktype;
3947 }
3948
3949 case '+':
3950 HANDLE_TOKEN2 ("+=", ASSIGN_MODIFY);
3951 HANDLE_TOKEN2 ("++", INCREMENT);
3952 lexptr++;
3953 return c;
3954 case '*':
3955 HANDLE_TOKEN2 ("*=", ASSIGN_MODIFY);
3956 lexptr++;
3957 return c;
3958 case '/':
3959 HANDLE_TOKEN2 ("/=", ASSIGN_MODIFY);
3960 lexptr++;
3961 return c;
3962 case '%':
3963 HANDLE_TOKEN2 ("%=", ASSIGN_MODIFY);
3964 lexptr++;
3965 return c;
3966 case '|':
3967 HANDLE_TOKEN2 ("|=", ASSIGN_MODIFY);
3968 HANDLE_TOKEN2 ("||", OROR);
3969 lexptr++;
3970 return c;
3971 case '&':
3972 HANDLE_TOKEN2 ("&=", ASSIGN_MODIFY);
3973 HANDLE_TOKEN2 ("&&", ANDAND);
3974 lexptr++;
3975 return c;
3976 case '^':
3977 HANDLE_TOKEN2 ("^=", ASSIGN_MODIFY);
3978 lexptr++;
3979 return c;
3980 case '!':
3981 HANDLE_TOKEN2 ("!=", NOTEQUAL);
3982 lexptr++;
3983 return c;
3984 case '<':
3985 HANDLE_TOKEN3 ("<<=", ASSIGN_MODIFY);
3986 HANDLE_TOKEN2 ("<=", LEQ);
3987 HANDLE_TOKEN2 ("<<", LSH);
3988 lexptr++;
3989 return c;
3990 case '>':
3991 HANDLE_TOKEN3 (">>=", ASSIGN_MODIFY);
3992 HANDLE_TOKEN2 (">=", GEQ);
3993 HANDLE_TOKEN2 (">>", RSH);
3994 lexptr++;
3995 return c;
3996 case '=':
3997 HANDLE_TOKEN2 ("==", EQUAL);
3998 lexptr++;
3999 return c;
4000 case ':':
4001 HANDLE_TOKEN2 ("::", COLONCOLON);
4002 lexptr++;
4003 return c;
4004
4005 case '[':
4006 case ']':
4007 case '?':
4008 case '@':
4009 case '~':
4010 case '{':
4011 case '}':
4012 symbol:
4013 lexptr++;
4014 return c;
4015
4016 case '"':
4017 /* These can't occur in C++ names. */
4018 yyerror (_("unexpected string literal"));
4019 return ERROR;
4020 }
4021
4022 if (!(c == '_' || c == '$' || cp_ident_is_alpha (c)))
4023 {
4024 /* We must have come across a bad character (e.g. ';'). */
4025 yyerror (_("invalid character"));
4026 return ERROR;
4027 }
4028
4029 /* It's a name. See how long it is. */
4030 namelen = 0;
4031 do
4032 c = tokstart[++namelen];
4033 while (cp_ident_is_alnum (c) || c == '_' || c == '$');
4034
4035 lexptr += namelen;
4036
4037 /* Catch specific keywords. Notice that some of the keywords contain
4038 spaces, and are sorted by the length of the first word. They must
4039 all include a trailing space in the string comparison. */
4040 switch (namelen)
4041 {
4042 case 16:
4043 if (strncmp (tokstart, "reinterpret_cast", 16) == 0)
4044 return REINTERPRET_CAST;
4045 break;
4046 case 12:
4047 if (strncmp (tokstart, "construction vtable for ", 24) == 0)
4048 {
4049 lexptr = tokstart + 24;
4050 return CONSTRUCTION_VTABLE;
4051 }
4052 if (strncmp (tokstart, "dynamic_cast", 12) == 0)
4053 return DYNAMIC_CAST;
4054 break;
4055 case 11:
4056 if (strncmp (tokstart, "static_cast", 11) == 0)
4057 return STATIC_CAST;
4058 break;
4059 case 9:
4060 HANDLE_SPECIAL ("covariant return thunk to ", DEMANGLE_COMPONENT_COVARIANT_THUNK);
4061 HANDLE_SPECIAL ("reference temporary for ", DEMANGLE_COMPONENT_REFTEMP);
4062 break;
4063 case 8:
4064 HANDLE_SPECIAL ("typeinfo for ", DEMANGLE_COMPONENT_TYPEINFO);
4065 HANDLE_SPECIAL ("typeinfo fn for ", DEMANGLE_COMPONENT_TYPEINFO_FN);
4066 HANDLE_SPECIAL ("typeinfo name for ", DEMANGLE_COMPONENT_TYPEINFO_NAME);
4067 if (strncmp (tokstart, "operator", 8) == 0)
4068 return OPERATOR;
4069 if (strncmp (tokstart, "restrict", 8) == 0)
4070 return RESTRICT;
4071 if (strncmp (tokstart, "unsigned", 8) == 0)
4072 return UNSIGNED;
4073 if (strncmp (tokstart, "template", 8) == 0)
4074 return TEMPLATE;
4075 if (strncmp (tokstart, "volatile", 8) == 0)
4076 return VOLATILE_KEYWORD;
4077 break;
4078 case 7:
4079 HANDLE_SPECIAL ("virtual thunk to ", DEMANGLE_COMPONENT_VIRTUAL_THUNK);
4080 if (strncmp (tokstart, "wchar_t", 7) == 0)
4081 return WCHAR_T;
4082 break;
4083 case 6:
4084 if (strncmp (tokstart, "global constructors keyed to ", 29) == 0)
4085 {
4086 const char *p;
4087 lexptr = tokstart + 29;
4088 yylval.lval = DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS;
4089 /* Find the end of the symbol. */
4090 p = symbol_end (lexptr);
4091 yylval.comp = make_name (lexptr, p - lexptr);
4092 lexptr = p;
4093 return DEMANGLER_SPECIAL;
4094 }
4095 if (strncmp (tokstart, "global destructors keyed to ", 28) == 0)
4096 {
4097 const char *p;
4098 lexptr = tokstart + 28;
4099 yylval.lval = DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS;
4100 /* Find the end of the symbol. */
4101 p = symbol_end (lexptr);
4102 yylval.comp = make_name (lexptr, p - lexptr);
4103 lexptr = p;
4104 return DEMANGLER_SPECIAL;
4105 }
4106
4107 HANDLE_SPECIAL ("vtable for ", DEMANGLE_COMPONENT_VTABLE);
4108 if (strncmp (tokstart, "delete", 6) == 0)
4109 return DELETE;
4110 if (strncmp (tokstart, "struct", 6) == 0)
4111 return STRUCT;
4112 if (strncmp (tokstart, "signed", 6) == 0)
4113 return SIGNED_KEYWORD;
4114 if (strncmp (tokstart, "sizeof", 6) == 0)
4115 return SIZEOF;
4116 if (strncmp (tokstart, "double", 6) == 0)
4117 return DOUBLE_KEYWORD;
4118 break;
4119 case 5:
4120 HANDLE_SPECIAL ("guard variable for ", DEMANGLE_COMPONENT_GUARD);
4121 if (strncmp (tokstart, "false", 5) == 0)
4122 return FALSEKEYWORD;
4123 if (strncmp (tokstart, "class", 5) == 0)
4124 return CLASS;
4125 if (strncmp (tokstart, "union", 5) == 0)
4126 return UNION;
4127 if (strncmp (tokstart, "float", 5) == 0)
4128 return FLOAT_KEYWORD;
4129 if (strncmp (tokstart, "short", 5) == 0)
4130 return SHORT;
4131 if (strncmp (tokstart, "const", 5) == 0)
4132 return CONST_KEYWORD;
4133 break;
4134 case 4:
4135 if (strncmp (tokstart, "void", 4) == 0)
4136 return VOID;
4137 if (strncmp (tokstart, "bool", 4) == 0)
4138 return BOOL;
4139 if (strncmp (tokstart, "char", 4) == 0)
4140 return CHAR;
4141 if (strncmp (tokstart, "enum", 4) == 0)
4142 return ENUM;
4143 if (strncmp (tokstart, "long", 4) == 0)
4144 return LONG;
4145 if (strncmp (tokstart, "true", 4) == 0)
4146 return TRUEKEYWORD;
4147 break;
4148 case 3:
4149 HANDLE_SPECIAL ("VTT for ", DEMANGLE_COMPONENT_VTT);
4150 HANDLE_SPECIAL ("non-virtual thunk to ", DEMANGLE_COMPONENT_THUNK);
4151 if (strncmp (tokstart, "new", 3) == 0)
4152 return NEW;
4153 if (strncmp (tokstart, "int", 3) == 0)
4154 return INT_KEYWORD;
4155 break;
4156 default:
4157 break;
4158 }
4159
4160 yylval.comp = make_name (tokstart, namelen);
4161 return NAME;
4162 }
4163
4164 static void
4165 yyerror (const char *msg)
4166 {
4167 if (global_errmsg)
4168 return;
4169
4170 error_lexptr = prev_lexptr;
4171 global_errmsg = msg ? msg : "parse error";
4172 }
4173
4174 /* Allocate a chunk of the components we'll need to build a tree. We
4175 generally allocate too many components, but the extra memory usage
4176 doesn't hurt because the trees are temporary and the storage is
4177 reused. More may be allocated later, by d_grab. */
4178 static struct demangle_info *
4179 allocate_info (void)
4180 {
4181 struct demangle_info *info = XNEW (struct demangle_info);
4182
4183 info->next = NULL;
4184 info->used = 0;
4185 return info;
4186 }
4187
4188 /* Convert RESULT to a string. The return value is allocated
4189 using xmalloc. ESTIMATED_LEN is used only as a guide to the
4190 length of the result. This functions handles a few cases that
4191 cplus_demangle_print does not, specifically the global destructor
4192 and constructor labels. */
4193
4194 gdb::unique_xmalloc_ptr<char>
4195 cp_comp_to_string (struct demangle_component *result, int estimated_len)
4196 {
4197 size_t err;
4198
4199 char *res = cplus_demangle_print (DMGL_PARAMS | DMGL_ANSI,
4200 result, estimated_len, &err);
4201 return gdb::unique_xmalloc_ptr<char> (res);
4202 }
4203
4204 /* Constructor for demangle_parse_info. */
4205
4206 demangle_parse_info::demangle_parse_info ()
4207 : info (NULL),
4208 tree (NULL)
4209 {
4210 obstack_init (&obstack);
4211 }
4212
4213 /* Destructor for demangle_parse_info. */
4214
4215 demangle_parse_info::~demangle_parse_info ()
4216 {
4217 /* Free any allocated chunks of memory for the parse. */
4218 while (info != NULL)
4219 {
4220 struct demangle_info *next = info->next;
4221
4222 xfree (info);
4223 info = next;
4224 }
4225
4226 /* Free any memory allocated during typedef replacement. */
4227 obstack_free (&obstack, NULL);
4228 }
4229
4230 /* Merge the two parse trees given by DEST and SRC. The parse tree
4231 in SRC is attached to DEST at the node represented by TARGET.
4232
4233 NOTE 1: Since there is no API to merge obstacks, this function does
4234 even attempt to try it. Fortunately, we do not (yet?) need this ability.
4235 The code will assert if SRC->obstack is not empty.
4236
4237 NOTE 2: The string from which SRC was parsed must not be freed, since
4238 this function will place pointers to that string into DEST. */
4239
4240 void
4241 cp_merge_demangle_parse_infos (struct demangle_parse_info *dest,
4242 struct demangle_component *target,
4243 struct demangle_parse_info *src)
4244
4245 {
4246 struct demangle_info *di;
4247
4248 /* Copy the SRC's parse data into DEST. */
4249 *target = *src->tree;
4250 di = dest->info;
4251 while (di->next != NULL)
4252 di = di->next;
4253 di->next = src->info;
4254
4255 /* Clear the (pointer to) SRC's parse data so that it is not freed when
4256 cp_demangled_parse_info_free is called. */
4257 src->info = NULL;
4258 }
4259
4260 /* Convert a demangled name to a demangle_component tree. On success,
4261 a structure containing the root of the new tree is returned. On
4262 error, NULL is returned, and an error message will be set in
4263 *ERRMSG (which does not need to be freed). */
4264
4265 struct std::unique_ptr<demangle_parse_info>
4266 cp_demangled_name_to_comp (const char *demangled_name, const char **errmsg)
4267 {
4268 static char errbuf[60];
4269
4270 prev_lexptr = lexptr = demangled_name;
4271 error_lexptr = NULL;
4272 global_errmsg = NULL;
4273
4274 demangle_info = allocate_info ();
4275
4276 std::unique_ptr<demangle_parse_info> result (new demangle_parse_info);
4277 result->info = demangle_info;
4278
4279 if (yyparse ())
4280 {
4281 if (global_errmsg && errmsg)
4282 {
4283 snprintf (errbuf, sizeof (errbuf) - 2, "%s, near `%s",
4284 global_errmsg, error_lexptr);
4285 strcat (errbuf, "'");
4286 *errmsg = errbuf;
4287 }
4288 return NULL;
4289 }
4290
4291 result->tree = global_result;
4292 global_result = NULL;
4293
4294 return result;
4295 }
4296
4297 #ifdef TEST_CPNAMES
4298
4299 static void
4300 cp_print (struct demangle_component *result)
4301 {
4302 char *str;
4303 size_t err = 0;
4304
4305 str = cplus_demangle_print (DMGL_PARAMS | DMGL_ANSI, result, 64, &err);
4306 if (str == NULL)
4307 return;
4308
4309 fputs (str, stdout);
4310
4311 xfree (str);
4312 }
4313
4314 static char
4315 trim_chars (char *lexptr, char **extra_chars)
4316 {
4317 char *p = (char *) symbol_end (lexptr);
4318 char c = 0;
4319
4320 if (*p)
4321 {
4322 c = *p;
4323 *p = 0;
4324 *extra_chars = p + 1;
4325 }
4326
4327 return c;
4328 }
4329
4330 /* When this file is built as a standalone program, xmalloc comes from
4331 libiberty --- in which case we have to provide xfree ourselves. */
4332
4333 void
4334 xfree (void *ptr)
4335 {
4336 if (ptr != NULL)
4337 {
4338 /* Literal `free' would get translated back to xfree again. */
4339 CONCAT2 (fr,ee) (ptr);
4340 }
4341 }
4342
4343 /* GDB normally defines internal_error itself, but when this file is built
4344 as a standalone program, we must also provide an implementation. */
4345
4346 void
4347 internal_error (const char *file, int line, const char *fmt, ...)
4348 {
4349 va_list ap;
4350
4351 va_start (ap, fmt);
4352 fprintf (stderr, "%s:%d: internal error: ", file, line);
4353 vfprintf (stderr, fmt, ap);
4354 exit (1);
4355 }
4356
4357 int
4358 main (int argc, char **argv)
4359 {
4360 char *str2, *extra_chars, c;
4361 char buf[65536];
4362 int arg;
4363 const char *errmsg;
4364
4365 arg = 1;
4366 if (argv[arg] && strcmp (argv[arg], "--debug") == 0)
4367 {
4368 yydebug = 1;
4369 arg++;
4370 }
4371
4372 if (argv[arg] == NULL)
4373 while (fgets (buf, 65536, stdin) != NULL)
4374 {
4375 int len;
4376 buf[strlen (buf) - 1] = 0;
4377 /* Use DMGL_VERBOSE to get expanded standard substitutions. */
4378 c = trim_chars (buf, &extra_chars);
4379 str2 = cplus_demangle (buf, DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE);
4380 if (str2 == NULL)
4381 {
4382 printf ("Demangling error\n");
4383 if (c)
4384 printf ("%s%c%s\n", buf, c, extra_chars);
4385 else
4386 printf ("%s\n", buf);
4387 continue;
4388 }
4389
4390 std::unique_ptr<demangle_parse_info> result
4391 = cp_demangled_name_to_comp (str2, &errmsg);
4392 if (result == NULL)
4393 {
4394 fputs (errmsg, stderr);
4395 fputc ('\n', stderr);
4396 continue;
4397 }
4398
4399 cp_print (result->tree);
4400
4401 xfree (str2);
4402 if (c)
4403 {
4404 putchar (c);
4405 fputs (extra_chars, stdout);
4406 }
4407 putchar ('\n');
4408 }
4409 else
4410 {
4411 std::unique_ptr<demangle_parse_info> result
4412 = cp_demangled_name_to_comp (argv[arg], &errmsg);
4413 if (result == NULL)
4414 {
4415 fputs (errmsg, stderr);
4416 fputc ('\n', stderr);
4417 return 0;
4418 }
4419 cp_print (result->tree);
4420 putchar ('\n');
4421 }
4422 return 0;
4423 }
4424
4425 #endif
ASSIGN_MODIFY
#define ASSIGN_MODIFY
Definition: cp-name-parser.c:404
err
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t err
Definition: gnu-nat.c:1822
yyrline
static const yytype_uint16 yyrline[]
Definition: ada-exp.c:614
HANDLE_QUAL
#define HANDLE_QUAL(TYPE, MTYPE, QUAL)
yylex
#define yylex
Definition: cp-name-parser.c:165
LONG
#define LONG
Definition: cp-name-parser.c:391
YYFPRINTF
#define YYFPRINTF
Definition: yy-remap.h:92
YYSTACK_ALLOC
#define YYSTACK_ALLOC
Definition: cp-name-parser.c:614
cp_ident_is_alnum
static bool cp_ident_is_alnum(unsigned char ch)
Definition: cp-name-parser.c:3530
yylen
#define yylen
Definition: cp-name-parser.c:195
cp_demangled_name_to_comp
struct std::unique_ptr< demangle_parse_info > cp_demangled_name_to_comp(const char *demangled_name, const char **errmsg)
Definition: cp-name-parser.c:4266
parse_number
static int parse_number(const char *p, int len, int parsed_float)
Definition: cp-name-parser.c:3553
backslashable
static char backslashable[]
Definition: cp-name-parser.c:3657
RSH
#define RSH
Definition: cp-name-parser.c:417
YYFINAL
#define YYFINAL
Definition: cp-name-parser.c:704
INT_LONG
#define INT_LONG
Definition: cp-name-parser.c:150
SIZEOF
#define SIZEOF
Definition: cp-name-parser.c:379
YYSTYPE::fold_flag
int fold_flag
Definition: cp-name-parser.c:442
QUAL_VOLATILE
#define QUAL_VOLATILE
Definition: cp-name-parser.c:144
YYMAXDEPTH
#define YYMAXDEPTH
Definition: cp-name-parser.c:1448
INT_LLONG
#define INT_LLONG
Definition: cp-name-parser.c:151
YYSTACK_RELOCATE
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: cp-name-parser.c:670
YYEMPTY
#define YYEMPTY
Definition: cp-name-parser.c:1272
FLOAT
#define FLOAT
Definition: cp-name-parser.c:373
yyvs
#define yyvs
Definition: cp-name-parser.c:207
yyr2
#define yyr2
Definition: cp-name-parser.c:172
cp_merge_demangle_parse_infos
void cp_merge_demangle_parse_infos(struct demangle_parse_info *dest, struct demangle_component *target, struct demangle_parse_info *src)
Definition: cp-name-parser.c:4241
yylloc
#define yylloc
Definition: cp-name-parser.c:189
CONSTRUCTION_VTABLE
#define CONSTRUCTION_VTABLE
Definition: cp-name-parser.c:408
BOOL
#define BOOL
Definition: cp-name-parser.c:397
yyssp
#define yyssp
Definition: cp-name-parser.c:205
YYSTYPE::start
struct demangle_component * start
Definition: cp-name-parser.c:441
cp_comp_to_string
gdb::unique_xmalloc_ptr< char > cp_comp_to_string(struct demangle_component *result, int estimated_len)
Definition: cp-name-parser.c:4195
yystos
static const yytype_uint8 yystos[]
Definition: cp-name-parser.c:1182
FALSEKEYWORD
#define FALSEKEYWORD
Definition: cp-name-parser.c:406
d_right
#define d_right(dc)
Definition: cp-name-parser.c:284
VOLATILE_KEYWORD
#define VOLATILE_KEYWORD
Definition: cp-name-parser.c:395
YYINITDEPTH
#define YYINITDEPTH
Definition: cp-name-parser.c:1437
INT
#define INT
Definition: cp-name-parser.c:372
YYSTYPE::lval
int lval
Definition: cp-name-parser.c:444
yyerror
#define yyerror
Definition: cp-name-parser.c:166
YYPOPSTACK
#define YYPOPSTACK(N)
yyvsp
#define yyvsp
Definition: cp-name-parser.c:208
CONST_KEYWORD
#define CONST_KEYWORD
Definition: cp-name-parser.c:394
HANDLE_TOKEN3
#define HANDLE_TOKEN3(string, token)
Definition: cp-name-parser.c:3769
YYSTYPE::nested
Definition: cp-name-parser.c:431
YYTERROR
#define YYTERROR
Definition: cp-name-parser.c:1300
yyr1
#define yyr1
Definition: cp-name-parser.c:171
internal_error
void internal_error(const char *file, int line, const char *fmt,...)
Definition: errors.c:50
demangle_parse_info::tree
struct demangle_component * tree
Definition: cp-support.h:69
c_parse_backslash
static int c_parse_backslash(int host_char, int *target_char)
Definition: cp-name-parser.c:3662
SHORT
#define SHORT
Definition: cp-name-parser.c:392
ANDAND
#define ANDAND
Definition: cp-name-parser.c:411
ENUM
#define ENUM
Definition: cp-name-parser.c:378
YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: cp-name-parser.c:569
DELETE
#define DELETE
Definition: cp-name-parser.c:385
cp-support.h
_
#define _(String)
Definition: gdb_locale.h:35
yytname
static const char *const yytname[]
Definition: ada-exp.c:635
defs.h
FLOAT_KEYWORD
#define FLOAT_KEYWORD
Definition: cp-name-parser.c:401
YYPRINT
#define YYPRINT(FILE, TYPE, VALUE)
Definition: c-exp.c:328
INT_SIGNED
#define INT_SIGNED
Definition: cp-name-parser.c:153
global_errmsg
static const char * global_errmsg
Definition: cp-name-parser.c:84
UNSIGNED
#define UNSIGNED
Definition: cp-name-parser.c:380
INT_KEYWORD
#define INT_KEYWORD
Definition: cp-name-parser.c:393
YY_NULLPTRPTR
#define YY_NULLPTRPTR
Definition: cp-name-parser.c:293
yytype_int8
signed char yytype_int8
Definition: cp-name-parser.c:480
YYSTYPE::last
struct demangle_component * last
Definition: cp-name-parser.c:436
CHAR
#define CHAR
Definition: cp-name-parser.c:402
allocate_info
static struct demangle_info * allocate_info(void)
Definition: cp-name-parser.c:4179
YYSTYPE::nested::last
struct demangle_component ** last
Definition: cp-name-parser.c:433
QUAL_RESTRICT
#define QUAL_RESTRICT
Definition: cp-name-parser.c:143
demangle_parse_info::info
struct demangle_info * info
Definition: cp-support.h:66
XNEW
#define XNEW(T)
Definition: poison.h:109
SIGNED_KEYWORD
#define SIGNED_KEYWORD
Definition: cp-name-parser.c:390
global_result
static struct demangle_component * global_result
Definition: cp-name-parser.c:124
flags
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
Definition: gnu-nat.c:1891
make_builtin_type
static struct demangle_component * make_builtin_type(const char *name)
Definition: cp-name-parser.c:260
OPERATOR
#define OPERATOR
Definition: cp-name-parser.c:386
name
const char *const name
Definition: aarch64-tdep.c:76
GEQ
#define GEQ
Definition: cp-name-parser.c:415
demangle_info::used
int used
Definition: cp-name-parser.c:92
yytype_int16
short int yytype_int16
Definition: cp-name-parser.c:492
ERROR
#define ERROR
Definition: cp-name-parser.c:383
UNARY
#define UNARY
Definition: cp-name-parser.c:418
yychar
#define yychar
Definition: cp-name-parser.c:168
HANDLE_TOKEN2
#define HANDLE_TOKEN2(string, token)
Definition: cp-name-parser.c:3761
error_lexptr
static const char * error_lexptr
Definition: cp-name-parser.c:84
gdb::unique_xmalloc_ptr
std::unique_ptr< T, xfree_deleter< T > > unique_xmalloc_ptr
Definition: gdb_unique_ptr.h:48
yy_symbol_value_print
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: ada-exp.c:1060
yy_symbol_print
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: ada-exp.c:1079
WCHAR_T
#define WCHAR_T
Definition: cp-name-parser.c:403
yyss
#define yyss
Definition: cp-name-parser.c:203
yypgoto
static const yytype_int16 yypgoto[]
Definition: cp-name-parser.c:924
d_grab
static struct demangle_component * d_grab(void)
Definition: cp-name-parser.c:100
YY_REDUCE_PRINT
#define YY_REDUCE_PRINT(Rule)
Definition: cp-name-parser.c:1431
INT_SHORT
#define INT_SHORT
Definition: cp-name-parser.c:149
YYSTYPE::opname
const char * opname
Definition: cp-name-parser.c:445
yynerrs
#define yynerrs
Definition: cp-name-parser.c:179
YYSTYPE::nested::comp
struct demangle_component * comp
Definition: cp-name-parser.c:432
yyalloc::yyss_alloc
yytype_int16 yyss_alloc
Definition: ada-exp.c:500
demangle_info::comps
struct demangle_component comps[ALLOC_CHUNK]
Definition: cp-name-parser.c:94
YY_SYMBOL_PRINT
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: cp-name-parser.c:1429
type
Definition: gdbtypes.h:749
demangle_parse_info::obstack
struct obstack obstack
Definition: cp-support.h:72
yylval
#define yylval
Definition: cp-name-parser.c:167
demangle_parse_info::~demangle_parse_info
~demangle_parse_info()
Definition: cp-name-parser.c:4215
yytokentype
yytokentype
Definition: ada-exp.c:178
yytoknum
static const yytype_uint16 yytoknum[]
Definition: c-exp.c:699
DOUBLE_KEYWORD
#define DOUBLE_KEYWORD
Definition: cp-name-parser.c:396
yypact_value_is_default
#define yypact_value_is_default(Yystate)
Definition: cp-name-parser.c:836
YY_
#define YY_(Msgid)
Definition: cp-name-parser.c:518
VOID
#define VOID
Definition: cp-name-parser.c:400
cp_ident_is_alpha
static bool cp_ident_is_alpha(unsigned char ch)
Definition: cp-name-parser.c:3522
type
static const char * type
Definition: language.c:113
COLONCOLON
#define COLONCOLON
Definition: cp-name-parser.c:381
yyalloc::yyvs_alloc
YYSTYPE yyvs_alloc
Definition: ada-exp.c:501
yyrule
#define yyrule
Definition: cp-name-parser.c:193
yytype_uint16
unsigned short int yytype_uint16
Definition: ada-exp.c:336
yytype_uint16
unsigned short int yytype_uint16
Definition: cp-name-parser.c:486
YYSTYPE::nested
struct YYSTYPE::nested nested
yytable_value_is_error
#define yytable_value_is_error(Yytable_value)
Definition: cp-name-parser.c:841
demangle_parse_info
Definition: cp-support.h:59
yytype_uint8
unsigned char yytype_uint8
Definition: cp-name-parser.c:474
RESTRICT
#define RESTRICT
Definition: cp-name-parser.c:399
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: cp-name-parser.c:568
d_qualify
static struct demangle_component * d_qualify(struct demangle_component *, int, int)
Definition: cp-name-parser.c:3411
d_int_type
static struct demangle_component * d_int_type(int)
Definition: cp-name-parser.c:3446
fill_comp
static struct demangle_component * fill_comp(enum demangle_component_type d_type, struct demangle_component *lhs, struct demangle_component *rhs)
Definition: cp-name-parser.c:223
YYSTYPE::nested1
struct YYSTYPE::@30 nested1
STATIC_CAST
#define STATIC_CAST
Definition: cp-name-parser.c:387
INCREMENT
#define INCREMENT
Definition: cp-name-parser.c:419
yydefgoto
static const yytype_int16 yydefgoto[]
Definition: cp-name-parser.c:933
gdb_assert
#define gdb_assert(expr)
Definition: gdb_assert.h:32
QUAL_CONST
#define QUAL_CONST
Definition: cp-name-parser.c:142
demangle_parse_info::demangle_parse_info
demangle_parse_info()
Definition: cp-name-parser.c:4206
yydestruct
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Definition: cp-name-parser.c:1679
yydefact
static const yytype_uint8 yydefact[]
Definition: cp-name-parser.c:886
YYTRANSLATE
#define YYTRANSLATE(YYX)
Definition: cp-name-parser.c:722
lexptr
static const char * lexptr
Definition: cp-name-parser.c:84
YYSTACK_ALLOC_MAXIMUM
#define YYSTACK_ALLOC_MAXIMUM
Definition: cp-name-parser.c:617
yyalloc
Definition: ada-exp.c:498
make_name
static struct demangle_component * make_name(const char *name, int len)
Definition: cp-name-parser.c:272
xfree
void xfree(void *)
DEMANGLER_SPECIAL
#define DEMANGLER_SPECIAL
Definition: cp-name-parser.c:407
YYNTOKENS
#define YYNTOKENS
Definition: cp-name-parser.c:709
yytype_uint8
unsigned char yytype_uint8
Definition: ada-exp.c:324
YY_STACK_PRINT
#define YY_STACK_PRINT(Bottom, Top)
Definition: cp-name-parser.c:1430
yyparse
#define yyparse
Definition: cp-name-parser.c:164
make_dtor
static struct demangle_component * make_dtor(enum gnu_v3_dtor_kinds kind, struct demangle_component *name)
Definition: cp-name-parser.c:248
demangle_info::next
struct demangle_info * next
Definition: cp-name-parser.c:93
yys
#define yys
Definition: cp-name-parser.c:182
LEQ
#define LEQ
Definition: cp-name-parser.c:414
YYEOF
#define YYEOF
Definition: cp-name-parser.c:1273
UNION
#define UNION
Definition: cp-name-parser.c:377
DECREMENT
#define DECREMENT
Definition: cp-name-parser.c:420
errmsg
static char errmsg[128]
Definition: procfs.c:269
yycheck
#define yycheck
Definition: cp-name-parser.c:202
yytable
#define yytable
Definition: cp-name-parser.c:201
YYSTYPE::comp
struct demangle_component * comp
Definition: cp-name-parser.c:430
symbol
const char * symbol
Definition: signals.c:48
YYSTYPE
Definition: ada-exp.c:279
d_left
#define d_left(dc)
Definition: cp-name-parser.c:283
CLASS
#define CLASS
Definition: cp-name-parser.c:376
HANDLE_SPECIAL
#define HANDLE_SPECIAL(string, comp)
Definition: cp-name-parser.c:3753
INT_UNSIGNED
#define INT_UNSIGNED
Definition: cp-name-parser.c:154
demangle_info
static struct demangle_info * demangle_info
Definition: cp-name-parser.c:97
yystate
#define yystate
Definition: cp-name-parser.c:184
yypact
#define yypact
Definition: cp-name-parser.c:170
INT_CHAR
#define INT_CHAR
Definition: cp-name-parser.c:148
YYUSE
#define YYUSE(E)
Definition: cp-name-parser.c:551
ALLOC_CHUNK
#define ALLOC_CHUNK
Definition: cp-name-parser.c:89
YYACCEPT
#define YYACCEPT
Definition: cp-name-parser.c:1275
yytranslate
static const yytype_uint8 yytranslate[]
Definition: cp-name-parser.c:727
EQUAL
#define EQUAL
Definition: cp-name-parser.c:412
d_binary
static struct demangle_component * d_binary(const char *, struct demangle_component *, struct demangle_component *)
Definition: cp-name-parser.c:3507
YYDPRINTF
#define YYDPRINTF(Args)
Definition: cp-name-parser.c:1428
YYLAST
#define YYLAST
Definition: cp-name-parser.c:706
ARROW
#define ARROW
Definition: cp-name-parser.c:421
TEMPLATE
#define TEMPLATE
Definition: cp-name-parser.c:382
STRUCT
#define STRUCT
Definition: cp-name-parser.c:375
yydebug
#define yydebug
Definition: cp-name-parser.c:169
yyval
#define yyval
Definition: cp-name-parser.c:188
symbol_end
static const char * symbol_end(const char *lexptr)
Definition: cp-name-parser.c:3538
YYSTYPE::fn
struct nested fn
Definition: cp-name-parser.c:440
YYSTACK_BYTES
#define YYSTACK_BYTES(N)
Definition: cp-name-parser.c:659
YYSTYPE::last
struct demangle_component ** last
Definition: cp-name-parser.c:439
cp_parse_escape
static int cp_parse_escape(const char **string_ptr)
Definition: cp-name-parser.c:3689
demangle_info
Definition: cp-name-parser.c:91
REINTERPRET_CAST
#define REINTERPRET_CAST
Definition: cp-name-parser.c:388
gdb.argv
argv
Definition: __init__.py:63
exsummary.main
def main()
Definition: exsummary.py:156
xmalloc
void * xmalloc(YYSIZE_T)
yytype_int16
short int yytype_int16
Definition: ada-exp.c:342
DYNAMIC_CAST
#define DYNAMIC_CAST
Definition: cp-name-parser.c:389
ELLIPSIS
#define ELLIPSIS
Definition: cp-name-parser.c:398
LSH
#define LSH
Definition: cp-name-parser.c:416
represented
static char represented[]
Definition: cp-name-parser.c:3658
d_unary
static struct demangle_component * d_unary(const char *, struct demangle_component *)
Definition: cp-name-parser.c:3499
OROR
#define OROR
Definition: cp-name-parser.c:410
NEW
#define NEW
Definition: cp-name-parser.c:384
prev_lexptr
static const char * prev_lexptr
Definition: cp-name-parser.c:84
YYSIZE_T
#define YYSIZE_T
Definition: cp-name-parser.c:502
NAME
#define NAME
Definition: cp-name-parser.c:374
YYABORT
#define YYABORT
Definition: cp-name-parser.c:1276
yystacksize
#define yystacksize
Definition: cp-name-parser.c:206
yy_stack_print
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
Definition: ada-exp.c:1094
YYSTACK_FREE
#define YYSTACK_FREE
Definition: cp-name-parser.c:615
TRUEKEYWORD
#define TRUEKEYWORD
Definition: cp-name-parser.c:405
CONSTRUCTION_IN
#define CONSTRUCTION_IN
Definition: cp-name-parser.c:409
make_operator
static struct demangle_component * make_operator(const char *name, int args)
Definition: cp-name-parser.c:236
NOTEQUAL
#define NOTEQUAL
Definition: cp-name-parser.c:413
yy_reduce_print
static void yy_reduce_print(yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
Definition: ada-exp.c:1117