1 /* A Bison parser, made by GNU Bison 1.875. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* As a special exception, when this file is copied by Bison into a
22 Bison output file, you may use that output file without restriction.
23 This special exception was added by the Free Software Foundation
24 in version 1.24 of Bison. */
26 /* Written by Richard Stallman by simplifying the original so called
27 ``semantic'' parser. */
29 /* All symbols defined below should begin with yy or YY, to avoid
30 infringing on user name space. This should be done even for local
31 variables, as they might otherwise be expanded by user macros.
32 There are some unavoidable exceptions within include files to
33 define necessary library symbols; they are noted "INFRINGES ON
34 USER NAME SPACE" below. */
36 /* Identify Bison output. */
40 #define YYSKELETON_NAME "yacc.c"
45 /* Using locations. */
46 #define YYLSP_NEEDED 0
53 /* Put the tokens into the symbol table, so that GDB and other debuggers
76 VOLATILE_KEYWORD = 278,
104 #define NAME_OR_INT 263
111 #define COLONCOLON 270
114 #define SIGNED_KEYWORD 273
117 #define INT_KEYWORD 276
118 #define CONST_KEYWORD 277
119 #define VOLATILE_KEYWORD 278
120 #define DOUBLE_KEYWORD 279
122 #define ASSIGN_MODIFY 281
123 #define TRUEKEYWORD 282
124 #define FALSEKEYWORD 283
125 #define ABOVE_COMMA 284
134 #define DECREMENT 293
135 #define INCREMENT 294
138 #define BLOCKNAME 297
144 /* Copy the first part of user declarations. */
149 #include "gdb_string.h"
151 #include "expression.h"
153 #include "parser-defs.h"
154 #include "language.h"
156 #include "bfd.h" /* Required by objfiles.h. */
157 #include "symfile.h" /* Required by objfiles.h. */
158 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
161 #include "cp-support.h"
163 /* Flag indicating we're dealing with HP-compiled objects */
164 extern int hp_som_som_object_present;
166 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
167 as well as gratuitiously global symbol names, so we can have multiple
168 yacc generated parsers in gdb. Note that these are only the variables
169 produced by yacc. If other parser generators (bison, byacc, etc) produce
170 additional global names that conflict at link time, then those parser
171 generators need to be fixed instead of adding those names to this list. */
173 #define yymaxdepth c_maxdepth
174 #define yyparse c_parse
176 #define yyerror c_error
177 #define yylval c_lval
178 #define yychar c_char
179 #define yydebug c_debug
180 #define yypact c_pact
187 #define yyexca c_exca
188 #define yyerrflag c_errflag
189 #define yynerrs c_nerrs
194 #define yystate c_state
199 #define yylloc c_lloc
200 #define yyreds c_reds /* With YYDEBUG defined */
201 #define yytoks c_toks /* With YYDEBUG defined */
202 #define yyname c_name /* With YYDEBUG defined */
203 #define yyrule c_rule /* With YYDEBUG defined */
204 #define yylhs c_yylhs
205 #define yylen c_yylen
206 #define yydefred c_yydefred
207 #define yydgoto c_yydgoto
208 #define yysindex c_yysindex
209 #define yyrindex c_yyrindex
210 #define yygindex c_yygindex
211 #define yytable c_yytable
212 #define yycheck c_yycheck
215 #define YYDEBUG 1 /* Default to yydebug support */
218 #define YYFPRINTF parser_fprintf
222 static int yylex (void);
224 void yyerror (char *);
228 /* Enabling traces. */
233 /* Enabling verbose error messages. */
234 #ifdef YYERROR_VERBOSE
235 # undef YYERROR_VERBOSE
236 # define YYERROR_VERBOSE 1
238 # define YYERROR_VERBOSE 0
241 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
243 typedef union YYSTYPE {
257 struct symtoken ssym;
260 enum exp_opcode opcode;
261 struct internalvar *ivar;
266 /* Line 191 of yacc.c. */
267 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
268 # define YYSTYPE_IS_DECLARED 1
269 # define YYSTYPE_IS_TRIVIAL 1
274 /* Copy the second part of user declarations. */
277 /* YYSTYPE gets defined by %union */
278 static int parse_number (char *, int, int, YYSTYPE *);
281 /* Line 214 of yacc.c. */
283 #if ! defined (yyoverflow) || YYERROR_VERBOSE
285 /* The parser invokes alloca or xmalloc; define the necessary symbols. */
287 # if YYSTACK_USE_ALLOCA
288 # define YYSTACK_ALLOC alloca
290 # ifndef YYSTACK_USE_ALLOCA
291 # if defined (alloca) || defined (_ALLOCA_H)
292 # define YYSTACK_ALLOC alloca
295 # define YYSTACK_ALLOC __builtin_alloca
301 # ifdef YYSTACK_ALLOC
302 /* Pacify GCC's `empty if-body' warning. */
303 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
305 # if defined (__STDC__) || defined (__cplusplus)
306 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
307 # define YYSIZE_T size_t
309 # define YYSTACK_ALLOC xmalloc
310 # define YYSTACK_FREE free
312 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
315 #if (! defined (yyoverflow) \
316 && (! defined (__cplusplus) \
317 || (YYSTYPE_IS_TRIVIAL)))
319 /* A type that is properly aligned for any stack member. */
326 /* The size of the maximum gap between one aligned stack and the next. */
327 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
329 /* The size of an array large to enough to hold all stacks, each with
331 # define YYSTACK_BYTES(N) \
332 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
333 + YYSTACK_GAP_MAXIMUM)
335 /* Copy COUNT objects from FROM to TO. The source and destination do
339 # define YYCOPY(To, From, Count) \
340 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
342 # define YYCOPY(To, From, Count) \
345 register YYSIZE_T yyi; \
346 for (yyi = 0; yyi < (Count); yyi++) \
347 (To)[yyi] = (From)[yyi]; \
353 /* Relocate STACK from its old location to the new one. The
354 local variables YYSIZE and YYSTACKSIZE give the old and new number of
355 elements in the stack, and YYPTR gives the new location of the
356 stack. Advance YYPTR to a properly aligned location for the next
358 # define YYSTACK_RELOCATE(Stack) \
361 YYSIZE_T yynewbytes; \
362 YYCOPY (&yyptr->Stack, Stack, yysize); \
363 Stack = &yyptr->Stack; \
364 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
365 yyptr += yynewbytes / sizeof (*yyptr); \
371 #if defined (__STDC__) || defined (__cplusplus)
372 typedef signed char yysigned_char;
374 typedef short yysigned_char;
377 /* YYFINAL -- State number of the termination state. */
379 /* YYLAST -- Last index in YYTABLE. */
382 /* YYNTOKENS -- Number of terminals. */
384 /* YYNNTS -- Number of nonterminals. */
386 /* YYNRULES -- Number of rules. */
388 /* YYNRULES -- Number of states. */
389 #define YYNSTATES 242
391 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
393 #define YYMAXUTOK 298
395 #define YYTRANSLATE(YYX) \
396 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
398 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
399 static const unsigned char yytranslate[] =
401 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
402 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
403 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
404 2, 2, 2, 61, 2, 2, 2, 51, 37, 2,
405 57, 64, 49, 47, 29, 48, 55, 50, 2, 2,
406 2, 2, 2, 2, 2, 2, 2, 2, 67, 2,
407 40, 31, 41, 32, 46, 2, 2, 2, 2, 2,
408 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
409 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
410 2, 56, 2, 63, 36, 2, 2, 2, 2, 2,
411 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
412 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
413 2, 2, 2, 65, 35, 66, 62, 2, 2, 2,
414 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
415 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
416 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
417 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
418 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
419 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
420 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
421 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
422 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
423 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
424 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
425 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
426 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
427 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
428 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
429 25, 26, 27, 28, 30, 33, 34, 38, 39, 42,
430 43, 44, 45, 52, 53, 54, 58, 59, 60
434 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
436 static const unsigned short yyprhs[] =
438 0, 0, 3, 5, 7, 9, 11, 15, 18, 21,
439 24, 27, 30, 33, 36, 39, 42, 45, 49, 53,
440 58, 62, 66, 71, 76, 77, 83, 85, 86, 88,
441 92, 94, 98, 103, 108, 112, 116, 120, 124, 128,
442 132, 136, 140, 144, 148, 152, 156, 160, 164, 168,
443 172, 176, 180, 184, 188, 194, 198, 202, 204, 206,
444 208, 210, 212, 217, 219, 221, 223, 225, 227, 231,
445 235, 239, 244, 246, 249, 251, 254, 256, 257, 261,
446 263, 265, 267, 268, 270, 273, 275, 278, 280, 284,
447 287, 289, 292, 294, 297, 301, 304, 308, 310, 314,
448 316, 318, 320, 322, 325, 329, 332, 336, 340, 344,
449 347, 350, 354, 359, 363, 367, 372, 376, 381, 385,
450 390, 393, 397, 400, 404, 407, 411, 413, 416, 419,
451 422, 425, 428, 431, 433, 436, 438, 444, 447, 450,
452 452, 456, 458, 460, 462, 464, 466, 470, 472, 477,
453 480, 483, 485, 487, 489, 491, 493, 495, 497, 499
456 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
457 static const yysigned_char yyrhs[] =
459 69, 0, -1, 71, -1, 70, -1, 89, -1, 72,
460 -1, 71, 29, 72, -1, 49, 72, -1, 37, 72,
461 -1, 48, 72, -1, 61, 72, -1, 62, 72, -1,
462 53, 72, -1, 52, 72, -1, 72, 53, -1, 72,
463 52, -1, 13, 72, -1, 72, 58, 97, -1, 72,
464 58, 79, -1, 72, 58, 49, 72, -1, 72, 55,
465 97, -1, 72, 55, 79, -1, 72, 55, 49, 72,
466 -1, 72, 56, 71, 63, -1, -1, 72, 57, 73,
467 75, 64, -1, 65, -1, -1, 72, -1, 75, 29,
468 72, -1, 66, -1, 74, 75, 76, -1, 74, 89,
469 76, 72, -1, 57, 89, 64, 72, -1, 57, 71,
470 64, -1, 72, 46, 72, -1, 72, 49, 72, -1,
471 72, 50, 72, -1, 72, 51, 72, -1, 72, 47,
472 72, -1, 72, 48, 72, -1, 72, 45, 72, -1,
473 72, 44, 72, -1, 72, 39, 72, -1, 72, 38,
474 72, -1, 72, 43, 72, -1, 72, 42, 72, -1,
475 72, 40, 72, -1, 72, 41, 72, -1, 72, 37,
476 72, -1, 72, 36, 72, -1, 72, 35, 72, -1,
477 72, 34, 72, -1, 72, 33, 72, -1, 72, 32,
478 72, 67, 72, -1, 72, 31, 72, -1, 72, 26,
479 72, -1, 3, -1, 8, -1, 4, -1, 78, -1,
480 25, -1, 13, 57, 89, 64, -1, 5, -1, 27,
481 -1, 28, -1, 59, -1, 60, -1, 77, 15, 97,
482 -1, 77, 15, 97, -1, 90, 15, 97, -1, 90,
483 15, 62, 97, -1, 79, -1, 15, 97, -1, 98,
484 -1, 46, 6, -1, 96, -1, -1, 81, 80, 81,
485 -1, 82, -1, 96, -1, 83, -1, -1, 49, -1,
486 49, 85, -1, 37, -1, 37, 85, -1, 86, -1,
487 57, 85, 64, -1, 86, 87, -1, 87, -1, 86,
488 88, -1, 88, -1, 56, 63, -1, 56, 3, 63,
489 -1, 57, 64, -1, 57, 93, 64, -1, 94, -1,
490 90, 15, 49, -1, 7, -1, 21, -1, 19, -1,
491 20, -1, 19, 21, -1, 19, 18, 21, -1, 19,
492 18, -1, 18, 19, 21, -1, 14, 19, 21, -1,
493 19, 14, 21, -1, 19, 14, -1, 19, 19, -1,
494 19, 19, 21, -1, 19, 19, 18, 21, -1, 19,
495 19, 18, -1, 18, 19, 19, -1, 18, 19, 19,
496 21, -1, 14, 19, 19, -1, 14, 19, 19, 21,
497 -1, 19, 19, 14, -1, 19, 19, 14, 21, -1,
498 20, 21, -1, 20, 18, 21, -1, 20, 18, -1,
499 14, 20, 21, -1, 20, 14, -1, 20, 14, 21,
500 -1, 24, -1, 19, 24, -1, 9, 97, -1, 10,
501 97, -1, 11, 97, -1, 12, 97, -1, 14, 92,
502 -1, 14, -1, 18, 92, -1, 18, -1, 16, 97,
503 40, 89, 41, -1, 83, 90, -1, 90, 83, -1,
504 91, -1, 90, 15, 97, -1, 7, -1, 21, -1,
505 19, -1, 20, -1, 89, -1, 93, 29, 89, -1,
506 90, -1, 94, 84, 85, 84, -1, 22, 23, -1,
507 23, 22, -1, 95, -1, 22, -1, 23, -1, 6,
508 -1, 59, -1, 7, -1, 8, -1, 6, -1, 59,
512 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
513 static const unsigned short yyrline[] =
515 0, 233, 233, 234, 237, 244, 245, 250, 254, 258,
516 262, 266, 270, 274, 278, 282, 286, 290, 296, 304,
517 308, 314, 322, 326, 333, 330, 340, 344, 347, 351,
518 355, 358, 365, 371, 377, 383, 387, 391, 395, 399,
519 403, 407, 411, 415, 419, 423, 427, 431, 435, 439,
520 443, 447, 451, 455, 459, 463, 467, 473, 480, 491,
521 498, 501, 505, 513, 538, 545, 554, 562, 568, 579,
522 595, 609, 634, 635, 669, 726, 732, 733, 736, 739,
523 740, 744, 745, 748, 750, 752, 754, 756, 759, 761,
524 766, 773, 775, 779, 781, 785, 787, 799, 800, 805,
525 807, 809, 811, 813, 815, 817, 819, 821, 823, 825,
526 827, 829, 831, 833, 835, 837, 839, 841, 843, 845,
527 847, 849, 851, 853, 855, 857, 859, 861, 863, 866,
528 869, 872, 875, 877, 879, 881, 886, 890, 892, 894,
529 942, 967, 968, 974, 980, 989, 994, 1001, 1002, 1006,
530 1007, 1010, 1014, 1016, 1020, 1021, 1022, 1023, 1026, 1027
534 #if YYDEBUG || YYERROR_VERBOSE
535 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
536 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
537 static const char *const yytname[] =
539 "$end", "error", "$undefined", "INT", "FLOAT", "STRING", "NAME",
540 "TYPENAME", "NAME_OR_INT", "STRUCT", "CLASS", "UNION", "ENUM", "SIZEOF",
541 "UNSIGNED", "COLONCOLON", "TEMPLATE", "ERROR", "SIGNED_KEYWORD", "LONG",
542 "SHORT", "INT_KEYWORD", "CONST_KEYWORD", "VOLATILE_KEYWORD",
543 "DOUBLE_KEYWORD", "VARIABLE", "ASSIGN_MODIFY", "TRUEKEYWORD",
544 "FALSEKEYWORD", "','", "ABOVE_COMMA", "'='", "'?'", "OROR", "ANDAND",
545 "'|'", "'^'", "'&'", "NOTEQUAL", "EQUAL", "'<'", "'>'", "GEQ", "LEQ",
546 "RSH", "LSH", "'@'", "'+'", "'-'", "'*'", "'/'", "'%'", "DECREMENT",
547 "INCREMENT", "UNARY", "'.'", "'['", "'('", "ARROW", "BLOCKNAME",
548 "FILENAME", "'!'", "'~'", "']'", "')'", "'{'", "'}'", "':'", "$accept",
549 "start", "type_exp", "exp1", "exp", "@1", "lcurly", "arglist", "rcurly",
550 "block", "variable", "qualified_name", "space_identifier",
551 "const_or_volatile", "cv_with_space_id",
552 "const_or_volatile_or_space_identifier_noopt",
553 "const_or_volatile_or_space_identifier", "abs_decl", "direct_abs_decl",
554 "array_mod", "func_mod", "type", "typebase", "qualified_type",
555 "typename", "nonempty_typelist", "ptype", "const_and_volatile",
556 "const_or_volatile_noopt", "name", "name_not_typename", 0
561 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
563 static const unsigned short yytoknum[] =
565 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
566 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
567 275, 276, 277, 278, 279, 280, 281, 282, 283, 44,
568 284, 61, 63, 285, 286, 124, 94, 38, 287, 288,
569 60, 62, 289, 290, 291, 292, 64, 43, 45, 42,
570 47, 37, 293, 294, 295, 46, 91, 40, 296, 297,
571 298, 33, 126, 93, 41, 123, 125, 58
575 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
576 static const unsigned char yyr1[] =
578 0, 68, 69, 69, 70, 71, 71, 72, 72, 72,
579 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
580 72, 72, 72, 72, 73, 72, 74, 75, 75, 75,
581 76, 72, 72, 72, 72, 72, 72, 72, 72, 72,
582 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
583 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
584 72, 72, 72, 72, 72, 72, 77, 77, 77, 78,
585 79, 79, 78, 78, 78, 80, 81, 81, 82, 83,
586 83, 84, 84, 85, 85, 85, 85, 85, 86, 86,
587 86, 86, 86, 87, 87, 88, 88, 89, 89, 90,
588 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
589 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
590 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
591 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
592 91, 92, 92, 92, 92, 93, 93, 94, 94, 95,
593 95, 96, 96, 96, 97, 97, 97, 97, 98, 98
596 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
597 static const unsigned char yyr2[] =
599 0, 2, 1, 1, 1, 1, 3, 2, 2, 2,
600 2, 2, 2, 2, 2, 2, 2, 3, 3, 4,
601 3, 3, 4, 4, 0, 5, 1, 0, 1, 3,
602 1, 3, 4, 4, 3, 3, 3, 3, 3, 3,
603 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
604 3, 3, 3, 3, 5, 3, 3, 1, 1, 1,
605 1, 1, 4, 1, 1, 1, 1, 1, 3, 3,
606 3, 4, 1, 2, 1, 2, 1, 0, 3, 1,
607 1, 1, 0, 1, 2, 1, 2, 1, 3, 2,
608 1, 2, 1, 2, 3, 2, 3, 1, 3, 1,
609 1, 1, 1, 2, 3, 2, 3, 3, 3, 2,
610 2, 3, 4, 3, 3, 4, 3, 4, 3, 4,
611 2, 3, 2, 3, 2, 3, 1, 2, 2, 2,
612 2, 2, 2, 1, 2, 1, 5, 2, 2, 1,
613 3, 1, 1, 1, 1, 1, 3, 1, 4, 2,
614 2, 1, 1, 1, 1, 1, 1, 1, 1, 1
617 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
618 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
619 means the default is an error. */
620 static const unsigned char yydefact[] =
622 77, 57, 59, 63, 158, 99, 58, 0, 0, 0,
623 0, 77, 133, 0, 0, 135, 101, 102, 100, 152,
624 153, 126, 61, 64, 65, 77, 77, 77, 77, 77,
625 77, 159, 67, 77, 77, 26, 0, 3, 2, 5,
626 27, 0, 60, 72, 0, 79, 77, 4, 147, 139,
627 97, 151, 80, 74, 154, 156, 157, 155, 128, 129,
628 130, 131, 77, 16, 77, 141, 143, 144, 142, 132,
629 73, 0, 143, 144, 134, 109, 105, 110, 103, 127,
630 124, 122, 120, 149, 150, 8, 9, 7, 13, 12,
631 0, 0, 10, 11, 1, 77, 77, 77, 77, 77,
632 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
633 77, 77, 77, 77, 77, 77, 77, 77, 15, 14,
634 77, 77, 24, 77, 28, 0, 0, 0, 0, 77,
635 137, 0, 138, 81, 0, 0, 0, 116, 107, 123,
636 77, 114, 106, 108, 104, 118, 113, 111, 125, 121,
637 34, 77, 6, 56, 55, 0, 53, 52, 51, 50,
638 49, 44, 43, 47, 48, 46, 45, 42, 41, 35,
639 39, 40, 36, 37, 38, 156, 77, 21, 20, 0,
640 27, 77, 18, 17, 77, 30, 31, 77, 69, 75,
641 78, 76, 0, 98, 0, 70, 85, 83, 0, 77,
642 82, 87, 90, 92, 62, 117, 0, 147, 115, 119,
643 112, 33, 77, 22, 23, 0, 19, 29, 32, 140,
644 71, 86, 84, 0, 93, 95, 0, 145, 0, 148,
645 77, 89, 91, 136, 0, 54, 25, 94, 88, 77,
649 /* YYDEFGOTO[NTERM-NUM]. */
650 static const short yydefgoto[] =
652 -1, 36, 37, 90, 39, 180, 40, 125, 186, 41,
653 42, 43, 129, 44, 45, 46, 134, 200, 201, 202,
654 203, 227, 64, 49, 69, 228, 50, 51, 52, 195,
658 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
660 #define YYPACT_NINF -101
661 static const short yypact[] =
663 320, -101, -101, -101, -101, -101, -101, 30, 30, 30,
664 30, 383, 45, 30, 30, 200, 152, 36, -101, -11,
665 17, -101, -101, -101, -101, 320, 320, 320, 320, 320,
666 320, 29, -101, 320, 320, -101, 84, -101, 39, 597,
667 257, 56, -101, -101, 57, -101, 172, -101, 68, -101,
668 55, -101, 67, -101, -101, -101, -101, -101, -101, -101,
669 -101, -101, 320, 460, 87, -101, 40, 95, -101, -101,
670 -101, 99, 190, -101, -101, 156, 159, 223, -101, -101,
671 164, 176, -101, -101, -101, 460, 460, 460, 460, 460,
672 -15, 158, 460, 460, -101, 320, 320, 320, 320, 320,
673 320, 320, 320, 320, 320, 320, 320, 320, 320, 320,
674 320, 320, 320, 320, 320, 320, 320, 320, -101, -101,
675 194, 320, -101, 531, 597, -19, 160, 30, 218, -1,
676 71, 20, -101, -101, -14, 171, 26, 215, -101, -101,
677 172, 217, -101, -101, -101, 221, 224, -101, -101, -101,
678 -101, 320, 597, 597, 597, 560, 622, 646, 669, 691,
679 712, 731, 731, 746, 746, 746, 746, 240, 240, 303,
680 366, 366, 460, 460, 460, 83, 320, -101, -101, -18,
681 257, 320, -101, -101, 320, -101, -101, 320, 231, -101,
682 -101, -101, 30, -101, 30, 210, 118, 63, 4, 472,
683 2, 112, -101, -101, 446, -101, 206, 85, -101, -101,
684 -101, 460, 320, 460, -101, -13, 460, 597, 460, -101,
685 -101, -101, -101, 185, -101, -101, 186, -101, -9, -101,
686 114, -101, -101, -101, 11, 526, -101, -101, -101, 172,
690 /* YYPGOTO[NTERM-NUM]. */
691 static const short yypgoto[] =
693 -101, -101, -101, 6, 47, -101, -101, 69, 126, -101,
694 -101, -67, -101, 125, -101, -35, 58, -100, -101, 54,
695 73, 1, 0, -101, 241, -101, -101, -101, 128, -5,
699 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
700 positive, shift that token. If negative, reduce the rule which
701 number is the opposite. If zero, do what YYDEFACT says.
702 If YYTABLE_NINF, syntax error. */
703 #define YYTABLE_NINF -141
704 static const short yytable[] =
706 48, 47, 58, 59, 60, 61, 38, 223, 70, 71,
707 184, 95, 83, 132, 95, 133, 184, 54, 55, 56,
708 239, 19, 20, 196, 19, 20, 54, 55, 56, 132,
709 48, 91, 54, 55, 56, 197, 54, 55, 56, 84,
710 48, 126, 198, 199, -66, 214, 130, 185, -77, 150,
711 80, 236, 65, 177, 81, 240, 182, 82, 63, 137,
712 193, 138, 48, 135, 66, 67, 68, 224, 95, 193,
713 57, 127, 85, 86, 87, 88, 89, 19, 20, 57,
714 92, 93, 194, 131, 94, 57, 192, 124, 194, 57,
715 19, 20, -82, 19, 20, 132, 221, 222, -99, 226,
716 234, -77, 136, 128, -82, -99, -99, 19, 20, 19,
717 20, -82, -82, -76, -77, 178, 139, -77, 183, 198,
718 199, 5, 188, 7, 8, 9, 10, 179, 12, -99,
719 14, -77, 15, 16, 17, 18, 19, 20, 21, 140,
720 207, 206, 152, 153, 154, 155, 156, 157, 158, 159,
721 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
722 170, 171, 172, 173, 174, 133, 75, 197, 198, 230,
723 76, 77, 132, 78, 198, 199, 79, 143, 225, 5,
724 144, 7, 8, 9, 10, 148, 12, 219, 14, 220,
725 15, 16, 17, 18, 19, 20, 21, 149, 211, 207,
726 54, 175, 56, 7, 8, 9, 10, 65, 12, 141,
727 14, 142, 15, 16, 17, 18, 19, 20, 21, 72,
728 73, 68, 151, 213, 189, -140, 185, 124, 216, 219,
729 207, 217, -140, -140, 218, 204, 205, 145, 208, 207,
730 241, 146, 209, 176, 147, 210, -68, 233, 237, 215,
731 238, 211, 187, 57, 190, 231, 74, 191, 229, 235,
732 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
733 11, 12, 13, 14, 232, 15, 16, 17, 18, 19,
734 20, 21, 22, 0, 23, 24, 112, 113, 114, 115,
735 116, 117, 118, 119, 25, 120, 121, 122, 123, 0,
736 0, 0, 0, -77, 0, 26, 27, 0, 0, 28,
737 29, 0, 0, 0, 30, 0, 31, 32, 33, 34,
738 0, 0, 35, 1, 2, 3, 4, 5, 6, 7,
739 8, 9, 10, 11, 12, 13, 14, 0, 15, 16,
740 17, 18, 19, 20, 21, 22, 0, 23, 24, 0,
741 113, 114, 115, 116, 117, 118, 119, 25, 120, 121,
742 122, 123, 0, 0, 0, 0, 0, 0, 26, 27,
743 0, 0, 28, 29, 0, 0, 0, 30, 0, 31,
744 32, 33, 34, 0, 0, 35, 1, 2, 3, 4,
745 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
746 0, 15, 16, 17, 18, 19, 20, 21, 22, 0,
747 23, 24, 0, 0, 0, 115, 116, 117, 118, 119,
748 25, 120, 121, 122, 123, 0, 0, 0, 0, 0,
749 0, 26, 27, 0, 0, 28, 29, 0, 0, 0,
750 62, 0, 31, 32, 33, 34, 0, 0, 35, 1,
751 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
752 12, 13, 14, 0, 15, 16, 17, 18, 19, 20,
753 21, 22, 0, 23, 24, 0, 0, 0, 0, 5,
754 0, 7, 8, 9, 10, 0, 12, 0, 14, 0,
755 15, 16, 17, 18, 19, 20, 21, 0, 28, 29,
756 0, 0, 0, 30, 0, 31, 32, 33, 34, 196,
757 0, 35, 118, 119, 0, 120, 121, 122, 123, 0,
758 0, 197, 0, 0, 0, 0, 0, 0, 198, 199,
759 0, 0, 0, 0, 0, 0, 225, 54, 175, 56,
760 7, 8, 9, 10, 0, 12, 0, 14, 0, 15,
761 16, 17, 18, 19, 20, 21, 0, 0, 98, 99,
762 100, 101, 102, 103, 104, 105, 106, 107, 108, 109,
763 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
764 181, 120, 121, 122, 123, 0, 96, 0, 0, 0,
765 57, 97, 98, 99, 100, 101, 102, 103, 104, 105,
766 106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
767 116, 117, 118, 119, 0, 120, 121, 122, 123, 0,
768 0, 0, 0, 96, 0, 0, 0, 212, 97, 98,
769 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
770 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
771 119, 0, 120, 121, 122, 123, 100, 101, 102, 103,
772 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
773 114, 115, 116, 117, 118, 119, 0, 120, 121, 122,
774 123, 101, 102, 103, 104, 105, 106, 107, 108, 109,
775 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
776 0, 120, 121, 122, 123, 102, 103, 104, 105, 106,
777 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
778 117, 118, 119, 0, 120, 121, 122, 123, 103, 104,
779 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
780 115, 116, 117, 118, 119, 0, 120, 121, 122, 123,
781 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
782 114, 115, 116, 117, 118, 119, 0, 120, 121, 122,
783 123, 106, 107, 108, 109, 110, 111, 112, 113, 114,
784 115, 116, 117, 118, 119, 0, 120, 121, 122, 123,
785 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
786 0, 120, 121, 122, 123
789 static const short yycheck[] =
791 0, 0, 7, 8, 9, 10, 0, 3, 13, 14,
792 29, 29, 23, 48, 29, 50, 29, 6, 7, 8,
793 29, 22, 23, 37, 22, 23, 6, 7, 8, 64,
794 30, 30, 6, 7, 8, 49, 6, 7, 8, 22,
795 40, 40, 56, 57, 15, 63, 46, 66, 46, 64,
796 14, 64, 7, 120, 18, 64, 123, 21, 11, 19,
797 49, 21, 62, 62, 19, 20, 21, 63, 29, 49,
798 59, 15, 25, 26, 27, 28, 29, 22, 23, 59,
799 33, 34, 62, 15, 0, 59, 15, 40, 62, 59,
800 22, 23, 37, 22, 23, 130, 196, 197, 15, 199,
801 15, 46, 15, 46, 49, 22, 23, 22, 23, 22,
802 23, 56, 57, 46, 46, 120, 21, 46, 123, 56,
803 57, 7, 127, 9, 10, 11, 12, 121, 14, 46,
804 16, 46, 18, 19, 20, 21, 22, 23, 24, 40,
805 140, 140, 95, 96, 97, 98, 99, 100, 101, 102,
806 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
807 113, 114, 115, 116, 117, 200, 14, 49, 56, 57,
808 18, 19, 207, 21, 56, 57, 24, 21, 64, 7,
809 21, 9, 10, 11, 12, 21, 14, 192, 16, 194,
810 18, 19, 20, 21, 22, 23, 24, 21, 151, 199,
811 6, 7, 8, 9, 10, 11, 12, 7, 14, 19,
812 16, 21, 18, 19, 20, 21, 22, 23, 24, 19,
813 20, 21, 64, 176, 6, 15, 66, 180, 181, 234,
814 230, 184, 22, 23, 187, 64, 21, 14, 21, 239,
815 239, 18, 21, 49, 21, 21, 15, 41, 63, 180,
816 64, 204, 126, 59, 129, 201, 15, 129, 200, 212,
817 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
818 13, 14, 15, 16, 201, 18, 19, 20, 21, 22,
819 23, 24, 25, -1, 27, 28, 46, 47, 48, 49,
820 50, 51, 52, 53, 37, 55, 56, 57, 58, -1,
821 -1, -1, -1, 46, -1, 48, 49, -1, -1, 52,
822 53, -1, -1, -1, 57, -1, 59, 60, 61, 62,
823 -1, -1, 65, 3, 4, 5, 6, 7, 8, 9,
824 10, 11, 12, 13, 14, 15, 16, -1, 18, 19,
825 20, 21, 22, 23, 24, 25, -1, 27, 28, -1,
826 47, 48, 49, 50, 51, 52, 53, 37, 55, 56,
827 57, 58, -1, -1, -1, -1, -1, -1, 48, 49,
828 -1, -1, 52, 53, -1, -1, -1, 57, -1, 59,
829 60, 61, 62, -1, -1, 65, 3, 4, 5, 6,
830 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
831 -1, 18, 19, 20, 21, 22, 23, 24, 25, -1,
832 27, 28, -1, -1, -1, 49, 50, 51, 52, 53,
833 37, 55, 56, 57, 58, -1, -1, -1, -1, -1,
834 -1, 48, 49, -1, -1, 52, 53, -1, -1, -1,
835 57, -1, 59, 60, 61, 62, -1, -1, 65, 3,
836 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
837 14, 15, 16, -1, 18, 19, 20, 21, 22, 23,
838 24, 25, -1, 27, 28, -1, -1, -1, -1, 7,
839 -1, 9, 10, 11, 12, -1, 14, -1, 16, -1,
840 18, 19, 20, 21, 22, 23, 24, -1, 52, 53,
841 -1, -1, -1, 57, -1, 59, 60, 61, 62, 37,
842 -1, 65, 52, 53, -1, 55, 56, 57, 58, -1,
843 -1, 49, -1, -1, -1, -1, -1, -1, 56, 57,
844 -1, -1, -1, -1, -1, -1, 64, 6, 7, 8,
845 9, 10, 11, 12, -1, 14, -1, 16, -1, 18,
846 19, 20, 21, 22, 23, 24, -1, -1, 32, 33,
847 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
848 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
849 49, 55, 56, 57, 58, -1, 26, -1, -1, -1,
850 59, 31, 32, 33, 34, 35, 36, 37, 38, 39,
851 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
852 50, 51, 52, 53, -1, 55, 56, 57, 58, -1,
853 -1, -1, -1, 26, -1, -1, -1, 67, 31, 32,
854 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
855 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
856 53, -1, 55, 56, 57, 58, 34, 35, 36, 37,
857 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
858 48, 49, 50, 51, 52, 53, -1, 55, 56, 57,
859 58, 35, 36, 37, 38, 39, 40, 41, 42, 43,
860 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
861 -1, 55, 56, 57, 58, 36, 37, 38, 39, 40,
862 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
863 51, 52, 53, -1, 55, 56, 57, 58, 37, 38,
864 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
865 49, 50, 51, 52, 53, -1, 55, 56, 57, 58,
866 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
867 48, 49, 50, 51, 52, 53, -1, 55, 56, 57,
868 58, 40, 41, 42, 43, 44, 45, 46, 47, 48,
869 49, 50, 51, 52, 53, -1, 55, 56, 57, 58,
870 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
874 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
875 symbol of state STATE-NUM. */
876 static const unsigned char yystos[] =
878 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
879 12, 13, 14, 15, 16, 18, 19, 20, 21, 22,
880 23, 24, 25, 27, 28, 37, 48, 49, 52, 53,
881 57, 59, 60, 61, 62, 65, 69, 70, 71, 72,
882 74, 77, 78, 79, 81, 82, 83, 89, 90, 91,
883 94, 95, 96, 98, 6, 7, 8, 59, 97, 97,
884 97, 97, 57, 72, 90, 7, 19, 20, 21, 92,
885 97, 97, 19, 20, 92, 14, 18, 19, 21, 24,
886 14, 18, 21, 23, 22, 72, 72, 72, 72, 72,
887 71, 89, 72, 72, 0, 29, 26, 31, 32, 33,
888 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
889 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
890 55, 56, 57, 58, 72, 75, 89, 15, 46, 80,
891 90, 15, 83, 83, 84, 89, 15, 19, 21, 21,
892 40, 19, 21, 21, 21, 14, 18, 21, 21, 21,
893 64, 64, 72, 72, 72, 72, 72, 72, 72, 72,
894 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
895 72, 72, 72, 72, 72, 7, 49, 79, 97, 71,
896 73, 49, 79, 97, 29, 66, 76, 76, 97, 6,
897 81, 96, 15, 49, 62, 97, 37, 49, 56, 57,
898 85, 86, 87, 88, 64, 21, 89, 90, 21, 21,
899 21, 72, 67, 72, 63, 75, 72, 72, 72, 97,
900 97, 85, 85, 3, 63, 64, 85, 89, 93, 84,
901 57, 87, 88, 41, 15, 72, 64, 63, 64, 29,
905 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
906 # define YYSIZE_T __SIZE_TYPE__
908 #if ! defined (YYSIZE_T) && defined (size_t)
909 # define YYSIZE_T size_t
911 #if ! defined (YYSIZE_T)
912 # if defined (__STDC__) || defined (__cplusplus)
913 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
914 # define YYSIZE_T size_t
917 #if ! defined (YYSIZE_T)
918 # define YYSIZE_T unsigned int
921 #define yyerrok (yyerrstatus = 0)
922 #define yyclearin (yychar = YYEMPTY)
926 #define YYACCEPT goto yyacceptlab
927 #define YYABORT goto yyabortlab
928 #define YYERROR goto yyerrlab1
930 /* Like YYERROR except do call yyerror. This remains here temporarily
931 to ease the transition to the new meaning of YYERROR, for GCC.
932 Once GCC version 2 has supplanted version 1, this can go. */
934 #define YYFAIL goto yyerrlab
936 #define YYRECOVERING() (!!yyerrstatus)
938 #define YYBACKUP(Token, Value) \
940 if (yychar == YYEMPTY && yylen == 1) \
944 yytoken = YYTRANSLATE (yychar); \
950 yyerror ("syntax error: cannot back up");\
956 #define YYERRCODE 256
958 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
961 #ifndef YYLLOC_DEFAULT
962 # define YYLLOC_DEFAULT(Current, Rhs, N) \
963 Current.first_line = Rhs[1].first_line; \
964 Current.first_column = Rhs[1].first_column; \
965 Current.last_line = Rhs[N].last_line; \
966 Current.last_column = Rhs[N].last_column;
969 /* YYLEX -- calling `yylex' with the right arguments. */
972 # define YYLEX yylex (YYLEX_PARAM)
974 # define YYLEX yylex ()
977 /* Enable debugging if requested. */
981 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
982 # define YYFPRINTF fprintf
985 # define YYDPRINTF(Args) \
991 # define YYDSYMPRINT(Args) \
997 # define YYDSYMPRINTF(Title, Token, Value, Location) \
1001 YYFPRINTF (stderr, "%s ", Title); \
1002 yysymprint (stderr, \
1004 YYFPRINTF (stderr, "\n"); \
1008 /*------------------------------------------------------------------.
1009 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1011 `------------------------------------------------------------------*/
1013 #if defined (__STDC__) || defined (__cplusplus)
1015 yy_stack_print (short *bottom, short *top)
1018 yy_stack_print (bottom, top)
1023 YYFPRINTF (stderr, "Stack now");
1024 for (/* Nothing. */; bottom <= top; ++bottom)
1025 YYFPRINTF (stderr, " %d", *bottom);
1026 YYFPRINTF (stderr, "\n");
1029 # define YY_STACK_PRINT(Bottom, Top) \
1032 yy_stack_print ((Bottom), (Top)); \
1036 /*------------------------------------------------.
1037 | Report that the YYRULE is going to be reduced. |
1038 `------------------------------------------------*/
1040 #if defined (__STDC__) || defined (__cplusplus)
1042 yy_reduce_print (int yyrule)
1045 yy_reduce_print (yyrule)
1050 unsigned int yylineno = yyrline[yyrule];
1051 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
1052 yyrule - 1, yylineno);
1053 /* Print the symbols being reduced, and their result. */
1054 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
1055 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
1056 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
1059 # define YY_REDUCE_PRINT(Rule) \
1062 yy_reduce_print (Rule); \
1065 /* Nonzero means print parse trace. It is left uninitialized so that
1066 multiple parsers can coexist. */
1068 #else /* !YYDEBUG */
1069 # define YYDPRINTF(Args)
1070 # define YYDSYMPRINT(Args)
1071 # define YYDSYMPRINTF(Title, Token, Value, Location)
1072 # define YY_STACK_PRINT(Bottom, Top)
1073 # define YY_REDUCE_PRINT(Rule)
1074 #endif /* !YYDEBUG */
1077 /* YYINITDEPTH -- initial size of the parser's stacks. */
1079 # define YYINITDEPTH 200
1082 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1083 if the built-in stack extension method is used).
1085 Do not make this value too large; the results are undefined if
1086 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1087 evaluated with infinite-precision integer arithmetic. */
1094 # define YYMAXDEPTH 10000
1102 # if defined (__GLIBC__) && defined (_STRING_H)
1103 # define yystrlen strlen
1105 /* Return the length of YYSTR. */
1107 # if defined (__STDC__) || defined (__cplusplus)
1108 yystrlen (const char *yystr)
1114 register const char *yys = yystr;
1116 while (*yys++ != '\0')
1119 return yys - yystr - 1;
1125 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1126 # define yystpcpy stpcpy
1128 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1131 # if defined (__STDC__) || defined (__cplusplus)
1132 yystpcpy (char *yydest, const char *yysrc)
1134 yystpcpy (yydest, yysrc)
1139 register char *yyd = yydest;
1140 register const char *yys = yysrc;
1142 while ((*yyd++ = *yys++) != '\0')
1150 #endif /* !YYERROR_VERBOSE */
1155 /*--------------------------------.
1156 | Print this symbol on YYOUTPUT. |
1157 `--------------------------------*/
1159 #if defined (__STDC__) || defined (__cplusplus)
1161 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1164 yysymprint (yyoutput, yytype, yyvaluep)
1170 /* Pacify ``unused variable'' warnings. */
1173 if (yytype < YYNTOKENS)
1175 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1177 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1181 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1188 YYFPRINTF (yyoutput, ")");
1191 #endif /* ! YYDEBUG */
1192 /*-----------------------------------------------.
1193 | Release the memory associated to this symbol. |
1194 `-----------------------------------------------*/
1196 #if defined (__STDC__) || defined (__cplusplus)
1198 yydestruct (int yytype, YYSTYPE *yyvaluep)
1201 yydestruct (yytype, yyvaluep)
1206 /* Pacify ``unused variable'' warnings. */
1218 /* Prevent warnings from -Wmissing-prototypes. */
1220 #ifdef YYPARSE_PARAM
1221 # if defined (__STDC__) || defined (__cplusplus)
1222 int yyparse (void *YYPARSE_PARAM);
1226 #else /* ! YYPARSE_PARAM */
1227 #if defined (__STDC__) || defined (__cplusplus)
1232 #endif /* ! YYPARSE_PARAM */
1236 /* The lookahead symbol. */
1239 /* The semantic value of the lookahead symbol. */
1242 /* Number of syntax errors so far. */
1251 #ifdef YYPARSE_PARAM
1252 # if defined (__STDC__) || defined (__cplusplus)
1253 int yyparse (void *YYPARSE_PARAM)
1255 int yyparse (YYPARSE_PARAM)
1256 void *YYPARSE_PARAM;
1258 #else /* ! YYPARSE_PARAM */
1259 #if defined (__STDC__) || defined (__cplusplus)
1270 register int yystate;
1273 /* Number of tokens to shift before error messages enabled. */
1275 /* Lookahead token as an internal (translated) token number. */
1278 /* Three stacks and their tools:
1279 `yyss': related to states,
1280 `yyvs': related to semantic values,
1281 `yyls': related to locations.
1283 Refer to the stacks thru separate pointers, to allow yyoverflow
1284 to xreallocate them elsewhere. */
1286 /* The state stack. */
1287 short yyssa[YYINITDEPTH];
1288 short *yyss = yyssa;
1289 register short *yyssp;
1291 /* The semantic value stack. */
1292 YYSTYPE yyvsa[YYINITDEPTH];
1293 YYSTYPE *yyvs = yyvsa;
1294 register YYSTYPE *yyvsp;
1298 #define YYPOPSTACK (yyvsp--, yyssp--)
1300 YYSIZE_T yystacksize = YYINITDEPTH;
1302 /* The variables used to return semantic value and location from the
1307 /* When reducing, the number of symbols on the RHS of the reduced
1311 YYDPRINTF ((stderr, "Starting parse\n"));
1316 yychar = YYEMPTY; /* Cause a token to be read. */
1318 /* Initialize stack pointers.
1319 Waste one element of value and location stack
1320 so that they stay on the same level as the state stack.
1321 The wasted elements are never initialized. */
1328 /*------------------------------------------------------------.
1329 | yynewstate -- Push a new state, which is found in yystate. |
1330 `------------------------------------------------------------*/
1332 /* In all cases, when you get here, the value and location stacks
1333 have just been pushed. so pushing a state here evens the stacks.
1340 if (yyss + yystacksize - 1 <= yyssp)
1342 /* Get the current used size of the three stacks, in elements. */
1343 YYSIZE_T yysize = yyssp - yyss + 1;
1347 /* Give user a chance to xreallocate the stack. Use copies of
1348 these so that the &'s don't force the real ones into
1350 YYSTYPE *yyvs1 = yyvs;
1351 short *yyss1 = yyss;
1354 /* Each stack pointer address is followed by the size of the
1355 data in use in that stack, in bytes. This used to be a
1356 conditional around just the two extra args, but that might
1357 be undefined if yyoverflow is a macro. */
1358 yyoverflow ("parser stack overflow",
1359 &yyss1, yysize * sizeof (*yyssp),
1360 &yyvs1, yysize * sizeof (*yyvsp),
1367 #else /* no yyoverflow */
1368 # ifndef YYSTACK_RELOCATE
1371 /* Extend the stack our own way. */
1372 if (YYMAXDEPTH <= yystacksize)
1375 if (YYMAXDEPTH < yystacksize)
1376 yystacksize = YYMAXDEPTH;
1379 short *yyss1 = yyss;
1380 union yyalloc *yyptr =
1381 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1384 YYSTACK_RELOCATE (yyss);
1385 YYSTACK_RELOCATE (yyvs);
1387 # undef YYSTACK_RELOCATE
1389 YYSTACK_FREE (yyss1);
1392 #endif /* no yyoverflow */
1394 yyssp = yyss + yysize - 1;
1395 yyvsp = yyvs + yysize - 1;
1398 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1399 (unsigned long int) yystacksize));
1401 if (yyss + yystacksize - 1 <= yyssp)
1405 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1414 /* Do appropriate processing given the current state. */
1415 /* Read a lookahead token if we need one and don't already have one. */
1418 /* First try to decide what to do without reference to lookahead token. */
1420 yyn = yypact[yystate];
1421 if (yyn == YYPACT_NINF)
1424 /* Not known => get a lookahead token if don't already have one. */
1426 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1427 if (yychar == YYEMPTY)
1429 YYDPRINTF ((stderr, "Reading a token: "));
1433 if (yychar <= YYEOF)
1435 yychar = yytoken = YYEOF;
1436 YYDPRINTF ((stderr, "Now at end of input.\n"));
1440 yytoken = YYTRANSLATE (yychar);
1441 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1444 /* If the proper action on seeing token YYTOKEN is to reduce or to
1445 detect an error, take that action. */
1447 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1452 if (yyn == 0 || yyn == YYTABLE_NINF)
1461 /* Shift the lookahead token. */
1462 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1464 /* Discard the token being shifted unless it is eof. */
1465 if (yychar != YYEOF)
1471 /* Count tokens shifted since error; after three, turn off error
1480 /*-----------------------------------------------------------.
1481 | yydefault -- do the default action for the current state. |
1482 `-----------------------------------------------------------*/
1484 yyn = yydefact[yystate];
1490 /*-----------------------------.
1491 | yyreduce -- Do a reduction. |
1492 `-----------------------------*/
1494 /* yyn is the number of a rule to reduce with. */
1497 /* If YYLEN is nonzero, implement the default value of the action:
1500 Otherwise, the following line sets YYVAL to garbage.
1501 This behavior is undocumented and Bison
1502 users should not rely upon it. Assigning to YYVAL
1503 unconditionally makes the parser a bit smaller, and it avoids a
1504 GCC warning that YYVAL may be used uninitialized. */
1505 yyval = yyvsp[1-yylen];
1508 YY_REDUCE_PRINT (yyn);
1513 { write_exp_elt_opcode(OP_TYPE);
1514 write_exp_elt_type(yyvsp[0].tval);
1515 write_exp_elt_opcode(OP_TYPE);}
1520 { write_exp_elt_opcode (BINOP_COMMA); }
1525 { write_exp_elt_opcode (UNOP_IND); }
1530 { write_exp_elt_opcode (UNOP_ADDR); }
1535 { write_exp_elt_opcode (UNOP_NEG); }
1540 { write_exp_elt_opcode (UNOP_LOGICAL_NOT); }
1545 { write_exp_elt_opcode (UNOP_COMPLEMENT); }
1550 { write_exp_elt_opcode (UNOP_PREINCREMENT); }
1555 { write_exp_elt_opcode (UNOP_PREDECREMENT); }
1560 { write_exp_elt_opcode (UNOP_POSTINCREMENT); }
1565 { write_exp_elt_opcode (UNOP_POSTDECREMENT); }
1570 { write_exp_elt_opcode (UNOP_SIZEOF); }
1575 { write_exp_elt_opcode (STRUCTOP_PTR);
1576 write_exp_string (yyvsp[0].sval);
1577 write_exp_elt_opcode (STRUCTOP_PTR); }
1582 { /* exp->type::name becomes exp->*(&type::name) */
1583 /* Note: this doesn't work if name is a
1584 static member! FIXME */
1585 write_exp_elt_opcode (UNOP_ADDR);
1586 write_exp_elt_opcode (STRUCTOP_MPTR); }
1591 { write_exp_elt_opcode (STRUCTOP_MPTR); }
1596 { write_exp_elt_opcode (STRUCTOP_STRUCT);
1597 write_exp_string (yyvsp[0].sval);
1598 write_exp_elt_opcode (STRUCTOP_STRUCT); }
1603 { /* exp.type::name becomes exp.*(&type::name) */
1604 /* Note: this doesn't work if name is a
1605 static member! FIXME */
1606 write_exp_elt_opcode (UNOP_ADDR);
1607 write_exp_elt_opcode (STRUCTOP_MEMBER); }
1612 { write_exp_elt_opcode (STRUCTOP_MEMBER); }
1617 { write_exp_elt_opcode (BINOP_SUBSCRIPT); }
1622 { start_arglist (); }
1627 { write_exp_elt_opcode (OP_FUNCALL);
1628 write_exp_elt_longcst ((LONGEST) end_arglist ());
1629 write_exp_elt_opcode (OP_FUNCALL); }
1634 { start_arglist (); }
1639 { arglist_len = 1; }
1649 { yyval.lval = end_arglist () - 1; }
1654 { write_exp_elt_opcode (OP_ARRAY);
1655 write_exp_elt_longcst ((LONGEST) 0);
1656 write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
1657 write_exp_elt_opcode (OP_ARRAY); }
1662 { write_exp_elt_opcode (UNOP_MEMVAL);
1663 write_exp_elt_type (yyvsp[-2].tval);
1664 write_exp_elt_opcode (UNOP_MEMVAL); }
1669 { write_exp_elt_opcode (UNOP_CAST);
1670 write_exp_elt_type (yyvsp[-2].tval);
1671 write_exp_elt_opcode (UNOP_CAST); }
1681 { write_exp_elt_opcode (BINOP_REPEAT); }
1686 { write_exp_elt_opcode (BINOP_MUL); }
1691 { write_exp_elt_opcode (BINOP_DIV); }
1696 { write_exp_elt_opcode (BINOP_REM); }
1701 { write_exp_elt_opcode (BINOP_ADD); }
1706 { write_exp_elt_opcode (BINOP_SUB); }
1711 { write_exp_elt_opcode (BINOP_LSH); }
1716 { write_exp_elt_opcode (BINOP_RSH); }
1721 { write_exp_elt_opcode (BINOP_EQUAL); }
1726 { write_exp_elt_opcode (BINOP_NOTEQUAL); }
1731 { write_exp_elt_opcode (BINOP_LEQ); }
1736 { write_exp_elt_opcode (BINOP_GEQ); }
1741 { write_exp_elt_opcode (BINOP_LESS); }
1746 { write_exp_elt_opcode (BINOP_GTR); }
1751 { write_exp_elt_opcode (BINOP_BITWISE_AND); }
1756 { write_exp_elt_opcode (BINOP_BITWISE_XOR); }
1761 { write_exp_elt_opcode (BINOP_BITWISE_IOR); }
1766 { write_exp_elt_opcode (BINOP_LOGICAL_AND); }
1771 { write_exp_elt_opcode (BINOP_LOGICAL_OR); }
1776 { write_exp_elt_opcode (TERNOP_COND); }
1781 { write_exp_elt_opcode (BINOP_ASSIGN); }
1786 { write_exp_elt_opcode (BINOP_ASSIGN_MODIFY);
1787 write_exp_elt_opcode (yyvsp[-1].opcode);
1788 write_exp_elt_opcode (BINOP_ASSIGN_MODIFY); }
1793 { write_exp_elt_opcode (OP_LONG);
1794 write_exp_elt_type (yyvsp[0].typed_val_int.type);
1795 write_exp_elt_longcst ((LONGEST)(yyvsp[0].typed_val_int.val));
1796 write_exp_elt_opcode (OP_LONG); }
1802 parse_number (yyvsp[0].ssym.stoken.ptr, yyvsp[0].ssym.stoken.length, 0, &val);
1803 write_exp_elt_opcode (OP_LONG);
1804 write_exp_elt_type (val.typed_val_int.type);
1805 write_exp_elt_longcst ((LONGEST)val.typed_val_int.val);
1806 write_exp_elt_opcode (OP_LONG);
1812 { write_exp_elt_opcode (OP_DOUBLE);
1813 write_exp_elt_type (yyvsp[0].typed_val_float.type);
1814 write_exp_elt_dblcst (yyvsp[0].typed_val_float.dval);
1815 write_exp_elt_opcode (OP_DOUBLE); }
1820 { write_exp_elt_opcode (OP_LONG);
1821 write_exp_elt_type (builtin_type_int);
1822 CHECK_TYPEDEF (yyvsp[-1].tval);
1823 write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (yyvsp[-1].tval));
1824 write_exp_elt_opcode (OP_LONG); }
1829 { /* C strings are converted into array constants with
1830 an explicit null byte added at the end. Thus
1831 the array upper bound is the string length.
1832 There is no such thing in C as a completely empty
1834 char *sp = yyvsp[0].sval.ptr; int count = yyvsp[0].sval.length;
1837 write_exp_elt_opcode (OP_LONG);
1838 write_exp_elt_type (builtin_type_char);
1839 write_exp_elt_longcst ((LONGEST)(*sp++));
1840 write_exp_elt_opcode (OP_LONG);
1842 write_exp_elt_opcode (OP_LONG);
1843 write_exp_elt_type (builtin_type_char);
1844 write_exp_elt_longcst ((LONGEST)'\0');
1845 write_exp_elt_opcode (OP_LONG);
1846 write_exp_elt_opcode (OP_ARRAY);
1847 write_exp_elt_longcst ((LONGEST) 0);
1848 write_exp_elt_longcst ((LONGEST) (yyvsp[0].sval.length));
1849 write_exp_elt_opcode (OP_ARRAY); }
1854 { write_exp_elt_opcode (OP_LONG);
1855 write_exp_elt_type (builtin_type_bool);
1856 write_exp_elt_longcst ((LONGEST) 1);
1857 write_exp_elt_opcode (OP_LONG); }
1862 { write_exp_elt_opcode (OP_LONG);
1863 write_exp_elt_type (builtin_type_bool);
1864 write_exp_elt_longcst ((LONGEST) 0);
1865 write_exp_elt_opcode (OP_LONG); }
1871 if (yyvsp[0].ssym.sym)
1872 yyval.bval = SYMBOL_BLOCK_VALUE (yyvsp[0].ssym.sym);
1874 error ("No file or function \"%s\".",
1875 copy_name (yyvsp[0].ssym.stoken));
1882 yyval.bval = yyvsp[0].bval;
1888 { struct symbol *tem
1889 = lookup_symbol (copy_name (yyvsp[0].sval), yyvsp[-2].bval,
1890 VAR_DOMAIN, (int *) NULL,
1891 (struct symtab **) NULL);
1892 if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
1893 error ("No function \"%s\" in specified context.",
1894 copy_name (yyvsp[0].sval));
1895 yyval.bval = SYMBOL_BLOCK_VALUE (tem); }
1900 { struct symbol *sym;
1901 sym = lookup_symbol (copy_name (yyvsp[0].sval), yyvsp[-2].bval,
1902 VAR_DOMAIN, (int *) NULL,
1903 (struct symtab **) NULL);
1905 error ("No symbol \"%s\" in specified context.",
1906 copy_name (yyvsp[0].sval));
1908 write_exp_elt_opcode (OP_VAR_VALUE);
1909 /* block_found is set by lookup_symbol. */
1910 write_exp_elt_block (block_found);
1911 write_exp_elt_sym (sym);
1912 write_exp_elt_opcode (OP_VAR_VALUE); }
1918 struct type *type = yyvsp[-2].tval;
1919 if (TYPE_CODE (type) != TYPE_CODE_STRUCT
1920 && TYPE_CODE (type) != TYPE_CODE_UNION
1921 && TYPE_CODE (type) != TYPE_CODE_NAMESPACE)
1922 error ("`%s' is not defined as an aggregate type.",
1925 write_exp_elt_opcode (OP_SCOPE);
1926 write_exp_elt_type (type);
1927 write_exp_string (yyvsp[0].sval);
1928 write_exp_elt_opcode (OP_SCOPE);
1935 struct type *type = yyvsp[-3].tval;
1936 struct stoken tmp_token;
1937 if (TYPE_CODE (type) != TYPE_CODE_STRUCT
1938 && TYPE_CODE (type) != TYPE_CODE_UNION
1939 && TYPE_CODE (type) != TYPE_CODE_NAMESPACE)
1940 error ("`%s' is not defined as an aggregate type.",
1943 tmp_token.ptr = (char*) alloca (yyvsp[0].sval.length + 2);
1944 tmp_token.length = yyvsp[0].sval.length + 1;
1945 tmp_token.ptr[0] = '~';
1946 memcpy (tmp_token.ptr+1, yyvsp[0].sval.ptr, yyvsp[0].sval.length);
1947 tmp_token.ptr[tmp_token.length] = 0;
1949 /* Check for valid destructor name. */
1950 destructor_name_p (tmp_token.ptr, type);
1951 write_exp_elt_opcode (OP_SCOPE);
1952 write_exp_elt_type (type);
1953 write_exp_string (tmp_token);
1954 write_exp_elt_opcode (OP_SCOPE);
1961 char *name = copy_name (yyvsp[0].sval);
1963 struct minimal_symbol *msymbol;
1966 lookup_symbol (name, (const struct block *) NULL,
1967 VAR_DOMAIN, (int *) NULL,
1968 (struct symtab **) NULL);
1971 write_exp_elt_opcode (OP_VAR_VALUE);
1972 write_exp_elt_block (NULL);
1973 write_exp_elt_sym (sym);
1974 write_exp_elt_opcode (OP_VAR_VALUE);
1978 msymbol = lookup_minimal_symbol (name, NULL, NULL);
1979 if (msymbol != NULL)
1981 write_exp_msymbol (msymbol,
1982 lookup_function_type (builtin_type_int),
1986 if (!have_full_symbols () && !have_partial_symbols ())
1987 error ("No symbol table is loaded. Use the \"file\" command.");
1989 error ("No symbol \"%s\" in current context.", name);
1995 { struct symbol *sym = yyvsp[0].ssym.sym;
1999 if (symbol_read_needs_frame (sym))
2001 if (innermost_block == 0 ||
2002 contained_in (block_found,
2004 innermost_block = block_found;
2007 write_exp_elt_opcode (OP_VAR_VALUE);
2008 /* We want to use the selected frame, not
2009 another more inner frame which happens to
2010 be in the same block. */
2011 write_exp_elt_block (NULL);
2012 write_exp_elt_sym (sym);
2013 write_exp_elt_opcode (OP_VAR_VALUE);
2015 else if (yyvsp[0].ssym.is_a_field_of_this)
2017 /* C++: it hangs off of `this'. Must
2018 not inadvertently convert from a method call
2020 if (innermost_block == 0 ||
2021 contained_in (block_found, innermost_block))
2022 innermost_block = block_found;
2023 write_exp_elt_opcode (OP_THIS);
2024 write_exp_elt_opcode (OP_THIS);
2025 write_exp_elt_opcode (STRUCTOP_PTR);
2026 write_exp_string (yyvsp[0].ssym.stoken);
2027 write_exp_elt_opcode (STRUCTOP_PTR);
2031 struct minimal_symbol *msymbol;
2032 char *arg = copy_name (yyvsp[0].ssym.stoken);
2035 lookup_minimal_symbol (arg, NULL, NULL);
2036 if (msymbol != NULL)
2038 write_exp_msymbol (msymbol,
2039 lookup_function_type (builtin_type_int),
2042 else if (!have_full_symbols () && !have_partial_symbols ())
2043 error ("No symbol table is loaded. Use the \"file\" command.");
2045 error ("No symbol \"%s\" in current context.",
2046 copy_name (yyvsp[0].ssym.stoken));
2053 { push_type_address_space (copy_name (yyvsp[0].ssym.stoken));
2054 push_type (tp_space_identifier);
2060 { push_type (tp_pointer); yyval.voidval = 0; }
2065 { push_type (tp_pointer); yyval.voidval = yyvsp[0].voidval; }
2070 { push_type (tp_reference); yyval.voidval = 0; }
2075 { push_type (tp_reference); yyval.voidval = yyvsp[0].voidval; }
2080 { yyval.voidval = yyvsp[-1].voidval; }
2086 push_type_int (yyvsp[0].lval);
2087 push_type (tp_array);
2094 push_type_int (yyvsp[0].lval);
2095 push_type (tp_array);
2102 { push_type (tp_function); }
2107 { push_type (tp_function); }
2112 { yyval.lval = -1; }
2117 { yyval.lval = yyvsp[-1].typed_val_int.val; }
2122 { yyval.voidval = 0; }
2127 { free (yyvsp[-1].tvec); yyval.voidval = 0; }
2132 { yyval.tval = lookup_member_type (builtin_type_int, yyvsp[-2].tval); }
2137 { yyval.tval = yyvsp[0].tsym.type; }
2142 { yyval.tval = builtin_type_int; }
2147 { yyval.tval = builtin_type_long; }
2152 { yyval.tval = builtin_type_short; }
2157 { yyval.tval = builtin_type_long; }
2162 { yyval.tval = builtin_type_long; }
2167 { yyval.tval = builtin_type_long; }
2172 { yyval.tval = builtin_type_long; }
2177 { yyval.tval = builtin_type_unsigned_long; }
2182 { yyval.tval = builtin_type_unsigned_long; }
2187 { yyval.tval = builtin_type_unsigned_long; }
2192 { yyval.tval = builtin_type_long_long; }
2197 { yyval.tval = builtin_type_long_long; }
2202 { yyval.tval = builtin_type_long_long; }
2207 { yyval.tval = builtin_type_long_long; }
2212 { yyval.tval = builtin_type_long_long; }
2217 { yyval.tval = builtin_type_long_long; }
2222 { yyval.tval = builtin_type_unsigned_long_long; }
2227 { yyval.tval = builtin_type_unsigned_long_long; }
2232 { yyval.tval = builtin_type_unsigned_long_long; }
2237 { yyval.tval = builtin_type_unsigned_long_long; }
2242 { yyval.tval = builtin_type_short; }
2247 { yyval.tval = builtin_type_short; }
2252 { yyval.tval = builtin_type_short; }
2257 { yyval.tval = builtin_type_unsigned_short; }
2262 { yyval.tval = builtin_type_unsigned_short; }
2267 { yyval.tval = builtin_type_unsigned_short; }
2272 { yyval.tval = builtin_type_double; }
2277 { yyval.tval = builtin_type_long_double; }
2282 { yyval.tval = lookup_struct (copy_name (yyvsp[0].sval),
2283 expression_context_block); }
2288 { yyval.tval = lookup_struct (copy_name (yyvsp[0].sval),
2289 expression_context_block); }
2294 { yyval.tval = lookup_union (copy_name (yyvsp[0].sval),
2295 expression_context_block); }
2300 { yyval.tval = lookup_enum (copy_name (yyvsp[0].sval),
2301 expression_context_block); }
2306 { yyval.tval = lookup_unsigned_typename (TYPE_NAME(yyvsp[0].tsym.type)); }
2311 { yyval.tval = builtin_type_unsigned_int; }
2316 { yyval.tval = lookup_signed_typename (TYPE_NAME(yyvsp[0].tsym.type)); }
2321 { yyval.tval = builtin_type_int; }
2326 { yyval.tval = lookup_template_type(copy_name(yyvsp[-3].sval), yyvsp[-1].tval,
2327 expression_context_block);
2333 { yyval.tval = follow_types (yyvsp[0].tval); }
2338 { yyval.tval = follow_types (yyvsp[-1].tval); }
2344 struct type *type = yyvsp[-2].tval;
2345 struct type *new_type;
2346 char *ncopy = alloca (yyvsp[0].sval.length + 1);
2348 memcpy (ncopy, yyvsp[0].sval.ptr, yyvsp[0].sval.length);
2349 ncopy[yyvsp[0].sval.length] = '\0';
2351 if (TYPE_CODE (type) != TYPE_CODE_STRUCT
2352 && TYPE_CODE (type) != TYPE_CODE_UNION
2353 && TYPE_CODE (type) != TYPE_CODE_NAMESPACE)
2354 error ("`%s' is not defined as an aggregate type.",
2357 new_type = cp_lookup_nested_type (type, ncopy,
2358 expression_context_block);
2359 if (new_type == NULL)
2360 error ("No type \"%s\" within class or namespace \"%s\".",
2361 ncopy, TYPE_NAME (type));
2363 yyval.tval = new_type;
2370 yyval.tsym.stoken.ptr = "int";
2371 yyval.tsym.stoken.length = 3;
2372 yyval.tsym.type = builtin_type_int;
2379 yyval.tsym.stoken.ptr = "long";
2380 yyval.tsym.stoken.length = 4;
2381 yyval.tsym.type = builtin_type_long;
2388 yyval.tsym.stoken.ptr = "short";
2389 yyval.tsym.stoken.length = 5;
2390 yyval.tsym.type = builtin_type_short;
2396 { yyval.tvec = (struct type **) xmalloc (sizeof (struct type *) * 2);
2397 yyval.ivec[0] = 1; /* Number of types in vector */
2398 yyval.tvec[1] = yyvsp[0].tval;
2404 { int len = sizeof (struct type *) * (++(yyvsp[-2].ivec[0]) + 1);
2405 yyval.tvec = (struct type **) xrealloc ((char *) yyvsp[-2].tvec, len);
2406 yyval.tvec[yyval.ivec[0]] = yyvsp[0].tval;
2411 #line 1003 "c-exp.y"
2412 { yyval.tval = follow_types (yyvsp[-3].tval); }
2416 #line 1011 "c-exp.y"
2417 { push_type (tp_const);
2418 push_type (tp_volatile);
2423 #line 1015 "c-exp.y"
2424 { push_type (tp_const); }
2428 #line 1017 "c-exp.y"
2429 { push_type (tp_volatile); }
2433 #line 1020 "c-exp.y"
2434 { yyval.sval = yyvsp[0].ssym.stoken; }
2438 #line 1021 "c-exp.y"
2439 { yyval.sval = yyvsp[0].ssym.stoken; }
2443 #line 1022 "c-exp.y"
2444 { yyval.sval = yyvsp[0].tsym.stoken; }
2448 #line 1023 "c-exp.y"
2449 { yyval.sval = yyvsp[0].ssym.stoken; }
2455 /* Line 991 of yacc.c. */
2461 YY_STACK_PRINT (yyss, yyssp);
2466 /* Now `shift' the result of the reduction. Determine what state
2467 that goes to, based on the state we popped back to and the rule
2468 number reduced by. */
2472 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2473 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2474 yystate = yytable[yystate];
2476 yystate = yydefgoto[yyn - YYNTOKENS];
2481 /*------------------------------------.
2482 | yyerrlab -- here on detecting error |
2483 `------------------------------------*/
2485 /* If not already recovering from an error, report this error. */
2490 yyn = yypact[yystate];
2492 if (YYPACT_NINF < yyn && yyn < YYLAST)
2494 YYSIZE_T yysize = 0;
2495 int yytype = YYTRANSLATE (yychar);
2500 /* Start YYX at -YYN if negative to avoid negative indexes in
2502 for (yyx = yyn < 0 ? -yyn : 0;
2503 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
2504 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2505 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
2506 yysize += yystrlen ("syntax error, unexpected ") + 1;
2507 yysize += yystrlen (yytname[yytype]);
2508 yymsg = (char *) YYSTACK_ALLOC (yysize);
2511 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
2512 yyp = yystpcpy (yyp, yytname[yytype]);
2517 for (yyx = yyn < 0 ? -yyn : 0;
2518 yyx < (int) (sizeof (yytname) / sizeof (char *));
2520 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
2522 const char *yyq = ! yycount ? ", expecting " : " or ";
2523 yyp = yystpcpy (yyp, yyq);
2524 yyp = yystpcpy (yyp, yytname[yyx]);
2529 YYSTACK_FREE (yymsg);
2532 yyerror ("syntax error; also virtual memory exhausted");
2535 #endif /* YYERROR_VERBOSE */
2536 yyerror ("syntax error");
2541 if (yyerrstatus == 3)
2543 /* If just tried and failed to reuse lookahead token after an
2544 error, discard it. */
2546 /* Return failure if at end of input. */
2547 if (yychar == YYEOF)
2549 /* Pop the error token. */
2551 /* Pop the rest of the stack. */
2552 while (yyss < yyssp)
2554 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
2555 yydestruct (yystos[*yyssp], yyvsp);
2561 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
2562 yydestruct (yytoken, &yylval);
2567 /* Else will try to reuse lookahead token after shifting the error
2572 /*----------------------------------------------------.
2573 | yyerrlab1 -- error raised explicitly by an action. |
2574 `----------------------------------------------------*/
2577 /* Suppress GCC warning that yyerrlab1 is unused when no action
2578 invokes YYERROR. Doesn't work in C++ */
2580 #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
2581 __attribute__ ((__unused__))
2589 /*---------------------------------------------------------------.
2590 | yyerrlab2 -- pop states until the error token can be shifted. |
2591 `---------------------------------------------------------------*/
2593 yyerrstatus = 3; /* Each real token shifted decrements this. */
2597 yyn = yypact[yystate];
2598 if (yyn != YYPACT_NINF)
2601 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2609 /* Pop the current state because it cannot handle the error token. */
2613 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
2614 yydestruct (yystos[yystate], yyvsp);
2618 YY_STACK_PRINT (yyss, yyssp);
2624 YYDPRINTF ((stderr, "Shifting error token, "));
2633 /*-------------------------------------.
2634 | yyacceptlab -- YYACCEPT comes here. |
2635 `-------------------------------------*/
2640 /*-----------------------------------.
2641 | yyabortlab -- YYABORT comes here. |
2642 `-----------------------------------*/
2648 /*----------------------------------------------.
2649 | yyoverflowlab -- parser overflow comes here. |
2650 `----------------------------------------------*/
2652 yyerror ("parser stack overflow");
2660 YYSTACK_FREE (yyss);
2666 #line 1037 "c-exp.y"
2669 /* Take care of parsing a number (anything that starts with a digit).
2670 Set yylval and return the token type; update lexptr.
2671 LEN is the number of characters in it. */
2673 /*** Needs some error checking for the float case ***/
2676 parse_number (p, len, parsed_float, putithere)
2682 /* FIXME: Shouldn't these be unsigned? We don't deal with negative values
2683 here, and we do kind of silly things like cast to unsigned. */
2690 int base = input_radix;
2693 /* Number of "L" suffixes encountered. */
2696 /* We have found a "L" or "U" suffix. */
2697 int found_suffix = 0;
2700 struct type *signed_type;
2701 struct type *unsigned_type;
2705 /* It's a float since it contains a point or an exponent. */
2707 int num = 0; /* number of tokens scanned by scanf */
2708 char saved_char = p[len];
2710 p[len] = 0; /* null-terminate the token */
2711 if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
2712 num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval,&c);
2713 else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
2714 num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
2717 #ifdef SCANF_HAS_LONG_DOUBLE
2718 num = sscanf (p, "%Lg%c", &putithere->typed_val_float.dval,&c);
2720 /* Scan it into a double, then assign it to the long double.
2721 This at least wins with values representable in the range
2724 num = sscanf (p, "%lg%c", &temp,&c);
2725 putithere->typed_val_float.dval = temp;
2728 p[len] = saved_char; /* restore the input stream */
2729 if (num != 1) /* check scanf found ONLY a float ... */
2731 /* See if it has `f' or `l' suffix (float or long double). */
2733 c = tolower (p[len - 1]);
2736 putithere->typed_val_float.type = builtin_type_float;
2738 putithere->typed_val_float.type = builtin_type_long_double;
2739 else if (isdigit (c) || c == '.')
2740 putithere->typed_val_float.type = builtin_type_double;
2747 /* Handle base-switching prefixes 0x, 0t, 0d, 0 */
2781 if (c >= 'A' && c <= 'Z')
2783 if (c != 'l' && c != 'u')
2785 if (c >= '0' && c <= '9')
2793 if (base > 10 && c >= 'a' && c <= 'f')
2797 n += i = c - 'a' + 10;
2810 return ERROR; /* Char not a digit */
2813 return ERROR; /* Invalid digit in this base */
2815 /* Portably test for overflow (only works for nonzero values, so make
2816 a second check for zero). FIXME: Can't we just make n and prevn
2817 unsigned and avoid this? */
2818 if (c != 'l' && c != 'u' && (prevn >= n) && n != 0)
2819 unsigned_p = 1; /* Try something unsigned */
2821 /* Portably test for unsigned overflow.
2822 FIXME: This check is wrong; for example it doesn't find overflow
2823 on 0x123456789 when LONGEST is 32 bits. */
2824 if (c != 'l' && c != 'u' && n != 0)
2826 if ((unsigned_p && (ULONGEST) prevn >= (ULONGEST) n))
2827 error ("Numeric constant too large.");
2832 /* An integer constant is an int, a long, or a long long. An L
2833 suffix forces it to be long; an LL suffix forces it to be long
2834 long. If not forced to a larger size, it gets the first type of
2835 the above that it fits in. To figure out whether it fits, we
2836 shift it right and see whether anything remains. Note that we
2837 can't shift sizeof (LONGEST) * HOST_CHAR_BIT bits or more in one
2838 operation, because many compilers will warn about such a shift
2839 (which always produces a zero result). Sometimes TARGET_INT_BIT
2840 or TARGET_LONG_BIT will be that big, sometimes not. To deal with
2841 the case where it is we just always shift the value more than
2842 once, with fewer bits each time. */
2844 un = (ULONGEST)n >> 2;
2846 && (un >> (TARGET_INT_BIT - 2)) == 0)
2848 high_bit = ((ULONGEST)1) << (TARGET_INT_BIT-1);
2850 /* A large decimal (not hex or octal) constant (between INT_MAX
2851 and UINT_MAX) is a long or unsigned long, according to ANSI,
2852 never an unsigned int, but this code treats it as unsigned
2853 int. This probably should be fixed. GCC gives a warning on
2856 unsigned_type = builtin_type_unsigned_int;
2857 signed_type = builtin_type_int;
2859 else if (long_p <= 1
2860 && (un >> (TARGET_LONG_BIT - 2)) == 0)
2862 high_bit = ((ULONGEST)1) << (TARGET_LONG_BIT-1);
2863 unsigned_type = builtin_type_unsigned_long;
2864 signed_type = builtin_type_long;
2869 if (sizeof (ULONGEST) * HOST_CHAR_BIT < TARGET_LONG_LONG_BIT)
2870 /* A long long does not fit in a LONGEST. */
2871 shift = (sizeof (ULONGEST) * HOST_CHAR_BIT - 1);
2873 shift = (TARGET_LONG_LONG_BIT - 1);
2874 high_bit = (ULONGEST) 1 << shift;
2875 unsigned_type = builtin_type_unsigned_long_long;
2876 signed_type = builtin_type_long_long;
2879 putithere->typed_val_int.val = n;
2881 /* If the high bit of the worked out type is set then this number
2882 has to be unsigned. */
2884 if (unsigned_p || (n & high_bit))
2886 putithere->typed_val_int.type = unsigned_type;
2890 putithere->typed_val_int.type = signed_type;
2900 enum exp_opcode opcode;
2903 static const struct token tokentab3[] =
2905 {">>=", ASSIGN_MODIFY, BINOP_RSH},
2906 {"<<=", ASSIGN_MODIFY, BINOP_LSH}
2909 static const struct token tokentab2[] =
2911 {"+=", ASSIGN_MODIFY, BINOP_ADD},
2912 {"-=", ASSIGN_MODIFY, BINOP_SUB},
2913 {"*=", ASSIGN_MODIFY, BINOP_MUL},
2914 {"/=", ASSIGN_MODIFY, BINOP_DIV},
2915 {"%=", ASSIGN_MODIFY, BINOP_REM},
2916 {"|=", ASSIGN_MODIFY, BINOP_BITWISE_IOR},
2917 {"&=", ASSIGN_MODIFY, BINOP_BITWISE_AND},
2918 {"^=", ASSIGN_MODIFY, BINOP_BITWISE_XOR},
2919 {"++", INCREMENT, BINOP_END},
2920 {"--", DECREMENT, BINOP_END},
2921 {"->", ARROW, BINOP_END},
2922 {"&&", ANDAND, BINOP_END},
2923 {"||", OROR, BINOP_END},
2924 {"::", COLONCOLON, BINOP_END},
2925 {"<<", LSH, BINOP_END},
2926 {">>", RSH, BINOP_END},
2927 {"==", EQUAL, BINOP_END},
2928 {"!=", NOTEQUAL, BINOP_END},
2929 {"<=", LEQ, BINOP_END},
2930 {">=", GEQ, BINOP_END}
2933 /* Read one token, getting characters through lexptr. */
2944 static char *tempbuf;
2945 static int tempbufsize;
2946 struct symbol * sym_class = NULL;
2947 char * token_string = NULL;
2948 int class_prefix = 0;
2953 /* Check if this is a macro invocation that we need to expand. */
2954 if (! scanning_macro_expansion ())
2956 char *expanded = macro_expand_next (&lexptr,
2957 expression_macro_lookup_func,
2958 expression_macro_lookup_baton);
2961 scan_macro_expansion (expanded);
2964 prev_lexptr = lexptr;
2968 /* See if it is a special token of length 3. */
2969 for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
2970 if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
2973 yylval.opcode = tokentab3[i].opcode;
2974 return tokentab3[i].token;
2977 /* See if it is a special token of length 2. */
2978 for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
2979 if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
2982 yylval.opcode = tokentab2[i].opcode;
2983 return tokentab2[i].token;
2986 switch (c = *tokstart)
2989 /* If we were just scanning the result of a macro expansion,
2990 then we need to resume scanning the original text.
2991 Otherwise, we were already scanning the original text, and
2992 we're really done. */
2993 if (scanning_macro_expansion ())
2995 finished_macro_expansion ();
3008 /* We either have a character constant ('0' or '\177' for example)
3009 or we have a quoted symbol reference ('foo(int,int)' in C++
3014 c = parse_escape (&lexptr);
3016 error ("Empty character constant.");
3017 else if (! host_char_to_target (c, &c))
3019 int toklen = lexptr - tokstart + 1;
3020 char *tok = alloca (toklen + 1);
3021 memcpy (tok, tokstart, toklen);
3023 error ("There is no character corresponding to %s in the target "
3024 "character set `%s'.", tok, target_charset ());
3027 yylval.typed_val_int.val = c;
3028 yylval.typed_val_int.type = builtin_type_char;
3033 namelen = skip_quoted (tokstart) - tokstart;
3036 lexptr = tokstart + namelen;
3038 if (lexptr[-1] != '\'')
3039 error ("Unmatched single quote.");
3044 error ("Invalid character constant.");
3054 if (paren_depth == 0)
3061 if (comma_terminates
3063 && ! scanning_macro_expansion ())
3069 /* Might be a floating point number. */
3070 if (lexptr[1] < '0' || lexptr[1] > '9')
3071 goto symbol; /* Nope, must be a symbol. */
3072 /* FALL THRU into number case. */
3085 /* It's a number. */
3086 int got_dot = 0, got_e = 0, toktype;
3088 int hex = input_radix > 10;
3090 if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
3095 else if (c == '0' && (p[1]=='t' || p[1]=='T' || p[1]=='d' || p[1]=='D'))
3103 /* This test includes !hex because 'e' is a valid hex digit
3104 and thus does not indicate a floating point number when
3105 the radix is hex. */
3106 if (!hex && !got_e && (*p == 'e' || *p == 'E'))
3107 got_dot = got_e = 1;
3108 /* This test does not include !hex, because a '.' always indicates
3109 a decimal floating point number regardless of the radix. */
3110 else if (!got_dot && *p == '.')
3112 else if (got_e && (p[-1] == 'e' || p[-1] == 'E')
3113 && (*p == '-' || *p == '+'))
3114 /* This is the sign of the exponent, not the end of the
3117 /* We will take any letters or digits. parse_number will
3118 complain if past the radix, or if L or U are not final. */
3119 else if ((*p < '0' || *p > '9')
3120 && ((*p < 'a' || *p > 'z')
3121 && (*p < 'A' || *p > 'Z')))
3124 toktype = parse_number (tokstart, p - tokstart, got_dot|got_e, &yylval);
3125 if (toktype == ERROR)
3127 char *err_copy = (char *) alloca (p - tokstart + 1);
3129 memcpy (err_copy, tokstart, p - tokstart);
3130 err_copy[p - tokstart] = 0;
3131 error ("Invalid number \"%s\".", err_copy);
3163 /* Build the gdb internal form of the input string in tempbuf,
3164 translating any standard C escape forms seen. Note that the
3165 buffer is null byte terminated *only* for the convenience of
3166 debugging gdb itself and printing the buffer contents when
3167 the buffer contains no embedded nulls. Gdb does not depend
3168 upon the buffer being null byte terminated, it uses the length
3169 string instead. This allows gdb to handle C strings (as well
3170 as strings in other languages) with embedded null bytes */
3172 tokptr = ++tokstart;
3176 char *char_start_pos = tokptr;
3178 /* Grow the static temp buffer if necessary, including allocating
3179 the first one on demand. */
3180 if (tempbufindex + 1 >= tempbufsize)
3182 tempbuf = (char *) xrealloc (tempbuf, tempbufsize += 64);
3188 /* Do nothing, loop will terminate. */
3192 c = parse_escape (&tokptr);
3197 tempbuf[tempbufindex++] = c;
3201 if (! host_char_to_target (c, &c))
3203 int len = tokptr - char_start_pos;
3204 char *copy = alloca (len + 1);
3205 memcpy (copy, char_start_pos, len);
3208 error ("There is no character corresponding to `%s' "
3209 "in the target character set `%s'.",
3210 copy, target_charset ());
3212 tempbuf[tempbufindex++] = c;
3215 } while ((*tokptr != '"') && (*tokptr != '\0'));
3216 if (*tokptr++ != '"')
3218 error ("Unterminated string in expression.");
3220 tempbuf[tempbufindex] = '\0'; /* See note above */
3221 yylval.sval.ptr = tempbuf;
3222 yylval.sval.length = tempbufindex;
3227 if (!(c == '_' || c == '$'
3228 || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
3229 /* We must have come across a bad character (e.g. ';'). */
3230 error ("Invalid character '%c' in expression.", c);
3232 /* It's a name. See how long it is. */
3234 for (c = tokstart[namelen];
3235 (c == '_' || c == '$' || (c >= '0' && c <= '9')
3236 || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '<');)
3238 /* Template parameter lists are part of the name.
3239 FIXME: This mishandles `print $a<4&&$a>3'. */
3243 /* Scan ahead to get rest of the template specification. Note
3244 that we look ahead only when the '<' adjoins non-whitespace
3245 characters; for comparison expressions, e.g. "a < b > c",
3246 there must be spaces before the '<', etc. */
3248 char * p = find_template_name_end (tokstart + namelen);
3250 namelen = p - tokstart;
3253 c = tokstart[++namelen];
3256 /* The token "if" terminates the expression and is NOT removed from
3257 the input stream. It doesn't count if it appears in the
3258 expansion of a macro. */
3260 && tokstart[0] == 'i'
3261 && tokstart[1] == 'f'
3262 && ! scanning_macro_expansion ())
3271 /* Catch specific keywords. Should be done with a data structure. */
3275 if (strncmp (tokstart, "unsigned", 8) == 0)
3277 if (current_language->la_language == language_cplus
3278 && strncmp (tokstart, "template", 8) == 0)
3280 if (strncmp (tokstart, "volatile", 8) == 0)
3281 return VOLATILE_KEYWORD;
3284 if (strncmp (tokstart, "struct", 6) == 0)
3286 if (strncmp (tokstart, "signed", 6) == 0)
3287 return SIGNED_KEYWORD;
3288 if (strncmp (tokstart, "sizeof", 6) == 0)
3290 if (strncmp (tokstart, "double", 6) == 0)
3291 return DOUBLE_KEYWORD;
3294 if (current_language->la_language == language_cplus)
3296 if (strncmp (tokstart, "false", 5) == 0)
3297 return FALSEKEYWORD;
3298 if (strncmp (tokstart, "class", 5) == 0)
3301 if (strncmp (tokstart, "union", 5) == 0)
3303 if (strncmp (tokstart, "short", 5) == 0)
3305 if (strncmp (tokstart, "const", 5) == 0)
3306 return CONST_KEYWORD;
3309 if (strncmp (tokstart, "enum", 4) == 0)
3311 if (strncmp (tokstart, "long", 4) == 0)
3313 if (current_language->la_language == language_cplus)
3315 if (strncmp (tokstart, "true", 4) == 0)
3320 if (strncmp (tokstart, "int", 3) == 0)
3327 yylval.sval.ptr = tokstart;
3328 yylval.sval.length = namelen;
3330 if (*tokstart == '$')
3332 write_dollar_variable (yylval.sval);
3336 /* Look ahead and see if we can consume more of the input
3337 string to get a reasonable class/namespace spec or a
3338 fully-qualified name. This is a kludge to get around the
3339 HP aCC compiler's generation of symbol names with embedded
3340 colons for namespace and nested classes. */
3342 /* NOTE: carlton/2003-09-24: I don't entirely understand the
3343 HP-specific code, either here or in linespec. Having said that,
3344 I suspect that we're actually moving towards their model: we want
3345 symbols whose names are fully qualified, which matches the
3346 description above. */
3349 /* Only do it if not inside single quotes */
3350 sym_class = parse_nested_classes_for_hpacc (yylval.sval.ptr, yylval.sval.length,
3351 &token_string, &class_prefix, &lexptr);
3354 /* Replace the current token with the bigger one we found */
3355 yylval.sval.ptr = token_string;
3356 yylval.sval.length = strlen (token_string);
3360 /* Use token-type BLOCKNAME for symbols that happen to be defined as
3361 functions or symtabs. If this is not so, then ...
3362 Use token-type TYPENAME for symbols that happen to be defined
3363 currently as names of types; NAME for other symbols.
3364 The caller is not constrained to care about the distinction. */
3366 char *tmp = copy_name (yylval.sval);
3368 int is_a_field_of_this = 0;
3371 sym = lookup_symbol (tmp, expression_context_block,
3373 current_language->la_language == language_cplus
3374 ? &is_a_field_of_this : (int *) NULL,
3375 (struct symtab **) NULL);
3376 /* Call lookup_symtab, not lookup_partial_symtab, in case there are
3377 no psymtabs (coff, xcoff, or some future change to blow away the
3378 psymtabs once once symbols are read). */
3379 if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
3381 yylval.ssym.sym = sym;
3382 yylval.ssym.is_a_field_of_this = is_a_field_of_this;
3386 { /* See if it's a file name. */
3387 struct symtab *symtab;
3389 symtab = lookup_symtab (tmp);
3393 yylval.bval = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK);
3398 if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
3400 /* NOTE: carlton/2003-09-25: There used to be code here to
3401 handle nested types. It didn't work very well. See the
3402 comment before qualified_type for more info. */
3403 yylval.tsym.type = SYMBOL_TYPE (sym);
3406 if ((yylval.tsym.type = lookup_primitive_typename (tmp)) != 0)
3409 /* Input names that aren't symbols but ARE valid hex numbers,
3410 when the input radix permits them, can be names or numbers
3411 depending on the parse. Note we support radixes > 16 here. */
3413 ((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10) ||
3414 (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
3416 YYSTYPE newlval; /* Its value is ignored. */
3417 hextype = parse_number (tokstart, namelen, 0, &newlval);
3420 yylval.ssym.sym = sym;
3421 yylval.ssym.is_a_field_of_this = is_a_field_of_this;
3426 /* Any other kind of symbol */
3427 yylval.ssym.sym = sym;
3428 yylval.ssym.is_a_field_of_this = is_a_field_of_this;
3438 lexptr = prev_lexptr;
3440 error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);