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