1 /* A Bison parser, made by GNU Bison 1.875c. */
3 /* Skeleton parser for Yacc-like parsing with Bison,
4 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 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
59 BOOLEAN_LITERAL
= 261,
67 LOGICAL_S1_KEYWORD
= 269,
68 LOGICAL_S2_KEYWORD
= 270,
69 LOGICAL_KEYWORD
= 271,
71 REAL_S8_KEYWORD
= 273,
72 REAL_S16_KEYWORD
= 274,
73 COMPLEX_S8_KEYWORD
= 275,
74 COMPLEX_S16_KEYWORD
= 276,
75 COMPLEX_S32_KEYWORD
= 277,
97 #define STRING_LITERAL 260
98 #define BOOLEAN_LITERAL 261
101 #define NAME_OR_INT 264
104 #define INT_KEYWORD 267
105 #define INT_S2_KEYWORD 268
106 #define LOGICAL_S1_KEYWORD 269
107 #define LOGICAL_S2_KEYWORD 270
108 #define LOGICAL_KEYWORD 271
109 #define REAL_KEYWORD 272
110 #define REAL_S8_KEYWORD 273
111 #define REAL_S16_KEYWORD 274
112 #define COMPLEX_S8_KEYWORD 275
113 #define COMPLEX_S16_KEYWORD 276
114 #define COMPLEX_S32_KEYWORD 277
118 #define CHARACTER 281
120 #define ASSIGN_MODIFY 283
121 #define ABOVE_COMMA 284
126 #define GREATERTHAN 289
136 /* Copy the first part of user declarations. */
141 #include "gdb_string.h"
142 #include "expression.h"
144 #include "parser-defs.h"
145 #include "language.h"
147 #include "bfd.h" /* Required by objfiles.h. */
148 #include "symfile.h" /* Required by objfiles.h. */
149 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
153 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
154 as well as gratuitiously global symbol names, so we can have multiple
155 yacc generated parsers in gdb. Note that these are only the variables
156 produced by yacc. If other parser generators (bison, byacc, etc) produce
157 additional global names that conflict at link time, then those parser
158 generators need to be fixed instead of adding those names to this list. */
160 #define yymaxdepth f_maxdepth
161 #define yyparse f_parse
163 #define yyerror f_error
164 #define yylval f_lval
165 #define yychar f_char
166 #define yydebug f_debug
167 #define yypact f_pact
174 #define yyexca f_exca
175 #define yyerrflag f_errflag
176 #define yynerrs f_nerrs
181 #define yystate f_state
186 #define yylloc f_lloc
187 #define yyreds f_reds /* With YYDEBUG defined */
188 #define yytoks f_toks /* With YYDEBUG defined */
189 #define yyname f_name /* With YYDEBUG defined */
190 #define yyrule f_rule /* With YYDEBUG defined */
191 #define yylhs f_yylhs
192 #define yylen f_yylen
193 #define yydefred f_yydefred
194 #define yydgoto f_yydgoto
195 #define yysindex f_yysindex
196 #define yyrindex f_yyrindex
197 #define yygindex f_yygindex
198 #define yytable f_yytable
199 #define yycheck f_yycheck
202 #define YYDEBUG 1 /* Default to yydebug support */
205 #define YYFPRINTF parser_fprintf
209 static int yylex (void);
211 void yyerror (char *);
213 static void growbuf_by_size (int);
215 static int match_string_literal (void);
219 /* Enabling traces. */
224 /* Enabling verbose error messages. */
225 #ifdef YYERROR_VERBOSE
226 # undef YYERROR_VERBOSE
227 # define YYERROR_VERBOSE 1
229 # define YYERROR_VERBOSE 0
232 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
234 typedef union YYSTYPE
{
245 struct symtoken ssym
;
248 enum exp_opcode opcode
;
249 struct internalvar
*ivar
;
254 /* Line 191 of yacc.c. */
255 #line 256 "f-exp.c.tmp"
256 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
257 # define YYSTYPE_IS_DECLARED 1
258 # define YYSTYPE_IS_TRIVIAL 1
263 /* Copy the second part of user declarations. */
266 /* YYSTYPE gets defined by %union */
267 static int parse_number (char *, int, int, YYSTYPE
*);
270 /* Line 214 of yacc.c. */
271 #line 272 "f-exp.c.tmp"
273 #if ! defined (yyoverflow) || YYERROR_VERBOSE
279 # define YYMALLOC xmalloc
282 /* The parser invokes alloca or xmalloc; define the necessary symbols. */
284 # ifdef YYSTACK_USE_ALLOCA
285 # if YYSTACK_USE_ALLOCA
286 # define YYSTACK_ALLOC alloca
289 # if defined (alloca) || defined (_ALLOCA_H)
290 # define YYSTACK_ALLOC alloca
293 # define YYSTACK_ALLOC __builtin_alloca
298 # ifdef YYSTACK_ALLOC
299 /* Pacify GCC's `empty if-body' warning. */
300 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
302 # if defined (__STDC__) || defined (__cplusplus)
303 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
304 # define YYSIZE_T size_t
306 # define YYSTACK_ALLOC YYMALLOC
307 # define YYSTACK_FREE YYFREE
309 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
312 #if (! defined (yyoverflow) \
313 && (! defined (__cplusplus) \
314 || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
316 /* A type that is properly aligned for any stack member. */
323 /* The size of the maximum gap between one aligned stack and the next. */
324 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
326 /* The size of an array large to enough to hold all stacks, each with
328 # define YYSTACK_BYTES(N) \
329 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
330 + YYSTACK_GAP_MAXIMUM)
332 /* Copy COUNT objects from FROM to TO. The source and destination do
335 # if defined (__GNUC__) && 1 < __GNUC__
336 # define YYCOPY(To, From, Count) \
337 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
339 # define YYCOPY(To, From, Count) \
342 register YYSIZE_T yyi; \
343 for (yyi = 0; yyi < (Count); yyi++) \
344 (To)[yyi] = (From)[yyi]; \
350 /* Relocate STACK from its old location to the new one. The
351 local variables YYSIZE and YYSTACKSIZE give the old and new number of
352 elements in the stack, and YYPTR gives the new location of the
353 stack. Advance YYPTR to a properly aligned location for the next
355 # define YYSTACK_RELOCATE(Stack) \
358 YYSIZE_T yynewbytes; \
359 YYCOPY (&yyptr->Stack, Stack, yysize); \
360 Stack = &yyptr->Stack; \
361 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
362 yyptr += yynewbytes / sizeof (*yyptr); \
368 #if defined (__STDC__) || defined (__cplusplus)
369 typedef signed char yysigned_char
;
371 typedef short yysigned_char
;
374 /* YYFINAL -- State number of the termination state. */
376 /* YYLAST -- Last index in YYTABLE. */
379 /* YYNTOKENS -- Number of terminals. */
381 /* YYNNTS -- Number of nonterminals. */
383 /* YYNRULES -- Number of rules. */
385 /* YYNRULES -- Number of states. */
386 #define YYNSTATES 130
388 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
390 #define YYMAXUTOK 294
392 #define YYTRANSLATE(YYX) \
393 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
395 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
396 static const unsigned char yytranslate
[] =
398 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
399 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
400 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
401 2, 2, 2, 2, 2, 2, 2, 50, 35, 2,
402 52, 53, 47, 45, 29, 46, 2, 48, 2, 2,
403 2, 2, 2, 2, 2, 2, 2, 2, 55, 2,
404 2, 31, 2, 32, 44, 2, 2, 2, 2, 2,
405 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
406 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
407 2, 2, 2, 2, 34, 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, 2, 2, 2, 33, 2, 54, 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, 2, 2, 2, 2, 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, 1, 2, 3, 4,
424 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
425 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
426 25, 26, 27, 28, 30, 36, 37, 38, 39, 40,
431 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
433 static const unsigned char yyprhs
[] =
435 0, 0, 3, 5, 7, 9, 13, 16, 19, 22,
436 25, 28, 31, 32, 38, 39, 41, 43, 47, 51,
437 54, 57, 59, 63, 67, 72, 76, 80, 84, 88,
438 92, 96, 100, 104, 108, 112, 116, 120, 124, 128,
439 132, 136, 140, 144, 148, 152, 156, 160, 162, 164,
440 166, 168, 170, 175, 177, 179, 181, 183, 185, 188,
441 190, 193, 195, 198, 200, 204, 207, 209, 212, 216,
442 218, 220, 222, 224, 226, 228, 230, 232, 234, 236,
443 238, 240, 242, 244, 248, 250
446 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
447 static const yysigned_char yyrhs
[] =
449 57, 0, -1, 59, -1, 58, -1, 65, -1, 52,
450 59, 53, -1, 47, 59, -1, 35, 59, -1, 46,
451 59, -1, 25, 59, -1, 54, 59, -1, 10, 59,
452 -1, -1, 59, 52, 60, 61, 53, -1, -1, 59,
453 -1, 62, -1, 61, 29, 59, -1, 59, 55, 59,
454 -1, 59, 55, -1, 55, 59, -1, 55, -1, 59,
455 29, 59, -1, 52, 63, 53, -1, 52, 65, 53,
456 59, -1, 59, 50, 72, -1, 59, 44, 59, -1,
457 59, 49, 59, -1, 59, 47, 59, -1, 59, 48,
458 59, -1, 59, 45, 59, -1, 59, 46, 59, -1,
459 59, 43, 59, -1, 59, 42, 59, -1, 59, 37,
460 59, -1, 59, 36, 59, -1, 59, 39, 59, -1,
461 59, 38, 59, -1, 59, 41, 59, -1, 59, 40,
462 59, -1, 59, 35, 59, -1, 59, 34, 59, -1,
463 59, 33, 59, -1, 59, 23, 59, -1, 59, 24,
464 59, -1, 59, 31, 59, -1, 59, 28, 59, -1,
465 3, -1, 9, -1, 4, -1, 64, -1, 27, -1,
466 10, 52, 65, 53, -1, 6, -1, 5, -1, 73,
467 -1, 66, -1, 70, -1, 70, 67, -1, 47, -1,
468 47, 67, -1, 35, -1, 35, 67, -1, 68, -1,
469 52, 67, 53, -1, 68, 69, -1, 69, -1, 52,
470 53, -1, 52, 71, 53, -1, 8, -1, 12, -1,
471 13, -1, 26, -1, 16, -1, 15, -1, 14, -1,
472 17, -1, 18, -1, 19, -1, 20, -1, 21, -1,
473 22, -1, 65, -1, 71, 29, 65, -1, 7, -1,
477 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
478 static const unsigned short yyrline
[] =
480 0, 230, 230, 231, 234, 240, 245, 249, 253, 257,
481 261, 265, 275, 274, 282, 285, 289, 293, 299, 305,
482 311, 317, 323, 327, 331, 337, 345, 349, 353, 357,
483 361, 365, 369, 373, 377, 381, 385, 389, 393, 397,
484 401, 405, 409, 413, 418, 422, 426, 432, 439, 448,
485 455, 458, 461, 469, 476, 484, 528, 531, 532, 575,
486 577, 579, 581, 583, 586, 588, 590, 594, 596, 601,
487 603, 605, 607, 609, 611, 613, 615, 617, 619, 621,
488 623, 625, 630, 635, 642, 646
492 #if YYDEBUG || YYERROR_VERBOSE
493 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
494 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
495 static const char *const yytname
[] =
497 "$end", "error", "$undefined", "INT", "FLOAT", "STRING_LITERAL",
498 "BOOLEAN_LITERAL", "NAME", "TYPENAME", "NAME_OR_INT", "SIZEOF", "ERROR",
499 "INT_KEYWORD", "INT_S2_KEYWORD", "LOGICAL_S1_KEYWORD",
500 "LOGICAL_S2_KEYWORD", "LOGICAL_KEYWORD", "REAL_KEYWORD",
501 "REAL_S8_KEYWORD", "REAL_S16_KEYWORD", "COMPLEX_S8_KEYWORD",
502 "COMPLEX_S16_KEYWORD", "COMPLEX_S32_KEYWORD", "BOOL_AND", "BOOL_OR",
503 "BOOL_NOT", "CHARACTER", "VARIABLE", "ASSIGN_MODIFY", "','",
504 "ABOVE_COMMA", "'='", "'?'", "'|'", "'^'", "'&'", "NOTEQUAL", "EQUAL",
505 "GEQ", "LEQ", "GREATERTHAN", "LESSTHAN", "RSH", "LSH", "'@'", "'+'",
506 "'-'", "'*'", "'/'", "STARSTAR", "'%'", "UNARY", "'('", "')'", "'~'",
507 "':'", "$accept", "start", "type_exp", "exp", "@1", "arglist",
508 "subrange", "complexnum", "variable", "type", "ptype", "abs_decl",
509 "direct_abs_decl", "func_mod", "typebase", "nonempty_typelist", "name",
510 "name_not_typename", 0
515 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
517 static const unsigned short yytoknum
[] =
519 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
520 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
521 275, 276, 277, 278, 279, 280, 281, 282, 283, 44,
522 284, 61, 63, 124, 94, 38, 285, 286, 287, 288,
523 289, 290, 291, 292, 64, 43, 45, 42, 47, 293,
524 37, 294, 40, 41, 126, 58
528 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
529 static const unsigned char yyr1
[] =
531 0, 56, 57, 57, 58, 59, 59, 59, 59, 59,
532 59, 59, 60, 59, 61, 61, 61, 61, 62, 62,
533 62, 62, 63, 59, 59, 59, 59, 59, 59, 59,
534 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
535 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
536 59, 59, 59, 59, 59, 64, 65, 66, 66, 67,
537 67, 67, 67, 67, 68, 68, 68, 69, 69, 70,
538 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
539 70, 70, 71, 71, 72, 73
542 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
543 static const unsigned char yyr2
[] =
545 0, 2, 1, 1, 1, 3, 2, 2, 2, 2,
546 2, 2, 0, 5, 0, 1, 1, 3, 3, 2,
547 2, 1, 3, 3, 4, 3, 3, 3, 3, 3,
548 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
549 3, 3, 3, 3, 3, 3, 3, 1, 1, 1,
550 1, 1, 4, 1, 1, 1, 1, 1, 2, 1,
551 2, 1, 2, 1, 3, 2, 1, 2, 3, 1,
552 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
556 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
557 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
558 means the default is an error. */
559 static const unsigned char yydefact
[] =
561 0, 47, 49, 54, 53, 85, 69, 48, 0, 70,
562 71, 75, 74, 73, 76, 77, 78, 79, 80, 81,
563 0, 72, 51, 0, 0, 0, 0, 0, 0, 3,
564 2, 50, 4, 56, 57, 55, 0, 11, 9, 7,
565 8, 6, 0, 0, 0, 10, 1, 0, 0, 0,
566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
567 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,
568 61, 59, 0, 58, 63, 66, 0, 0, 5, 23,
569 0, 43, 44, 46, 45, 42, 41, 40, 35, 34,
570 37, 36, 39, 38, 33, 32, 26, 30, 31, 28,
571 29, 27, 84, 25, 14, 62, 60, 67, 82, 0,
572 0, 0, 65, 52, 22, 24, 21, 15, 0, 16,
573 64, 0, 68, 20, 19, 0, 13, 83, 18, 17
576 /* YYDEFGOTO[NTERM-NUM]. */
577 static const yysigned_char yydefgoto
[] =
579 -1, 28, 29, 42, 104, 118, 119, 43, 31, 108,
580 33, 73, 74, 75, 34, 110, 103, 35
583 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
585 #define YYPACT_NINF -49
586 static const short yypact
[] =
588 123, -49, -49, -49, -49, -49, -49, -49, 156, -49,
589 -49, -49, -49, -49, -49, -49, -49, -49, -49, -49,
590 189, -49, -49, 189, 189, 189, 123, 189, 3, -49,
591 362, -49, -49, -49, -34, -49, 123, -48, -48, -48,
592 -48, -48, 331, -46, -32, -48, -49, 189, 189, 189,
593 189, 189, 189, 189, 189, 189, 189, 189, 189, 189,
594 189, 189, 189, 189, 189, 189, 189, 189, 8, -49,
595 -34, -34, 238, -49, -26, -49, -31, 189, -49, -49,
596 189, 410, 390, 362, 362, 429, 447, 464, 479, 479,
597 39, 39, 39, 39, -13, -13, 49, -38, -38, -33,
598 -33, -33, -49, -49, 65, -49, -49, -49, -49, -10,
599 -24, 280, -49, 222, 362, -48, 189, 301, -23, -49,
600 -49, 295, -49, 362, 189, 189, -49, -49, 362, 362
603 /* YYPGOTO[NTERM-NUM]. */
604 static const yysigned_char yypgoto
[] =
606 -49, -49, -49, 0, -49, -49, -49, -49, -49, 2,
607 -49, -30, -49, -29, -49, -49, -49, -49
610 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
611 positive, shift that token. If negative, reduce the rule which
612 number is the opposite. If zero, do what YYDEFACT says.
613 If YYTABLE_NINF, syntax error. */
614 #define YYTABLE_NINF -1
615 static const unsigned char yytable
[] =
617 30, 70, 32, 46, 69, 121, 125, 79, 37, 65,
618 66, 67, 68, 71, 69, 102, 67, 68, 72, 69,
619 38, 80, 113, 39, 40, 41, 111, 45, 44, 122,
620 126, 62, 63, 64, 65, 66, 67, 68, 76, 69,
621 105, 106, 109, 120, 0, 112, 0, 81, 82, 83,
622 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
623 94, 95, 96, 97, 98, 99, 100, 101, 1, 2,
624 3, 4, 5, 0, 7, 8, 0, 114, 0, 0,
625 115, 60, 61, 62, 63, 64, 65, 66, 67, 68,
626 20, 69, 22, 0, 63, 64, 65, 66, 67, 68,
627 23, 69, 0, 0, 117, 0, 0, 0, 0, 0,
628 0, 24, 25, 115, 0, 0, 123, 26, 0, 27,
629 116, 0, 0, 127, 128, 129, 1, 2, 3, 4,
630 5, 6, 7, 8, 0, 9, 10, 11, 12, 13,
631 14, 15, 16, 17, 18, 19, 0, 0, 20, 21,
632 22, 0, 0, 0, 0, 0, 0, 0, 23, 1,
633 2, 3, 4, 5, 0, 7, 8, 0, 0, 24,
634 25, 0, 0, 0, 0, 26, 0, 27, 0, 0,
635 0, 20, 0, 22, 0, 0, 0, 0, 0, 0,
636 0, 23, 1, 2, 3, 4, 5, 0, 7, 8,
637 0, 0, 24, 25, 0, 0, 0, 0, 36, 0,
638 27, 0, 0, 0, 20, 0, 22, 0, 0, 0,
639 0, 0, 0, 0, 23, 1, 2, 3, 4, 5,
640 0, 7, 8, 0, 0, 24, 25, 0, 0, 0,
641 0, 26, 0, 27, 0, 0, 6, 20, 0, 22,
642 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
643 19, 0, 0, 0, 21, 0, 0, 0, 0, 0,
644 0, 0, 0, 70, 26, 0, 27, 0, 0, 0,
645 0, 0, 0, 0, 0, 71, 0, 0, 6, 0,
646 72, 107, 9, 10, 11, 12, 13, 14, 15, 16,
647 17, 18, 19, 6, 0, 0, 21, 9, 10, 11,
648 12, 13, 14, 15, 16, 17, 18, 19, 0, 0,
649 0, 21, 0, 0, 47, 48, 0, 0, 0, 49,
650 0, 0, 50, 107, 51, 52, 53, 54, 55, 56,
651 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
652 67, 68, 0, 69, 47, 48, 124, 0, 0, 49,
653 77, 0, 50, 0, 51, 52, 53, 54, 55, 56,
654 57, 58, 59, 60, 61, 62, 63, 64, 65, 66,
655 67, 68, 0, 69, 78, 47, 48, 0, 0, 0,
656 49, 0, 0, 50, 0, 51, 52, 53, 54, 55,
657 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
658 66, 67, 68, 47, 69, 0, 0, 0, 0, 0,
659 0, 0, 0, 51, 52, 53, 54, 55, 56, 57,
660 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
661 68, 0, 69, 51, 52, 53, 54, 55, 56, 57,
662 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
663 68, 0, 69, 52, 53, 54, 55, 56, 57, 58,
664 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
665 0, 69, 53, 54, 55, 56, 57, 58, 59, 60,
666 61, 62, 63, 64, 65, 66, 67, 68, 0, 69,
667 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
668 64, 65, 66, 67, 68, 0, 69, 56, 57, 58,
669 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
673 static const yysigned_char yycheck
[] =
675 0, 35, 0, 0, 52, 29, 29, 53, 8, 47,
676 48, 49, 50, 47, 52, 7, 49, 50, 52, 52,
677 20, 53, 53, 23, 24, 25, 52, 27, 26, 53,
678 53, 44, 45, 46, 47, 48, 49, 50, 36, 52,
679 70, 71, 72, 53, -1, 74, -1, 47, 48, 49,
680 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
681 60, 61, 62, 63, 64, 65, 66, 67, 3, 4,
682 5, 6, 7, -1, 9, 10, -1, 77, -1, -1,
683 80, 42, 43, 44, 45, 46, 47, 48, 49, 50,
684 25, 52, 27, -1, 45, 46, 47, 48, 49, 50,
685 35, 52, -1, -1, 104, -1, -1, -1, -1, -1,
686 -1, 46, 47, 113, -1, -1, 116, 52, -1, 54,
687 55, -1, -1, 121, 124, 125, 3, 4, 5, 6,
688 7, 8, 9, 10, -1, 12, 13, 14, 15, 16,
689 17, 18, 19, 20, 21, 22, -1, -1, 25, 26,
690 27, -1, -1, -1, -1, -1, -1, -1, 35, 3,
691 4, 5, 6, 7, -1, 9, 10, -1, -1, 46,
692 47, -1, -1, -1, -1, 52, -1, 54, -1, -1,
693 -1, 25, -1, 27, -1, -1, -1, -1, -1, -1,
694 -1, 35, 3, 4, 5, 6, 7, -1, 9, 10,
695 -1, -1, 46, 47, -1, -1, -1, -1, 52, -1,
696 54, -1, -1, -1, 25, -1, 27, -1, -1, -1,
697 -1, -1, -1, -1, 35, 3, 4, 5, 6, 7,
698 -1, 9, 10, -1, -1, 46, 47, -1, -1, -1,
699 -1, 52, -1, 54, -1, -1, 8, 25, -1, 27,
700 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
701 22, -1, -1, -1, 26, -1, -1, -1, -1, -1,
702 -1, -1, -1, 35, 52, -1, 54, -1, -1, -1,
703 -1, -1, -1, -1, -1, 47, -1, -1, 8, -1,
704 52, 53, 12, 13, 14, 15, 16, 17, 18, 19,
705 20, 21, 22, 8, -1, -1, 26, 12, 13, 14,
706 15, 16, 17, 18, 19, 20, 21, 22, -1, -1,
707 -1, 26, -1, -1, 23, 24, -1, -1, -1, 28,
708 -1, -1, 31, 53, 33, 34, 35, 36, 37, 38,
709 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
710 49, 50, -1, 52, 23, 24, 55, -1, -1, 28,
711 29, -1, 31, -1, 33, 34, 35, 36, 37, 38,
712 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
713 49, 50, -1, 52, 53, 23, 24, -1, -1, -1,
714 28, -1, -1, 31, -1, 33, 34, 35, 36, 37,
715 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
716 48, 49, 50, 23, 52, -1, -1, -1, -1, -1,
717 -1, -1, -1, 33, 34, 35, 36, 37, 38, 39,
718 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
719 50, -1, 52, 33, 34, 35, 36, 37, 38, 39,
720 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
721 50, -1, 52, 34, 35, 36, 37, 38, 39, 40,
722 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
723 -1, 52, 35, 36, 37, 38, 39, 40, 41, 42,
724 43, 44, 45, 46, 47, 48, 49, 50, -1, 52,
725 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
726 46, 47, 48, 49, 50, -1, 52, 38, 39, 40,
727 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
731 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
732 symbol of state STATE-NUM. */
733 static const unsigned char yystos
[] =
735 0, 3, 4, 5, 6, 7, 8, 9, 10, 12,
736 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
737 25, 26, 27, 35, 46, 47, 52, 54, 57, 58,
738 59, 64, 65, 66, 70, 73, 52, 59, 59, 59,
739 59, 59, 59, 63, 65, 59, 0, 23, 24, 28,
740 31, 33, 34, 35, 36, 37, 38, 39, 40, 41,
741 42, 43, 44, 45, 46, 47, 48, 49, 50, 52,
742 35, 47, 52, 67, 68, 69, 65, 29, 53, 53,
743 53, 59, 59, 59, 59, 59, 59, 59, 59, 59,
744 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
745 59, 59, 7, 72, 60, 67, 67, 53, 65, 67,
746 71, 52, 69, 53, 59, 59, 55, 59, 61, 62,
747 53, 29, 53, 59, 55, 29, 53, 65, 59, 59
750 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
751 # define YYSIZE_T __SIZE_TYPE__
753 #if ! defined (YYSIZE_T) && defined (size_t)
754 # define YYSIZE_T size_t
756 #if ! defined (YYSIZE_T)
757 # if defined (__STDC__) || defined (__cplusplus)
758 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
759 # define YYSIZE_T size_t
762 #if ! defined (YYSIZE_T)
763 # define YYSIZE_T unsigned int
766 #define yyerrok (yyerrstatus = 0)
767 #define yyclearin (yychar = YYEMPTY)
771 #define YYACCEPT goto yyacceptlab
772 #define YYABORT goto yyabortlab
773 #define YYERROR goto yyerrorlab
776 /* Like YYERROR except do call yyerror. This remains here temporarily
777 to ease the transition to the new meaning of YYERROR, for GCC.
778 Once GCC version 2 has supplanted version 1, this can go. */
780 #define YYFAIL goto yyerrlab
782 #define YYRECOVERING() (!!yyerrstatus)
784 #define YYBACKUP(Token, Value) \
786 if (yychar == YYEMPTY && yylen == 1) \
790 yytoken = YYTRANSLATE (yychar); \
796 yyerror ("syntax error: cannot back up");\
802 #define YYERRCODE 256
804 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
807 #ifndef YYLLOC_DEFAULT
808 # define YYLLOC_DEFAULT(Current, Rhs, N) \
809 ((Current).first_line = (Rhs)[1].first_line, \
810 (Current).first_column = (Rhs)[1].first_column, \
811 (Current).last_line = (Rhs)[N].last_line, \
812 (Current).last_column = (Rhs)[N].last_column)
815 /* YYLEX -- calling `yylex' with the right arguments. */
818 # define YYLEX yylex (YYLEX_PARAM)
820 # define YYLEX yylex ()
823 /* Enable debugging if requested. */
827 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
828 # define YYFPRINTF fprintf
831 # define YYDPRINTF(Args) \
837 # define YYDSYMPRINT(Args) \
843 # define YYDSYMPRINTF(Title, Token, Value, Location) \
847 YYFPRINTF (stderr, "%s ", Title); \
848 yysymprint (stderr, \
850 YYFPRINTF (stderr, "\n"); \
854 /*------------------------------------------------------------------.
855 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
857 `------------------------------------------------------------------*/
859 #if defined (__STDC__) || defined (__cplusplus)
861 yy_stack_print (short *bottom
, short *top
)
864 yy_stack_print (bottom
, top
)
869 YYFPRINTF (stderr
, "Stack now");
870 for (/* Nothing. */; bottom
<= top
; ++bottom
)
871 YYFPRINTF (stderr
, " %d", *bottom
);
872 YYFPRINTF (stderr
, "\n");
875 # define YY_STACK_PRINT(Bottom, Top) \
878 yy_stack_print ((Bottom), (Top)); \
882 /*------------------------------------------------.
883 | Report that the YYRULE is going to be reduced. |
884 `------------------------------------------------*/
886 #if defined (__STDC__) || defined (__cplusplus)
888 yy_reduce_print (int yyrule
)
891 yy_reduce_print (yyrule
)
896 unsigned int yylno
= yyrline
[yyrule
];
897 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %u), ",
899 /* Print the symbols being reduced, and their result. */
900 for (yyi
= yyprhs
[yyrule
]; 0 <= yyrhs
[yyi
]; yyi
++)
901 YYFPRINTF (stderr
, "%s ", yytname
[yyrhs
[yyi
]]);
902 YYFPRINTF (stderr
, "-> %s\n", yytname
[yyr1
[yyrule
]]);
905 # define YY_REDUCE_PRINT(Rule) \
908 yy_reduce_print (Rule); \
911 /* Nonzero means print parse trace. It is left uninitialized so that
912 multiple parsers can coexist. */
915 # define YYDPRINTF(Args)
916 # define YYDSYMPRINT(Args)
917 # define YYDSYMPRINTF(Title, Token, Value, Location)
918 # define YY_STACK_PRINT(Bottom, Top)
919 # define YY_REDUCE_PRINT(Rule)
920 #endif /* !YYDEBUG */
923 /* YYINITDEPTH -- initial size of the parser's stacks. */
925 # define YYINITDEPTH 200
928 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
929 if the built-in stack extension method is used).
931 Do not make this value too large; the results are undefined if
932 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
933 evaluated with infinite-precision integer arithmetic. */
935 #if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
940 # define YYMAXDEPTH 10000
948 # if defined (__GLIBC__) && defined (_STRING_H)
949 # define yystrlen strlen
951 /* Return the length of YYSTR. */
953 # if defined (__STDC__) || defined (__cplusplus)
954 yystrlen (const char *yystr
)
960 register const char *yys
= yystr
;
962 while (*yys
++ != '\0')
965 return yys
- yystr
- 1;
971 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
972 # define yystpcpy stpcpy
974 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
977 # if defined (__STDC__) || defined (__cplusplus)
978 yystpcpy (char *yydest
, const char *yysrc
)
980 yystpcpy (yydest
, yysrc
)
985 register char *yyd
= yydest
;
986 register const char *yys
= yysrc
;
988 while ((*yyd
++ = *yys
++) != '\0')
996 #endif /* !YYERROR_VERBOSE */
1001 /*--------------------------------.
1002 | Print this symbol on YYOUTPUT. |
1003 `--------------------------------*/
1005 #if defined (__STDC__) || defined (__cplusplus)
1007 yysymprint (FILE *yyoutput
, int yytype
, YYSTYPE
*yyvaluep
)
1010 yysymprint (yyoutput
, yytype
, yyvaluep
)
1016 /* Pacify ``unused variable'' warnings. */
1019 if (yytype
< YYNTOKENS
)
1021 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1023 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1027 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1034 YYFPRINTF (yyoutput
, ")");
1037 #endif /* ! YYDEBUG */
1038 /*-----------------------------------------------.
1039 | Release the memory associated to this symbol. |
1040 `-----------------------------------------------*/
1042 #if defined (__STDC__) || defined (__cplusplus)
1044 yydestruct (int yytype
, YYSTYPE
*yyvaluep
)
1047 yydestruct (yytype
, yyvaluep
)
1052 /* Pacify ``unused variable'' warnings. */
1064 /* Prevent warnings from -Wmissing-prototypes. */
1066 #ifdef YYPARSE_PARAM
1067 # if defined (__STDC__) || defined (__cplusplus)
1068 int yyparse (void *YYPARSE_PARAM
);
1072 #else /* ! YYPARSE_PARAM */
1073 #if defined (__STDC__) || defined (__cplusplus)
1078 #endif /* ! YYPARSE_PARAM */
1082 /* The lookahead symbol. */
1085 /* The semantic value of the lookahead symbol. */
1088 /* Number of syntax errors so far. */
1097 #ifdef YYPARSE_PARAM
1098 # if defined (__STDC__) || defined (__cplusplus)
1099 int yyparse (void *YYPARSE_PARAM
)
1101 int yyparse (YYPARSE_PARAM
)
1102 void *YYPARSE_PARAM
;
1104 #else /* ! YYPARSE_PARAM */
1105 #if defined (__STDC__) || defined (__cplusplus)
1116 register int yystate
;
1119 /* Number of tokens to shift before error messages enabled. */
1121 /* Lookahead token as an internal (translated) token number. */
1124 /* Three stacks and their tools:
1125 `yyss': related to states,
1126 `yyvs': related to semantic values,
1127 `yyls': related to locations.
1129 Refer to the stacks thru separate pointers, to allow yyoverflow
1130 to xreallocate them elsewhere. */
1132 /* The state stack. */
1133 short yyssa
[YYINITDEPTH
];
1134 short *yyss
= yyssa
;
1135 register short *yyssp
;
1137 /* The semantic value stack. */
1138 YYSTYPE yyvsa
[YYINITDEPTH
];
1139 YYSTYPE
*yyvs
= yyvsa
;
1140 register YYSTYPE
*yyvsp
;
1144 #define YYPOPSTACK (yyvsp--, yyssp--)
1146 YYSIZE_T yystacksize
= YYINITDEPTH
;
1148 /* The variables used to return semantic value and location from the
1153 /* When reducing, the number of symbols on the RHS of the reduced
1157 YYDPRINTF ((stderr
, "Starting parse\n"));
1162 yychar
= YYEMPTY
; /* Cause a token to be read. */
1164 /* Initialize stack pointers.
1165 Waste one element of value and location stack
1166 so that they stay on the same level as the state stack.
1167 The wasted elements are never initialized. */
1174 /*------------------------------------------------------------.
1175 | yynewstate -- Push a new state, which is found in yystate. |
1176 `------------------------------------------------------------*/
1178 /* In all cases, when you get here, the value and location stacks
1179 have just been pushed. so pushing a state here evens the stacks.
1186 if (yyss
+ yystacksize
- 1 <= yyssp
)
1188 /* Get the current used size of the three stacks, in elements. */
1189 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
1193 /* Give user a chance to xreallocate the stack. Use copies of
1194 these so that the &'s don't force the real ones into
1196 YYSTYPE
*yyvs1
= yyvs
;
1197 short *yyss1
= yyss
;
1200 /* Each stack pointer address is followed by the size of the
1201 data in use in that stack, in bytes. This used to be a
1202 conditional around just the two extra args, but that might
1203 be undefined if yyoverflow is a macro. */
1204 yyoverflow ("parser stack overflow",
1205 &yyss1
, yysize
* sizeof (*yyssp
),
1206 &yyvs1
, yysize
* sizeof (*yyvsp
),
1213 #else /* no yyoverflow */
1214 # ifndef YYSTACK_RELOCATE
1217 /* Extend the stack our own way. */
1218 if (YYMAXDEPTH
<= yystacksize
)
1221 if (YYMAXDEPTH
< yystacksize
)
1222 yystacksize
= YYMAXDEPTH
;
1225 short *yyss1
= yyss
;
1226 union yyalloc
*yyptr
=
1227 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
1230 YYSTACK_RELOCATE (yyss
);
1231 YYSTACK_RELOCATE (yyvs
);
1233 # undef YYSTACK_RELOCATE
1235 YYSTACK_FREE (yyss1
);
1238 #endif /* no yyoverflow */
1240 yyssp
= yyss
+ yysize
- 1;
1241 yyvsp
= yyvs
+ yysize
- 1;
1244 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
1245 (unsigned long int) yystacksize
));
1247 if (yyss
+ yystacksize
- 1 <= yyssp
)
1251 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
1260 /* Do appropriate processing given the current state. */
1261 /* Read a lookahead token if we need one and don't already have one. */
1264 /* First try to decide what to do without reference to lookahead token. */
1266 yyn
= yypact
[yystate
];
1267 if (yyn
== YYPACT_NINF
)
1270 /* Not known => get a lookahead token if don't already have one. */
1272 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1273 if (yychar
== YYEMPTY
)
1275 YYDPRINTF ((stderr
, "Reading a token: "));
1279 if (yychar
<= YYEOF
)
1281 yychar
= yytoken
= YYEOF
;
1282 YYDPRINTF ((stderr
, "Now at end of input.\n"));
1286 yytoken
= YYTRANSLATE (yychar
);
1287 YYDSYMPRINTF ("Next token is", yytoken
, &yylval
, &yylloc
);
1290 /* If the proper action on seeing token YYTOKEN is to reduce or to
1291 detect an error, take that action. */
1293 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
1298 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
1307 /* Shift the lookahead token. */
1308 YYDPRINTF ((stderr
, "Shifting token %s, ", yytname
[yytoken
]));
1310 /* Discard the token being shifted unless it is eof. */
1311 if (yychar
!= YYEOF
)
1317 /* Count tokens shifted since error; after three, turn off error
1326 /*-----------------------------------------------------------.
1327 | yydefault -- do the default action for the current state. |
1328 `-----------------------------------------------------------*/
1330 yyn
= yydefact
[yystate
];
1336 /*-----------------------------.
1337 | yyreduce -- Do a reduction. |
1338 `-----------------------------*/
1340 /* yyn is the number of a rule to reduce with. */
1343 /* If YYLEN is nonzero, implement the default value of the action:
1346 Otherwise, the following line sets YYVAL to garbage.
1347 This behavior is undocumented and Bison
1348 users should not rely upon it. Assigning to YYVAL
1349 unconditionally makes the parser a bit smaller, and it avoids a
1350 GCC warning that YYVAL may be used uninitialized. */
1351 yyval
= yyvsp
[1-yylen
];
1354 YY_REDUCE_PRINT (yyn
);
1359 { write_exp_elt_opcode(OP_TYPE
);
1360 write_exp_elt_type(yyvsp
[0].tval
);
1361 write_exp_elt_opcode(OP_TYPE
); }
1371 { write_exp_elt_opcode (UNOP_IND
); }
1376 { write_exp_elt_opcode (UNOP_ADDR
); }
1381 { write_exp_elt_opcode (UNOP_NEG
); }
1386 { write_exp_elt_opcode (UNOP_LOGICAL_NOT
); }
1391 { write_exp_elt_opcode (UNOP_COMPLEMENT
); }
1396 { write_exp_elt_opcode (UNOP_SIZEOF
); }
1401 { start_arglist (); }
1406 { write_exp_elt_opcode (OP_F77_UNDETERMINED_ARGLIST
);
1407 write_exp_elt_longcst ((LONGEST
) end_arglist ());
1408 write_exp_elt_opcode (OP_F77_UNDETERMINED_ARGLIST
); }
1413 { arglist_len
= 1; }
1418 { arglist_len
= 1; }
1428 { write_exp_elt_opcode (OP_F90_RANGE
);
1429 write_exp_elt_longcst (NONE_BOUND_DEFAULT
);
1430 write_exp_elt_opcode (OP_F90_RANGE
); }
1435 { write_exp_elt_opcode (OP_F90_RANGE
);
1436 write_exp_elt_longcst (HIGH_BOUND_DEFAULT
);
1437 write_exp_elt_opcode (OP_F90_RANGE
); }
1442 { write_exp_elt_opcode (OP_F90_RANGE
);
1443 write_exp_elt_longcst (LOW_BOUND_DEFAULT
);
1444 write_exp_elt_opcode (OP_F90_RANGE
); }
1449 { write_exp_elt_opcode (OP_F90_RANGE
);
1450 write_exp_elt_longcst (BOTH_BOUND_DEFAULT
);
1451 write_exp_elt_opcode (OP_F90_RANGE
); }
1461 { write_exp_elt_opcode(OP_COMPLEX
); }
1466 { write_exp_elt_opcode (UNOP_CAST
);
1467 write_exp_elt_type (yyvsp
[-2].tval
);
1468 write_exp_elt_opcode (UNOP_CAST
); }
1473 { write_exp_elt_opcode (STRUCTOP_STRUCT
);
1474 write_exp_string (yyvsp
[0].sval
);
1475 write_exp_elt_opcode (STRUCTOP_STRUCT
); }
1480 { write_exp_elt_opcode (BINOP_REPEAT
); }
1485 { write_exp_elt_opcode (BINOP_EXP
); }
1490 { write_exp_elt_opcode (BINOP_MUL
); }
1495 { write_exp_elt_opcode (BINOP_DIV
); }
1500 { write_exp_elt_opcode (BINOP_ADD
); }
1505 { write_exp_elt_opcode (BINOP_SUB
); }
1510 { write_exp_elt_opcode (BINOP_LSH
); }
1515 { write_exp_elt_opcode (BINOP_RSH
); }
1520 { write_exp_elt_opcode (BINOP_EQUAL
); }
1525 { write_exp_elt_opcode (BINOP_NOTEQUAL
); }
1530 { write_exp_elt_opcode (BINOP_LEQ
); }
1535 { write_exp_elt_opcode (BINOP_GEQ
); }
1540 { write_exp_elt_opcode (BINOP_LESS
); }
1545 { write_exp_elt_opcode (BINOP_GTR
); }
1550 { write_exp_elt_opcode (BINOP_BITWISE_AND
); }
1555 { write_exp_elt_opcode (BINOP_BITWISE_XOR
); }
1560 { write_exp_elt_opcode (BINOP_BITWISE_IOR
); }
1565 { write_exp_elt_opcode (BINOP_LOGICAL_AND
); }
1570 { write_exp_elt_opcode (BINOP_LOGICAL_OR
); }
1575 { write_exp_elt_opcode (BINOP_ASSIGN
); }
1580 { write_exp_elt_opcode (BINOP_ASSIGN_MODIFY
);
1581 write_exp_elt_opcode (yyvsp
[-1].opcode
);
1582 write_exp_elt_opcode (BINOP_ASSIGN_MODIFY
); }
1587 { write_exp_elt_opcode (OP_LONG
);
1588 write_exp_elt_type (yyvsp
[0].typed_val
.type
);
1589 write_exp_elt_longcst ((LONGEST
)(yyvsp
[0].typed_val
.val
));
1590 write_exp_elt_opcode (OP_LONG
); }
1596 parse_number (yyvsp
[0].ssym
.stoken
.ptr
, yyvsp
[0].ssym
.stoken
.length
, 0, &val
);
1597 write_exp_elt_opcode (OP_LONG
);
1598 write_exp_elt_type (val
.typed_val
.type
);
1599 write_exp_elt_longcst ((LONGEST
)val
.typed_val
.val
);
1600 write_exp_elt_opcode (OP_LONG
); }
1605 { write_exp_elt_opcode (OP_DOUBLE
);
1606 write_exp_elt_type (builtin_type_f_real_s8
);
1607 write_exp_elt_dblcst (yyvsp
[0].dval
);
1608 write_exp_elt_opcode (OP_DOUBLE
); }
1613 { write_exp_elt_opcode (OP_LONG
);
1614 write_exp_elt_type (builtin_type_f_integer
);
1615 CHECK_TYPEDEF (yyvsp
[-1].tval
);
1616 write_exp_elt_longcst ((LONGEST
) TYPE_LENGTH (yyvsp
[-1].tval
));
1617 write_exp_elt_opcode (OP_LONG
); }
1622 { write_exp_elt_opcode (OP_BOOL
);
1623 write_exp_elt_longcst ((LONGEST
) yyvsp
[0].lval
);
1624 write_exp_elt_opcode (OP_BOOL
);
1631 write_exp_elt_opcode (OP_STRING
);
1632 write_exp_string (yyvsp
[0].sval
);
1633 write_exp_elt_opcode (OP_STRING
);
1639 { struct symbol
*sym
= yyvsp
[0].ssym
.sym
;
1643 if (symbol_read_needs_frame (sym
))
1645 if (innermost_block
== 0 ||
1646 contained_in (block_found
,
1648 innermost_block
= block_found
;
1650 write_exp_elt_opcode (OP_VAR_VALUE
);
1651 /* We want to use the selected frame, not
1652 another more inner frame which happens to
1653 be in the same block. */
1654 write_exp_elt_block (NULL
);
1655 write_exp_elt_sym (sym
);
1656 write_exp_elt_opcode (OP_VAR_VALUE
);
1661 struct minimal_symbol
*msymbol
;
1662 char *arg
= copy_name (yyvsp
[0].ssym
.stoken
);
1665 lookup_minimal_symbol (arg
, NULL
, NULL
);
1666 if (msymbol
!= NULL
)
1668 write_exp_msymbol (msymbol
,
1669 lookup_function_type (builtin_type_int
),
1672 else if (!have_full_symbols () && !have_partial_symbols ())
1673 error ("No symbol table is loaded. Use the \"file\" command.");
1675 error ("No symbol \"%s\" in current context.",
1676 copy_name (yyvsp
[0].ssym
.stoken
));
1684 /* This is where the interesting stuff happens. */
1687 struct type
*follow_type
= yyvsp
[-1].tval
;
1688 struct type
*range_type
;
1691 switch (pop_type ())
1697 follow_type
= lookup_pointer_type (follow_type
);
1700 follow_type
= lookup_reference_type (follow_type
);
1703 array_size
= pop_type_int ();
1704 if (array_size
!= -1)
1707 create_range_type ((struct type
*) NULL
,
1708 builtin_type_f_integer
, 0,
1711 create_array_type ((struct type
*) NULL
,
1712 follow_type
, range_type
);
1715 follow_type
= lookup_pointer_type (follow_type
);
1718 follow_type
= lookup_function_type (follow_type
);
1721 yyval
.tval
= follow_type
;
1727 { push_type (tp_pointer
); yyval
.voidval
= 0; }
1732 { push_type (tp_pointer
); yyval
.voidval
= yyvsp
[0].voidval
; }
1737 { push_type (tp_reference
); yyval
.voidval
= 0; }
1742 { push_type (tp_reference
); yyval
.voidval
= yyvsp
[0].voidval
; }
1747 { yyval
.voidval
= yyvsp
[-1].voidval
; }
1752 { push_type (tp_function
); }
1757 { push_type (tp_function
); }
1762 { yyval
.voidval
= 0; }
1767 { free (yyvsp
[-1].tvec
); yyval
.voidval
= 0; }
1772 { yyval
.tval
= yyvsp
[0].tsym
.type
; }
1777 { yyval
.tval
= builtin_type_f_integer
; }
1782 { yyval
.tval
= builtin_type_f_integer_s2
; }
1787 { yyval
.tval
= builtin_type_f_character
; }
1792 { yyval
.tval
= builtin_type_f_logical
;}
1797 { yyval
.tval
= builtin_type_f_logical_s2
;}
1802 { yyval
.tval
= builtin_type_f_logical_s1
;}
1807 { yyval
.tval
= builtin_type_f_real
;}
1812 { yyval
.tval
= builtin_type_f_real_s8
;}
1817 { yyval
.tval
= builtin_type_f_real_s16
;}
1822 { yyval
.tval
= builtin_type_f_complex_s8
;}
1827 { yyval
.tval
= builtin_type_f_complex_s16
;}
1832 { yyval
.tval
= builtin_type_f_complex_s32
;}
1837 { yyval
.tvec
= (struct type
**) xmalloc (sizeof (struct type
*) * 2);
1838 yyval
.ivec
[0] = 1; /* Number of types in vector */
1839 yyval
.tvec
[1] = yyvsp
[0].tval
;
1845 { int len
= sizeof (struct type
*) * (++(yyvsp
[-2].ivec
[0]) + 1);
1846 yyval
.tvec
= (struct type
**) xrealloc ((char *) yyvsp
[-2].tvec
, len
);
1847 yyval
.tvec
[yyval
.ivec
[0]] = yyvsp
[0].tval
;
1853 { yyval
.sval
= yyvsp
[0].ssym
.stoken
; }
1859 /* Line 1000 of yacc.c. */
1860 #line 1861 "f-exp.c.tmp"
1866 YY_STACK_PRINT (yyss
, yyssp
);
1871 /* Now `shift' the result of the reduction. Determine what state
1872 that goes to, based on the state we popped back to and the rule
1873 number reduced by. */
1877 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
1878 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
1879 yystate
= yytable
[yystate
];
1881 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
1886 /*------------------------------------.
1887 | yyerrlab -- here on detecting error |
1888 `------------------------------------*/
1890 /* If not already recovering from an error, report this error. */
1895 yyn
= yypact
[yystate
];
1897 if (YYPACT_NINF
< yyn
&& yyn
< YYLAST
)
1899 YYSIZE_T yysize
= 0;
1900 int yytype
= YYTRANSLATE (yychar
);
1901 const char* yyprefix
;
1905 /* Start YYX at -YYN if negative to avoid negative indexes in
1907 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1909 /* Stay within bounds of both yycheck and yytname. */
1910 int yychecklim
= YYLAST
- yyn
;
1911 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1914 yyprefix
= ", expecting ";
1915 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1916 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1918 yysize
+= yystrlen (yyprefix
) + yystrlen (yytname
[yyx
]);
1926 yysize
+= (sizeof ("syntax error, unexpected ")
1927 + yystrlen (yytname
[yytype
]));
1928 yymsg
= (char *) YYSTACK_ALLOC (yysize
);
1931 char *yyp
= yystpcpy (yymsg
, "syntax error, unexpected ");
1932 yyp
= yystpcpy (yyp
, yytname
[yytype
]);
1936 yyprefix
= ", expecting ";
1937 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1938 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1940 yyp
= yystpcpy (yyp
, yyprefix
);
1941 yyp
= yystpcpy (yyp
, yytname
[yyx
]);
1946 YYSTACK_FREE (yymsg
);
1949 yyerror ("syntax error; also virtual memory exhausted");
1952 #endif /* YYERROR_VERBOSE */
1953 yyerror ("syntax error");
1958 if (yyerrstatus
== 3)
1960 /* If just tried and failed to reuse lookahead token after an
1961 error, discard it. */
1963 if (yychar
<= YYEOF
)
1965 /* If at end of input, pop the error token,
1966 then the rest of the stack, then return failure. */
1967 if (yychar
== YYEOF
)
1973 YYDSYMPRINTF ("Error: popping", yystos
[*yyssp
], yyvsp
, yylsp
);
1974 yydestruct (yystos
[*yyssp
], yyvsp
);
1979 YYDSYMPRINTF ("Error: discarding", yytoken
, &yylval
, &yylloc
);
1980 yydestruct (yytoken
, &yylval
);
1986 /* Else will try to reuse lookahead token after shifting the error
1991 /*---------------------------------------------------.
1992 | yyerrorlab -- error raised explicitly by YYERROR. |
1993 `---------------------------------------------------*/
1997 /* Pacify GCC when the user code never invokes YYERROR and the label
1998 yyerrorlab therefore never appears in user code. */
2009 /*-------------------------------------------------------------.
2010 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2011 `-------------------------------------------------------------*/
2013 yyerrstatus
= 3; /* Each real token shifted decrements this. */
2017 yyn
= yypact
[yystate
];
2018 if (yyn
!= YYPACT_NINF
)
2021 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
2029 /* Pop the current state because it cannot handle the error token. */
2033 YYDSYMPRINTF ("Error: popping", yystos
[*yyssp
], yyvsp
, yylsp
);
2034 yydestruct (yystos
[yystate
], yyvsp
);
2037 YY_STACK_PRINT (yyss
, yyssp
);
2043 YYDPRINTF ((stderr
, "Shifting error token, "));
2052 /*-------------------------------------.
2053 | yyacceptlab -- YYACCEPT comes here. |
2054 `-------------------------------------*/
2059 /*-----------------------------------.
2060 | yyabortlab -- YYABORT comes here. |
2061 `-----------------------------------*/
2067 /*----------------------------------------------.
2068 | yyoverflowlab -- parser overflow comes here. |
2069 `----------------------------------------------*/
2071 yyerror ("parser stack overflow");
2079 YYSTACK_FREE (yyss
);
2088 /* Take care of parsing a number (anything that starts with a digit).
2089 Set yylval and return the token type; update lexptr.
2090 LEN is the number of characters in it. */
2092 /*** Needs some error checking for the float case ***/
2095 parse_number (p
, len
, parsed_float
, putithere
)
2104 int base
= input_radix
;
2108 struct type
*signed_type
;
2109 struct type
*unsigned_type
;
2113 /* It's a float since it contains a point or an exponent. */
2114 /* [dD] is not understood as an exponent by atof, change it to 'e'. */
2118 for (tmp2
= tmp
; *tmp2
; ++tmp2
)
2119 if (*tmp2
== 'd' || *tmp2
== 'D')
2121 putithere
->dval
= atof (tmp
);
2126 /* Handle base-switching prefixes 0x, 0t, 0d, 0 */
2162 if (len
== 0 && c
== 'l')
2164 else if (len
== 0 && c
== 'u')
2169 if (c
>= '0' && c
<= '9')
2171 else if (c
>= 'a' && c
<= 'f')
2174 return ERROR
; /* Char not a digit */
2176 return ERROR
; /* Invalid digit in this base */
2180 /* Portably test for overflow (only works for nonzero values, so make
2181 a second check for zero). */
2182 if ((prevn
>= n
) && n
!= 0)
2183 unsigned_p
=1; /* Try something unsigned */
2184 /* If range checking enabled, portably test for unsigned overflow. */
2185 if (RANGE_CHECK
&& n
!= 0)
2187 if ((unsigned_p
&& (unsigned)prevn
>= (unsigned)n
))
2188 range_error("Overflow on numeric constant.");
2193 /* If the number is too big to be an int, or it's got an l suffix
2194 then it's a long. Work out if this has to be a long by
2195 shifting right and and seeing if anything remains, and the
2196 target int size is different to the target long size.
2198 In the expression below, we could have tested
2199 (n >> TARGET_INT_BIT)
2200 to see if it was zero,
2201 but too many compilers warn about that, when ints and longs
2202 are the same size. So we shift it twice, with fewer bits
2203 each time, for the same result. */
2205 if ((TARGET_INT_BIT
!= TARGET_LONG_BIT
2206 && ((n
>> 2) >> (TARGET_INT_BIT
-2))) /* Avoid shift warning */
2209 high_bit
= ((ULONGEST
)1) << (TARGET_LONG_BIT
-1);
2210 unsigned_type
= builtin_type_unsigned_long
;
2211 signed_type
= builtin_type_long
;
2215 high_bit
= ((ULONGEST
)1) << (TARGET_INT_BIT
-1);
2216 unsigned_type
= builtin_type_unsigned_int
;
2217 signed_type
= builtin_type_int
;
2220 putithere
->typed_val
.val
= n
;
2222 /* If the high bit of the worked out type is set then this number
2223 has to be unsigned. */
2225 if (unsigned_p
|| (n
& high_bit
))
2226 putithere
->typed_val
.type
= unsigned_type
;
2228 putithere
->typed_val
.type
= signed_type
;
2237 enum exp_opcode opcode
;
2240 static const struct token dot_ops
[] =
2242 { ".and.", BOOL_AND
, BINOP_END
},
2243 { ".AND.", BOOL_AND
, BINOP_END
},
2244 { ".or.", BOOL_OR
, BINOP_END
},
2245 { ".OR.", BOOL_OR
, BINOP_END
},
2246 { ".not.", BOOL_NOT
, BINOP_END
},
2247 { ".NOT.", BOOL_NOT
, BINOP_END
},
2248 { ".eq.", EQUAL
, BINOP_END
},
2249 { ".EQ.", EQUAL
, BINOP_END
},
2250 { ".eqv.", EQUAL
, BINOP_END
},
2251 { ".NEQV.", NOTEQUAL
, BINOP_END
},
2252 { ".neqv.", NOTEQUAL
, BINOP_END
},
2253 { ".EQV.", EQUAL
, BINOP_END
},
2254 { ".ne.", NOTEQUAL
, BINOP_END
},
2255 { ".NE.", NOTEQUAL
, BINOP_END
},
2256 { ".le.", LEQ
, BINOP_END
},
2257 { ".LE.", LEQ
, BINOP_END
},
2258 { ".ge.", GEQ
, BINOP_END
},
2259 { ".GE.", GEQ
, BINOP_END
},
2260 { ".gt.", GREATERTHAN
, BINOP_END
},
2261 { ".GT.", GREATERTHAN
, BINOP_END
},
2262 { ".lt.", LESSTHAN
, BINOP_END
},
2263 { ".LT.", LESSTHAN
, BINOP_END
},
2267 struct f77_boolean_val
2273 static const struct f77_boolean_val boolean_values
[] =
2282 static const struct token f77_keywords
[] =
2284 { "complex_16", COMPLEX_S16_KEYWORD
, BINOP_END
},
2285 { "complex_32", COMPLEX_S32_KEYWORD
, BINOP_END
},
2286 { "character", CHARACTER
, BINOP_END
},
2287 { "integer_2", INT_S2_KEYWORD
, BINOP_END
},
2288 { "logical_1", LOGICAL_S1_KEYWORD
, BINOP_END
},
2289 { "logical_2", LOGICAL_S2_KEYWORD
, BINOP_END
},
2290 { "complex_8", COMPLEX_S8_KEYWORD
, BINOP_END
},
2291 { "integer", INT_KEYWORD
, BINOP_END
},
2292 { "logical", LOGICAL_KEYWORD
, BINOP_END
},
2293 { "real_16", REAL_S16_KEYWORD
, BINOP_END
},
2294 { "complex", COMPLEX_S8_KEYWORD
, BINOP_END
},
2295 { "sizeof", SIZEOF
, BINOP_END
},
2296 { "real_8", REAL_S8_KEYWORD
, BINOP_END
},
2297 { "real", REAL_KEYWORD
, BINOP_END
},
2301 /* Implementation of a dynamically expandable buffer for processing input
2302 characters acquired through lexptr and building a value to return in
2303 yylval. Ripped off from ch-exp.y */
2305 static char *tempbuf
; /* Current buffer contents */
2306 static int tempbufsize
; /* Size of allocated buffer */
2307 static int tempbufindex
; /* Current index into buffer */
2309 #define GROWBY_MIN_SIZE 64 /* Minimum amount to grow buffer by */
2311 #define CHECKBUF(size) \
2313 if (tempbufindex + (size) >= tempbufsize) \
2315 growbuf_by_size (size); \
2320 /* Grow the static temp buffer if necessary, including allocating the first one
2324 growbuf_by_size (count
)
2329 growby
= max (count
, GROWBY_MIN_SIZE
);
2330 tempbufsize
+= growby
;
2331 if (tempbuf
== NULL
)
2332 tempbuf
= (char *) xmalloc (tempbufsize
);
2334 tempbuf
= (char *) xrealloc (tempbuf
, tempbufsize
);
2337 /* Blatantly ripped off from ch-exp.y. This routine recognizes F77
2340 Recognize a string literal. A string literal is a nonzero sequence
2341 of characters enclosed in matching single quotes, except that
2342 a single character inside single quotes is a character literal, which
2343 we reject as a string literal. To embed the terminator character inside
2344 a string, it is simply doubled (I.E. 'this''is''one''string') */
2347 match_string_literal ()
2349 char *tokptr
= lexptr
;
2351 for (tempbufindex
= 0, tokptr
++; *tokptr
!= '\0'; tokptr
++)
2354 if (*tokptr
== *lexptr
)
2356 if (*(tokptr
+ 1) == *lexptr
)
2361 tempbuf
[tempbufindex
++] = *tokptr
;
2363 if (*tokptr
== '\0' /* no terminator */
2364 || tempbufindex
== 0) /* no string */
2368 tempbuf
[tempbufindex
] = '\0';
2369 yylval
.sval
.ptr
= tempbuf
;
2370 yylval
.sval
.length
= tempbufindex
;
2372 return STRING_LITERAL
;
2376 /* Read one token, getting characters through lexptr. */
2383 unsigned int i
,token
;
2388 prev_lexptr
= lexptr
;
2392 /* First of all, let us make sure we are not dealing with the
2393 special tokens .true. and .false. which evaluate to 1 and 0. */
2397 for (i
= 0; boolean_values
[i
].name
!= NULL
; i
++)
2399 if (strncmp (tokstart
, boolean_values
[i
].name
,
2400 strlen (boolean_values
[i
].name
)) == 0)
2402 lexptr
+= strlen (boolean_values
[i
].name
);
2403 yylval
.lval
= boolean_values
[i
].value
;
2404 return BOOLEAN_LITERAL
;
2409 /* See if it is a special .foo. operator. */
2411 for (i
= 0; dot_ops
[i
].operator != NULL
; i
++)
2412 if (strncmp (tokstart
, dot_ops
[i
].operator, strlen (dot_ops
[i
].operator)) == 0)
2414 lexptr
+= strlen (dot_ops
[i
].operator);
2415 yylval
.opcode
= dot_ops
[i
].opcode
;
2416 return dot_ops
[i
].token
;
2419 /* See if it is an exponentiation operator. */
2421 if (strncmp (tokstart
, "**", 2) == 0)
2424 yylval
.opcode
= BINOP_EXP
;
2428 switch (c
= *tokstart
)
2440 token
= match_string_literal ();
2451 if (paren_depth
== 0)
2458 if (comma_terminates
&& paren_depth
== 0)
2464 /* Might be a floating point number. */
2465 if (lexptr
[1] < '0' || lexptr
[1] > '9')
2466 goto symbol
; /* Nope, must be a symbol. */
2467 /* FALL THRU into number case. */
2480 /* It's a number. */
2481 int got_dot
= 0, got_e
= 0, got_d
= 0, toktype
;
2483 int hex
= input_radix
> 10;
2485 if (c
== '0' && (p
[1] == 'x' || p
[1] == 'X'))
2490 else if (c
== '0' && (p
[1]=='t' || p
[1]=='T' || p
[1]=='d' || p
[1]=='D'))
2498 if (!hex
&& !got_e
&& (*p
== 'e' || *p
== 'E'))
2499 got_dot
= got_e
= 1;
2500 else if (!hex
&& !got_d
&& (*p
== 'd' || *p
== 'D'))
2501 got_dot
= got_d
= 1;
2502 else if (!hex
&& !got_dot
&& *p
== '.')
2504 else if (((got_e
&& (p
[-1] == 'e' || p
[-1] == 'E'))
2505 || (got_d
&& (p
[-1] == 'd' || p
[-1] == 'D')))
2506 && (*p
== '-' || *p
== '+'))
2507 /* This is the sign of the exponent, not the end of the
2510 /* We will take any letters or digits. parse_number will
2511 complain if past the radix, or if L or U are not final. */
2512 else if ((*p
< '0' || *p
> '9')
2513 && ((*p
< 'a' || *p
> 'z')
2514 && (*p
< 'A' || *p
> 'Z')))
2517 toktype
= parse_number (tokstart
, p
- tokstart
, got_dot
|got_e
|got_d
,
2519 if (toktype
== ERROR
)
2521 char *err_copy
= (char *) alloca (p
- tokstart
+ 1);
2523 memcpy (err_copy
, tokstart
, p
- tokstart
);
2524 err_copy
[p
- tokstart
] = 0;
2525 error ("Invalid number \"%s\".", err_copy
);
2556 if (!(c
== '_' || c
== '$'
2557 || (c
>= 'a' && c
<= 'z') || (c
>= 'A' && c
<= 'Z')))
2558 /* We must have come across a bad character (e.g. ';'). */
2559 error ("Invalid character '%c' in expression.", c
);
2562 for (c
= tokstart
[namelen
];
2563 (c
== '_' || c
== '$' || (c
>= '0' && c
<= '9')
2564 || (c
>= 'a' && c
<= 'z') || (c
>= 'A' && c
<= 'Z'));
2565 c
= tokstart
[++namelen
]);
2567 /* The token "if" terminates the expression and is NOT
2568 removed from the input stream. */
2570 if (namelen
== 2 && tokstart
[0] == 'i' && tokstart
[1] == 'f')
2575 /* Catch specific keywords. */
2577 for (i
= 0; f77_keywords
[i
].operator != NULL
; i
++)
2578 if (strncmp (tokstart
, f77_keywords
[i
].operator,
2579 strlen(f77_keywords
[i
].operator)) == 0)
2581 /* lexptr += strlen(f77_keywords[i].operator); */
2582 yylval
.opcode
= f77_keywords
[i
].opcode
;
2583 return f77_keywords
[i
].token
;
2586 yylval
.sval
.ptr
= tokstart
;
2587 yylval
.sval
.length
= namelen
;
2589 if (*tokstart
== '$')
2591 write_dollar_variable (yylval
.sval
);
2595 /* Use token-type TYPENAME for symbols that happen to be defined
2596 currently as names of types; NAME for other symbols.
2597 The caller is not constrained to care about the distinction. */
2599 char *tmp
= copy_name (yylval
.sval
);
2601 int is_a_field_of_this
= 0;
2604 sym
= lookup_symbol (tmp
, expression_context_block
,
2606 current_language
->la_language
== language_cplus
2607 ? &is_a_field_of_this
: NULL
,
2609 if (sym
&& SYMBOL_CLASS (sym
) == LOC_TYPEDEF
)
2611 yylval
.tsym
.type
= SYMBOL_TYPE (sym
);
2615 = language_lookup_primitive_type_by_name (current_language
,
2616 current_gdbarch
, tmp
);
2617 if (yylval
.tsym
.type
!= NULL
)
2620 /* Input names that aren't symbols but ARE valid hex numbers,
2621 when the input radix permits them, can be names or numbers
2622 depending on the parse. Note we support radixes > 16 here. */
2624 && ((tokstart
[0] >= 'a' && tokstart
[0] < 'a' + input_radix
- 10)
2625 || (tokstart
[0] >= 'A' && tokstart
[0] < 'A' + input_radix
- 10)))
2627 YYSTYPE newlval
; /* Its value is ignored. */
2628 hextype
= parse_number (tokstart
, namelen
, 0, &newlval
);
2631 yylval
.ssym
.sym
= sym
;
2632 yylval
.ssym
.is_a_field_of_this
= is_a_field_of_this
;
2637 /* Any other kind of symbol */
2638 yylval
.ssym
.sym
= sym
;
2639 yylval
.ssym
.is_a_field_of_this
= is_a_field_of_this
;
2649 lexptr
= prev_lexptr
;
2651 error ("A %s in expression, near `%s'.", (msg
? msg
: "error"), lexptr
);