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
114 #define BLOCKNAME 268
125 #define FLOAT_FUNC 279
134 #define COLONCOLON 288
135 #define INTERNAL_VAR 289
136 #define ABOVE_COMMA 290
143 #define LOGICAL_AND 297
154 /* Copy the first part of user declarations. */
159 #include "gdb_string.h"
160 #include "expression.h"
161 #include "language.h"
163 #include "parser-defs.h"
165 #include "bfd.h" /* Required by objfiles.h. */
166 #include "symfile.h" /* Required by objfiles.h. */
167 #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
170 /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
171 as well as gratuitiously global symbol names, so we can have multiple
172 yacc generated parsers in gdb. Note that these are only the variables
173 produced by yacc. If other parser generators (bison, byacc, etc) produce
174 additional global names that conflict at link time, then those parser
175 generators need to be fixed instead of adding those names to this list. */
177 #define yymaxdepth m2_maxdepth
178 #define yyparse m2_parse
180 #define yyerror m2_error
181 #define yylval m2_lval
182 #define yychar m2_char
183 #define yydebug m2_debug
184 #define yypact m2_pact
191 #define yyexca m2_exca
192 #define yyerrflag m2_errflag
193 #define yynerrs m2_nerrs
197 #define yy_yys m2_yys
198 #define yystate m2_state
201 #define yy_yyv m2_yyv
203 #define yylloc m2_lloc
204 #define yyreds m2_reds /* With YYDEBUG defined */
205 #define yytoks m2_toks /* With YYDEBUG defined */
206 #define yyname m2_name /* With YYDEBUG defined */
207 #define yyrule m2_rule /* With YYDEBUG defined */
208 #define yylhs m2_yylhs
209 #define yylen m2_yylen
210 #define yydefred m2_yydefred
211 #define yydgoto m2_yydgoto
212 #define yysindex m2_yysindex
213 #define yyrindex m2_yyrindex
214 #define yygindex m2_yygindex
215 #define yytable m2_yytable
216 #define yycheck m2_yycheck
219 #define YYDEBUG 1 /* Default to yydebug support */
222 #define YYFPRINTF parser_fprintf
226 static int yylex (void);
228 void yyerror (char *);
231 static char *make_qualname (char *, char *);
234 static int parse_number (int);
236 /* The sign of the number being parsed. */
237 static int number_sign = 1;
239 /* The block that the module specified by the qualifer on an identifer is
242 static struct block *modblock=0;
247 /* Enabling traces. */
252 /* Enabling verbose error messages. */
253 #ifdef YYERROR_VERBOSE
254 # undef YYERROR_VERBOSE
255 # define YYERROR_VERBOSE 1
257 # define YYERROR_VERBOSE 0
260 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
262 typedef union YYSTYPE {
271 enum exp_opcode opcode;
272 struct internalvar *ivar;
277 /* Line 191 of yacc.c. */
278 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
279 # define YYSTYPE_IS_DECLARED 1
280 # define YYSTYPE_IS_TRIVIAL 1
285 /* Copy the second part of user declarations. */
288 /* Line 214 of yacc.c. */
290 #if ! defined (yyoverflow) || YYERROR_VERBOSE
292 /* The parser invokes alloca or xmalloc; define the necessary symbols. */
294 # if YYSTACK_USE_ALLOCA
295 # define YYSTACK_ALLOC alloca
297 # ifndef YYSTACK_USE_ALLOCA
298 # if defined (alloca) || defined (_ALLOCA_H)
299 # define YYSTACK_ALLOC alloca
302 # define YYSTACK_ALLOC __builtin_alloca
308 # ifdef YYSTACK_ALLOC
309 /* Pacify GCC's `empty if-body' warning. */
310 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
312 # if defined (__STDC__) || defined (__cplusplus)
313 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
314 # define YYSIZE_T size_t
316 # define YYSTACK_ALLOC xmalloc
317 # define YYSTACK_FREE free
319 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
322 #if (! defined (yyoverflow) \
323 && (! defined (__cplusplus) \
324 || (YYSTYPE_IS_TRIVIAL)))
326 /* A type that is properly aligned for any stack member. */
333 /* The size of the maximum gap between one aligned stack and the next. */
334 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
336 /* The size of an array large to enough to hold all stacks, each with
338 # define YYSTACK_BYTES(N) \
339 ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
340 + YYSTACK_GAP_MAXIMUM)
342 /* Copy COUNT objects from FROM to TO. The source and destination do
346 # define YYCOPY(To, From, Count) \
347 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
349 # define YYCOPY(To, From, Count) \
352 register YYSIZE_T yyi; \
353 for (yyi = 0; yyi < (Count); yyi++) \
354 (To)[yyi] = (From)[yyi]; \
360 /* Relocate STACK from its old location to the new one. The
361 local variables YYSIZE and YYSTACKSIZE give the old and new number of
362 elements in the stack, and YYPTR gives the new location of the
363 stack. Advance YYPTR to a properly aligned location for the next
365 # define YYSTACK_RELOCATE(Stack) \
368 YYSIZE_T yynewbytes; \
369 YYCOPY (&yyptr->Stack, Stack, yysize); \
370 Stack = &yyptr->Stack; \
371 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
372 yyptr += yynewbytes / sizeof (*yyptr); \
378 #if defined (__STDC__) || defined (__cplusplus)
379 typedef signed char yysigned_char;
381 typedef short yysigned_char;
384 /* YYFINAL -- State number of the termination state. */
386 /* YYLAST -- Last index in YYTABLE. */
389 /* YYNTOKENS -- Number of terminals. */
391 /* YYNNTS -- Number of nonterminals. */
393 /* YYNRULES -- Number of rules. */
395 /* YYNRULES -- Number of states. */
396 #define YYNSTATES 181
398 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
400 #define YYMAXUTOK 303
402 #define YYTRANSLATE(YYX) \
403 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
405 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
406 static const unsigned char yytranslate[] =
408 0, 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, 2, 2, 2, 2, 2, 2,
411 2, 2, 2, 2, 2, 41, 2, 2, 47, 2,
412 59, 64, 52, 50, 35, 51, 2, 53, 2, 2,
413 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
414 38, 40, 39, 2, 49, 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, 58, 2, 67, 57, 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, 65, 2, 66, 61, 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, 2, 2, 2, 2,
427 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
428 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
429 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
430 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
431 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
432 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
433 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
434 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
435 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
436 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
437 36, 37, 42, 43, 44, 45, 46, 48, 54, 55,
442 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
444 static const unsigned short yyprhs[] =
446 0, 0, 3, 5, 7, 9, 12, 13, 17, 20,
447 23, 25, 27, 32, 37, 42, 47, 52, 57, 62,
448 69, 74, 79, 84, 87, 92, 99, 104, 111, 115,
449 117, 121, 128, 135, 139, 144, 145, 151, 152, 158,
450 159, 161, 165, 167, 171, 176, 181, 185, 189, 193,
451 197, 201, 205, 209, 213, 217, 221, 225, 229, 233,
452 237, 241, 245, 249, 253, 255, 257, 259, 261, 263,
453 265, 267, 272, 274, 276, 278, 282, 284, 286, 290,
457 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
458 static const yysigned_char yyrhs[] =
460 69, 0, -1, 71, -1, 70, -1, 82, -1, 71,
461 57, -1, -1, 51, 72, 71, -1, 50, 71, -1,
462 73, 71, -1, 62, -1, 61, -1, 18, 59, 71,
463 64, -1, 19, 59, 71, 64, -1, 21, 59, 71,
464 64, -1, 20, 59, 71, 64, -1, 22, 59, 82,
465 64, -1, 23, 59, 82, 64, -1, 24, 59, 71,
466 64, -1, 25, 59, 82, 35, 71, 64, -1, 26,
467 59, 71, 64, -1, 27, 59, 71, 64, -1, 28,
468 59, 71, 64, -1, 17, 71, -1, 29, 59, 71,
469 64, -1, 29, 59, 71, 35, 71, 64, -1, 30,
470 59, 71, 64, -1, 30, 59, 71, 35, 71, 64,
471 -1, 71, 60, 12, -1, 74, -1, 71, 42, 74,
472 -1, 31, 59, 71, 35, 71, 64, -1, 32, 59,
473 71, 35, 71, 64, -1, 65, 77, 66, -1, 82,
474 65, 77, 66, -1, -1, 71, 58, 75, 78, 67,
475 -1, -1, 71, 59, 76, 77, 64, -1, -1, 71,
476 -1, 77, 35, 71, -1, 71, -1, 78, 35, 71,
477 -1, 65, 82, 66, 71, -1, 82, 59, 71, 64,
478 -1, 59, 71, 64, -1, 71, 49, 71, -1, 71,
479 52, 71, -1, 71, 53, 71, -1, 71, 55, 71,
480 -1, 71, 54, 71, -1, 71, 50, 71, -1, 71,
481 51, 71, -1, 71, 40, 71, -1, 71, 43, 71,
482 -1, 71, 41, 71, -1, 71, 45, 71, -1, 71,
483 44, 71, -1, 71, 38, 71, -1, 71, 39, 71,
484 -1, 71, 48, 71, -1, 71, 46, 71, -1, 71,
485 37, 71, -1, 7, -1, 8, -1, 3, -1, 6,
486 -1, 9, -1, 10, -1, 81, -1, 17, 59, 82,
487 64, -1, 11, -1, 80, -1, 13, -1, 79, 33,
488 13, -1, 80, -1, 34, -1, 79, 33, 12, -1,
492 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
493 static const unsigned short yyrline[] =
495 0, 205, 205, 206, 209, 218, 223, 222, 229, 233,
496 237, 238, 241, 245, 249, 253, 257, 263, 269, 273,
497 279, 283, 287, 291, 296, 300, 306, 310, 316, 322,
498 325, 329, 333, 337, 339, 349, 345, 359, 356, 366,
499 369, 373, 378, 383, 388, 394, 400, 408, 412, 416,
500 420, 424, 428, 432, 436, 440, 442, 446, 450, 454,
501 458, 462, 466, 470, 477, 483, 489, 496, 505, 513,
502 520, 523, 530, 537, 541, 550, 562, 570, 574, 590,
507 #if YYDEBUG || YYERROR_VERBOSE
508 /* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
509 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
510 static const char *const yytname[] =
512 "$end", "error", "$undefined", "INT", "HEX", "ERROR", "UINT", "M2_TRUE",
513 "M2_FALSE", "CHAR", "FLOAT", "STRING", "NAME", "BLOCKNAME", "IDENT",
514 "VARNAME", "TYPENAME", "SIZE", "CAP", "ORD", "HIGH", "ABS", "MIN_FUNC",
515 "MAX_FUNC", "FLOAT_FUNC", "VAL", "CHR", "ODD", "TRUNC", "INC", "DEC",
516 "INCL", "EXCL", "COLONCOLON", "INTERNAL_VAR", "','", "ABOVE_COMMA",
517 "ASSIGN", "'<'", "'>'", "'='", "'#'", "IN", "NOTEQUAL", "GEQ", "LEQ",
518 "OROR", "'&'", "LOGICAL_AND", "'@'", "'+'", "'-'", "'*'", "'/'", "MOD",
519 "DIV", "UNARY", "'^'", "'['", "'('", "DOT", "'~'", "NOT", "QID", "')'",
520 "'{'", "'}'", "']'", "$accept", "start", "type_exp", "exp", "@1",
521 "not_exp", "set", "@2", "@3", "arglist", "non_empty_arglist", "block",
522 "fblock", "variable", "type", 0
527 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
529 static const unsigned short yytoknum[] =
531 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
532 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
533 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
534 285, 286, 287, 288, 289, 44, 290, 291, 60, 62,
535 61, 35, 292, 293, 294, 295, 296, 38, 297, 64,
536 43, 45, 42, 47, 298, 299, 300, 94, 91, 40,
537 301, 126, 302, 303, 41, 123, 125, 93
541 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
542 static const unsigned char yyr1[] =
544 0, 68, 69, 69, 70, 71, 72, 71, 71, 71,
545 73, 73, 71, 71, 71, 71, 71, 71, 71, 71,
546 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
547 71, 71, 71, 74, 74, 75, 71, 76, 71, 77,
548 77, 77, 78, 78, 71, 71, 71, 71, 71, 71,
549 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
550 71, 71, 71, 71, 71, 71, 71, 71, 71, 71,
551 71, 71, 71, 79, 80, 80, 81, 81, 81, 81,
555 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
556 static const unsigned char yyr2[] =
558 0, 2, 1, 1, 1, 2, 0, 3, 2, 2,
559 1, 1, 4, 4, 4, 4, 4, 4, 4, 6,
560 4, 4, 4, 2, 4, 6, 4, 6, 3, 1,
561 3, 6, 6, 3, 4, 0, 5, 0, 5, 0,
562 1, 3, 1, 3, 4, 4, 3, 3, 3, 3,
563 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
564 3, 3, 3, 3, 1, 1, 1, 1, 1, 1,
565 1, 4, 1, 1, 1, 3, 1, 1, 3, 1,
569 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
570 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
571 means the default is an error. */
572 static const unsigned char yydefact[] =
574 0, 66, 67, 64, 65, 68, 69, 72, 79, 74,
575 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
576 0, 0, 0, 0, 0, 0, 0, 77, 0, 6,
577 0, 11, 10, 39, 0, 3, 2, 0, 29, 0,
578 76, 70, 4, 0, 23, 0, 0, 0, 0, 0,
579 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
580 0, 8, 0, 0, 40, 0, 0, 1, 0, 0,
581 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
582 0, 0, 0, 0, 0, 0, 5, 35, 37, 0,
583 9, 0, 0, 39, 0, 0, 0, 0, 0, 0,
584 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
585 7, 46, 0, 33, 0, 63, 59, 60, 54, 56,
586 39, 30, 0, 55, 58, 57, 62, 61, 47, 52,
587 53, 48, 49, 51, 50, 0, 39, 28, 78, 75,
588 0, 0, 71, 12, 13, 15, 14, 16, 17, 18,
589 0, 20, 21, 22, 0, 24, 0, 26, 0, 0,
590 41, 44, 42, 0, 0, 45, 34, 0, 0, 0,
591 0, 0, 0, 36, 38, 19, 25, 27, 31, 32,
595 /* YYDEFGOTO[NTERM-NUM]. */
596 static const short yydefgoto[] =
598 -1, 34, 35, 64, 62, 37, 38, 135, 136, 65,
602 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
604 #define YYPACT_NINF -92
605 static const short yypact[] =
607 157, -92, -92, -92, -92, -92, -92, -92, -92, -92,
608 -92, 217, -53, -27, -18, -17, -8, 2, 8, 14,
609 28, 29, 30, 31, 32, 34, 35, -92, 157, -92,
610 157, -92, -92, 157, 44, -92, 744, 157, -92, 62,
611 64, -92, -34, 157, 6, -34, 157, 157, 157, 157,
612 13, 13, 157, 13, 157, 157, 157, 157, 157, 157,
613 157, 6, 157, 79, 744, -30, -39, -92, 157, 157,
614 157, 157, 157, -15, 157, 157, 157, 157, 157, 157,
615 157, 157, 157, 157, 157, 157, -92, -92, -92, 86,
616 6, -4, 157, 157, -25, 302, 330, 358, 386, 36,
617 37, 414, 67, 442, 470, 498, 246, 274, 694, 720,
618 6, -92, 157, -92, 157, 768, -36, -36, -36, -36,
619 157, -92, 40, -36, -36, -36, 144, 203, 779, 788,
620 788, 6, 6, 6, 6, 157, 157, -92, -92, -92,
621 526, -28, -92, -92, -92, -92, -92, -92, -92, -92,
622 157, -92, -92, -92, 157, -92, 157, -92, 157, 157,
623 744, 6, 744, -32, -31, -92, -92, 554, 582, 610,
624 638, 666, 157, -92, -92, -92, -92, -92, -92, -92,
628 /* YYPGOTO[NTERM-NUM]. */
629 static const yysigned_char yypgoto[] =
631 -92, -92, -92, 0, -92, -92, 26, -92, -92, -91,
632 -92, -92, -92, -92, 53
635 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
636 positive, shift that token. If negative, reduce the rule which
637 number is the opposite. If zero, do what YYDEFACT says.
638 If YYTABLE_NINF, syntax error. */
639 #define YYTABLE_NINF -74
640 static const short yytable[] =
642 36, 10, 141, 172, 112, 112, 46, 112, 138, 139,
643 77, 44, 78, 79, 80, 81, 82, 83, 84, 85,
644 92, 86, 87, 88, 89, 92, 93, 114, 61, 10,
645 63, 93, 47, 174, 92, 173, 113, 90, 166, 142,
646 93, 48, 49, 63, 67, 164, 95, 96, 97, 98,
647 120, 50, 101, 42, 103, 104, 105, 106, 107, 108,
648 109, 51, 110, 86, 87, 88, 89, 52, 115, 116,
649 117, 118, 119, 53, 123, 124, 125, 126, 127, 128,
650 129, 130, 131, 132, 133, 134, 66, 54, 55, 56,
651 57, 58, 140, 59, 60, 91, 94, -73, 137, 121,
652 147, 148, 150, 99, 100, 93, 102, 0, 0, 0,
653 0, 0, 160, 0, 161, 0, 68, 69, 70, 71,
654 72, 73, 74, 75, 76, 77, 122, 78, 79, 80,
655 81, 82, 83, 84, 85, 162, 86, 87, 88, 89,
656 0, 0, 0, 111, 0, 0, 0, 0, 0, 0,
657 167, 0, 0, 0, 168, 0, 169, 0, 170, 171,
658 1, 0, 0, 2, 3, 4, 5, 6, 7, 8,
659 9, 0, 180, 10, 11, 12, 13, 14, 15, 16,
660 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
661 0, 27, 78, 79, 80, 81, 82, 83, 84, 85,
662 0, 86, 87, 88, 89, 0, 0, 28, 29, 0,
663 0, 0, 0, 0, 0, 0, 30, 0, 31, 32,
664 1, 0, 33, 2, 3, 4, 5, 6, 7, 8,
665 9, 0, 0, 10, 11, 12, 13, 14, 15, 16,
666 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
667 0, 27, 79, 80, 81, 82, 83, 84, 85, 0,
668 86, 87, 88, 89, 0, 0, 0, 28, 29, 0,
669 0, 0, 0, 0, 0, 0, 43, 0, 31, 32,
670 0, 154, 33, 68, 69, 70, 71, 72, 73, 74,
671 75, 76, 77, 0, 78, 79, 80, 81, 82, 83,
672 84, 85, 0, 86, 87, 88, 89, 0, 0, 156,
673 155, 68, 69, 70, 71, 72, 73, 74, 75, 76,
674 77, 0, 78, 79, 80, 81, 82, 83, 84, 85,
675 0, 86, 87, 88, 89, 0, 0, 0, 157, 68,
676 69, 70, 71, 72, 73, 74, 75, 76, 77, 0,
677 78, 79, 80, 81, 82, 83, 84, 85, 0, 86,
678 87, 88, 89, 0, 0, 0, 143, 68, 69, 70,
679 71, 72, 73, 74, 75, 76, 77, 0, 78, 79,
680 80, 81, 82, 83, 84, 85, 0, 86, 87, 88,
681 89, 0, 0, 0, 144, 68, 69, 70, 71, 72,
682 73, 74, 75, 76, 77, 0, 78, 79, 80, 81,
683 82, 83, 84, 85, 0, 86, 87, 88, 89, 0,
684 0, 0, 145, 68, 69, 70, 71, 72, 73, 74,
685 75, 76, 77, 0, 78, 79, 80, 81, 82, 83,
686 84, 85, 0, 86, 87, 88, 89, 0, 0, 0,
687 146, 68, 69, 70, 71, 72, 73, 74, 75, 76,
688 77, 0, 78, 79, 80, 81, 82, 83, 84, 85,
689 0, 86, 87, 88, 89, 0, 0, 0, 149, 68,
690 69, 70, 71, 72, 73, 74, 75, 76, 77, 0,
691 78, 79, 80, 81, 82, 83, 84, 85, 0, 86,
692 87, 88, 89, 0, 0, 0, 151, 68, 69, 70,
693 71, 72, 73, 74, 75, 76, 77, 0, 78, 79,
694 80, 81, 82, 83, 84, 85, 0, 86, 87, 88,
695 89, 0, 0, 0, 152, 68, 69, 70, 71, 72,
696 73, 74, 75, 76, 77, 0, 78, 79, 80, 81,
697 82, 83, 84, 85, 0, 86, 87, 88, 89, 0,
698 0, 0, 153, 68, 69, 70, 71, 72, 73, 74,
699 75, 76, 77, 0, 78, 79, 80, 81, 82, 83,
700 84, 85, 0, 86, 87, 88, 89, 0, 0, 0,
701 165, 68, 69, 70, 71, 72, 73, 74, 75, 76,
702 77, 0, 78, 79, 80, 81, 82, 83, 84, 85,
703 0, 86, 87, 88, 89, 0, 0, 0, 175, 68,
704 69, 70, 71, 72, 73, 74, 75, 76, 77, 0,
705 78, 79, 80, 81, 82, 83, 84, 85, 0, 86,
706 87, 88, 89, 0, 0, 0, 176, 68, 69, 70,
707 71, 72, 73, 74, 75, 76, 77, 0, 78, 79,
708 80, 81, 82, 83, 84, 85, 0, 86, 87, 88,
709 89, 0, 0, 0, 177, 68, 69, 70, 71, 72,
710 73, 74, 75, 76, 77, 0, 78, 79, 80, 81,
711 82, 83, 84, 85, 0, 86, 87, 88, 89, 0,
712 0, 0, 178, 68, 69, 70, 71, 72, 73, 74,
713 75, 76, 77, 0, 78, 79, 80, 81, 82, 83,
714 84, 85, 0, 86, 87, 88, 89, 0, 0, 158,
715 179, 68, 69, 70, 71, 72, 73, 74, 75, 76,
716 77, 0, 78, 79, 80, 81, 82, 83, 84, 85,
717 0, 86, 87, 88, 89, 159, 0, 68, 69, 70,
718 71, 72, 73, 74, 75, 76, 77, 0, 78, 79,
719 80, 81, 82, 83, 84, 85, 0, 86, 87, 88,
720 89, 68, 69, 70, 71, 72, 73, 74, 75, 76,
721 77, 0, 78, 79, 80, 81, 82, 83, 84, 85,
722 0, 86, 87, 88, 89, -74, 69, 70, 71, 72,
723 73, 74, 75, 76, 77, 0, 78, 79, 80, 81,
724 82, 83, 84, 85, 0, 86, 87, 88, 89, 80,
725 81, 82, 83, 84, 85, 0, 86, 87, 88, 89,
726 82, 83, 84, 85, 0, 86, 87, 88, 89
729 static const short yycheck[] =
731 0, 16, 93, 35, 35, 35, 59, 35, 12, 13,
732 46, 11, 48, 49, 50, 51, 52, 53, 54, 55,
733 59, 57, 58, 59, 60, 59, 65, 66, 28, 16,
734 30, 65, 59, 64, 59, 67, 66, 37, 66, 64,
735 65, 59, 59, 43, 0, 136, 46, 47, 48, 49,
736 65, 59, 52, 0, 54, 55, 56, 57, 58, 59,
737 60, 59, 62, 57, 58, 59, 60, 59, 68, 69,
738 70, 71, 72, 59, 74, 75, 76, 77, 78, 79,
739 80, 81, 82, 83, 84, 85, 33, 59, 59, 59,
740 59, 59, 92, 59, 59, 33, 43, 33, 12, 73,
741 64, 64, 35, 50, 51, 65, 53, -1, -1, -1,
742 -1, -1, 112, -1, 114, -1, 37, 38, 39, 40,
743 41, 42, 43, 44, 45, 46, 73, 48, 49, 50,
744 51, 52, 53, 54, 55, 135, 57, 58, 59, 60,
745 -1, -1, -1, 64, -1, -1, -1, -1, -1, -1,
746 150, -1, -1, -1, 154, -1, 156, -1, 158, 159,
747 3, -1, -1, 6, 7, 8, 9, 10, 11, 12,
748 13, -1, 172, 16, 17, 18, 19, 20, 21, 22,
749 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
750 -1, 34, 48, 49, 50, 51, 52, 53, 54, 55,
751 -1, 57, 58, 59, 60, -1, -1, 50, 51, -1,
752 -1, -1, -1, -1, -1, -1, 59, -1, 61, 62,
753 3, -1, 65, 6, 7, 8, 9, 10, 11, 12,
754 13, -1, -1, 16, 17, 18, 19, 20, 21, 22,
755 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
756 -1, 34, 49, 50, 51, 52, 53, 54, 55, -1,
757 57, 58, 59, 60, -1, -1, -1, 50, 51, -1,
758 -1, -1, -1, -1, -1, -1, 59, -1, 61, 62,
759 -1, 35, 65, 37, 38, 39, 40, 41, 42, 43,
760 44, 45, 46, -1, 48, 49, 50, 51, 52, 53,
761 54, 55, -1, 57, 58, 59, 60, -1, -1, 35,
762 64, 37, 38, 39, 40, 41, 42, 43, 44, 45,
763 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
764 -1, 57, 58, 59, 60, -1, -1, -1, 64, 37,
765 38, 39, 40, 41, 42, 43, 44, 45, 46, -1,
766 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
767 58, 59, 60, -1, -1, -1, 64, 37, 38, 39,
768 40, 41, 42, 43, 44, 45, 46, -1, 48, 49,
769 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
770 60, -1, -1, -1, 64, 37, 38, 39, 40, 41,
771 42, 43, 44, 45, 46, -1, 48, 49, 50, 51,
772 52, 53, 54, 55, -1, 57, 58, 59, 60, -1,
773 -1, -1, 64, 37, 38, 39, 40, 41, 42, 43,
774 44, 45, 46, -1, 48, 49, 50, 51, 52, 53,
775 54, 55, -1, 57, 58, 59, 60, -1, -1, -1,
776 64, 37, 38, 39, 40, 41, 42, 43, 44, 45,
777 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
778 -1, 57, 58, 59, 60, -1, -1, -1, 64, 37,
779 38, 39, 40, 41, 42, 43, 44, 45, 46, -1,
780 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
781 58, 59, 60, -1, -1, -1, 64, 37, 38, 39,
782 40, 41, 42, 43, 44, 45, 46, -1, 48, 49,
783 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
784 60, -1, -1, -1, 64, 37, 38, 39, 40, 41,
785 42, 43, 44, 45, 46, -1, 48, 49, 50, 51,
786 52, 53, 54, 55, -1, 57, 58, 59, 60, -1,
787 -1, -1, 64, 37, 38, 39, 40, 41, 42, 43,
788 44, 45, 46, -1, 48, 49, 50, 51, 52, 53,
789 54, 55, -1, 57, 58, 59, 60, -1, -1, -1,
790 64, 37, 38, 39, 40, 41, 42, 43, 44, 45,
791 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
792 -1, 57, 58, 59, 60, -1, -1, -1, 64, 37,
793 38, 39, 40, 41, 42, 43, 44, 45, 46, -1,
794 48, 49, 50, 51, 52, 53, 54, 55, -1, 57,
795 58, 59, 60, -1, -1, -1, 64, 37, 38, 39,
796 40, 41, 42, 43, 44, 45, 46, -1, 48, 49,
797 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
798 60, -1, -1, -1, 64, 37, 38, 39, 40, 41,
799 42, 43, 44, 45, 46, -1, 48, 49, 50, 51,
800 52, 53, 54, 55, -1, 57, 58, 59, 60, -1,
801 -1, -1, 64, 37, 38, 39, 40, 41, 42, 43,
802 44, 45, 46, -1, 48, 49, 50, 51, 52, 53,
803 54, 55, -1, 57, 58, 59, 60, -1, -1, 35,
804 64, 37, 38, 39, 40, 41, 42, 43, 44, 45,
805 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
806 -1, 57, 58, 59, 60, 35, -1, 37, 38, 39,
807 40, 41, 42, 43, 44, 45, 46, -1, 48, 49,
808 50, 51, 52, 53, 54, 55, -1, 57, 58, 59,
809 60, 37, 38, 39, 40, 41, 42, 43, 44, 45,
810 46, -1, 48, 49, 50, 51, 52, 53, 54, 55,
811 -1, 57, 58, 59, 60, 37, 38, 39, 40, 41,
812 42, 43, 44, 45, 46, -1, 48, 49, 50, 51,
813 52, 53, 54, 55, -1, 57, 58, 59, 60, 50,
814 51, 52, 53, 54, 55, -1, 57, 58, 59, 60,
815 52, 53, 54, 55, -1, 57, 58, 59, 60
818 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
819 symbol of state STATE-NUM. */
820 static const unsigned char yystos[] =
822 0, 3, 6, 7, 8, 9, 10, 11, 12, 13,
823 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
824 26, 27, 28, 29, 30, 31, 32, 34, 50, 51,
825 59, 61, 62, 65, 69, 70, 71, 73, 74, 79,
826 80, 81, 82, 59, 71, 82, 59, 59, 59, 59,
827 59, 59, 59, 59, 59, 59, 59, 59, 59, 59,
828 59, 71, 72, 71, 71, 77, 82, 0, 37, 38,
829 39, 40, 41, 42, 43, 44, 45, 46, 48, 49,
830 50, 51, 52, 53, 54, 55, 57, 58, 59, 60,
831 71, 33, 59, 65, 82, 71, 71, 71, 71, 82,
832 82, 71, 82, 71, 71, 71, 71, 71, 71, 71,
833 71, 64, 35, 66, 66, 71, 71, 71, 71, 71,
834 65, 74, 82, 71, 71, 71, 71, 71, 71, 71,
835 71, 71, 71, 71, 71, 75, 76, 12, 12, 13,
836 71, 77, 64, 64, 64, 64, 64, 64, 64, 64,
837 35, 64, 64, 64, 35, 64, 35, 64, 35, 35,
838 71, 71, 71, 78, 77, 64, 66, 71, 71, 71,
839 71, 71, 35, 67, 64, 64, 64, 64, 64, 64,
843 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
844 # define YYSIZE_T __SIZE_TYPE__
846 #if ! defined (YYSIZE_T) && defined (size_t)
847 # define YYSIZE_T size_t
849 #if ! defined (YYSIZE_T)
850 # if defined (__STDC__) || defined (__cplusplus)
851 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
852 # define YYSIZE_T size_t
855 #if ! defined (YYSIZE_T)
856 # define YYSIZE_T unsigned int
859 #define yyerrok (yyerrstatus = 0)
860 #define yyclearin (yychar = YYEMPTY)
864 #define YYACCEPT goto yyacceptlab
865 #define YYABORT goto yyabortlab
866 #define YYERROR goto yyerrlab1
868 /* Like YYERROR except do call yyerror. This remains here temporarily
869 to ease the transition to the new meaning of YYERROR, for GCC.
870 Once GCC version 2 has supplanted version 1, this can go. */
872 #define YYFAIL goto yyerrlab
874 #define YYRECOVERING() (!!yyerrstatus)
876 #define YYBACKUP(Token, Value) \
878 if (yychar == YYEMPTY && yylen == 1) \
882 yytoken = YYTRANSLATE (yychar); \
888 yyerror ("syntax error: cannot back up");\
894 #define YYERRCODE 256
896 /* YYLLOC_DEFAULT -- Compute the default location (before the actions
899 #ifndef YYLLOC_DEFAULT
900 # define YYLLOC_DEFAULT(Current, Rhs, N) \
901 Current.first_line = Rhs[1].first_line; \
902 Current.first_column = Rhs[1].first_column; \
903 Current.last_line = Rhs[N].last_line; \
904 Current.last_column = Rhs[N].last_column;
907 /* YYLEX -- calling `yylex' with the right arguments. */
910 # define YYLEX yylex (YYLEX_PARAM)
912 # define YYLEX yylex ()
915 /* Enable debugging if requested. */
919 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
920 # define YYFPRINTF fprintf
923 # define YYDPRINTF(Args) \
929 # define YYDSYMPRINT(Args) \
935 # define YYDSYMPRINTF(Title, Token, Value, Location) \
939 YYFPRINTF (stderr, "%s ", Title); \
940 yysymprint (stderr, \
942 YYFPRINTF (stderr, "\n"); \
946 /*------------------------------------------------------------------.
947 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
949 `------------------------------------------------------------------*/
951 #if defined (__STDC__) || defined (__cplusplus)
953 yy_stack_print (short *bottom, short *top)
956 yy_stack_print (bottom, top)
961 YYFPRINTF (stderr, "Stack now");
962 for (/* Nothing. */; bottom <= top; ++bottom)
963 YYFPRINTF (stderr, " %d", *bottom);
964 YYFPRINTF (stderr, "\n");
967 # define YY_STACK_PRINT(Bottom, Top) \
970 yy_stack_print ((Bottom), (Top)); \
974 /*------------------------------------------------.
975 | Report that the YYRULE is going to be reduced. |
976 `------------------------------------------------*/
978 #if defined (__STDC__) || defined (__cplusplus)
980 yy_reduce_print (int yyrule)
983 yy_reduce_print (yyrule)
988 unsigned int yylineno = yyrline[yyrule];
989 YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
990 yyrule - 1, yylineno);
991 /* Print the symbols being reduced, and their result. */
992 for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
993 YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
994 YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
997 # define YY_REDUCE_PRINT(Rule) \
1000 yy_reduce_print (Rule); \
1003 /* Nonzero means print parse trace. It is left uninitialized so that
1004 multiple parsers can coexist. */
1006 #else /* !YYDEBUG */
1007 # define YYDPRINTF(Args)
1008 # define YYDSYMPRINT(Args)
1009 # define YYDSYMPRINTF(Title, Token, Value, Location)
1010 # define YY_STACK_PRINT(Bottom, Top)
1011 # define YY_REDUCE_PRINT(Rule)
1012 #endif /* !YYDEBUG */
1015 /* YYINITDEPTH -- initial size of the parser's stacks. */
1017 # define YYINITDEPTH 200
1020 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1021 if the built-in stack extension method is used).
1023 Do not make this value too large; the results are undefined if
1024 SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
1025 evaluated with infinite-precision integer arithmetic. */
1032 # define YYMAXDEPTH 10000
1040 # if defined (__GLIBC__) && defined (_STRING_H)
1041 # define yystrlen strlen
1043 /* Return the length of YYSTR. */
1045 # if defined (__STDC__) || defined (__cplusplus)
1046 yystrlen (const char *yystr)
1052 register const char *yys = yystr;
1054 while (*yys++ != '\0')
1057 return yys - yystr - 1;
1063 # if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
1064 # define yystpcpy stpcpy
1066 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1069 # if defined (__STDC__) || defined (__cplusplus)
1070 yystpcpy (char *yydest, const char *yysrc)
1072 yystpcpy (yydest, yysrc)
1077 register char *yyd = yydest;
1078 register const char *yys = yysrc;
1080 while ((*yyd++ = *yys++) != '\0')
1088 #endif /* !YYERROR_VERBOSE */
1093 /*--------------------------------.
1094 | Print this symbol on YYOUTPUT. |
1095 `--------------------------------*/
1097 #if defined (__STDC__) || defined (__cplusplus)
1099 yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
1102 yysymprint (yyoutput, yytype, yyvaluep)
1108 /* Pacify ``unused variable'' warnings. */
1111 if (yytype < YYNTOKENS)
1113 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1115 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1119 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1126 YYFPRINTF (yyoutput, ")");
1129 #endif /* ! YYDEBUG */
1130 /*-----------------------------------------------.
1131 | Release the memory associated to this symbol. |
1132 `-----------------------------------------------*/
1134 #if defined (__STDC__) || defined (__cplusplus)
1136 yydestruct (int yytype, YYSTYPE *yyvaluep)
1139 yydestruct (yytype, yyvaluep)
1144 /* Pacify ``unused variable'' warnings. */
1156 /* Prevent warnings from -Wmissing-prototypes. */
1158 #ifdef YYPARSE_PARAM
1159 # if defined (__STDC__) || defined (__cplusplus)
1160 int yyparse (void *YYPARSE_PARAM);
1164 #else /* ! YYPARSE_PARAM */
1165 #if defined (__STDC__) || defined (__cplusplus)
1170 #endif /* ! YYPARSE_PARAM */
1174 /* The lookahead symbol. */
1177 /* The semantic value of the lookahead symbol. */
1180 /* Number of syntax errors so far. */
1189 #ifdef YYPARSE_PARAM
1190 # if defined (__STDC__) || defined (__cplusplus)
1191 int yyparse (void *YYPARSE_PARAM)
1193 int yyparse (YYPARSE_PARAM)
1194 void *YYPARSE_PARAM;
1196 #else /* ! YYPARSE_PARAM */
1197 #if defined (__STDC__) || defined (__cplusplus)
1208 register int yystate;
1211 /* Number of tokens to shift before error messages enabled. */
1213 /* Lookahead token as an internal (translated) token number. */
1216 /* Three stacks and their tools:
1217 `yyss': related to states,
1218 `yyvs': related to semantic values,
1219 `yyls': related to locations.
1221 Refer to the stacks thru separate pointers, to allow yyoverflow
1222 to xreallocate them elsewhere. */
1224 /* The state stack. */
1225 short yyssa[YYINITDEPTH];
1226 short *yyss = yyssa;
1227 register short *yyssp;
1229 /* The semantic value stack. */
1230 YYSTYPE yyvsa[YYINITDEPTH];
1231 YYSTYPE *yyvs = yyvsa;
1232 register YYSTYPE *yyvsp;
1236 #define YYPOPSTACK (yyvsp--, yyssp--)
1238 YYSIZE_T yystacksize = YYINITDEPTH;
1240 /* The variables used to return semantic value and location from the
1245 /* When reducing, the number of symbols on the RHS of the reduced
1249 YYDPRINTF ((stderr, "Starting parse\n"));
1254 yychar = YYEMPTY; /* Cause a token to be read. */
1256 /* Initialize stack pointers.
1257 Waste one element of value and location stack
1258 so that they stay on the same level as the state stack.
1259 The wasted elements are never initialized. */
1266 /*------------------------------------------------------------.
1267 | yynewstate -- Push a new state, which is found in yystate. |
1268 `------------------------------------------------------------*/
1270 /* In all cases, when you get here, the value and location stacks
1271 have just been pushed. so pushing a state here evens the stacks.
1278 if (yyss + yystacksize - 1 <= yyssp)
1280 /* Get the current used size of the three stacks, in elements. */
1281 YYSIZE_T yysize = yyssp - yyss + 1;
1285 /* Give user a chance to xreallocate the stack. Use copies of
1286 these so that the &'s don't force the real ones into
1288 YYSTYPE *yyvs1 = yyvs;
1289 short *yyss1 = yyss;
1292 /* Each stack pointer address is followed by the size of the
1293 data in use in that stack, in bytes. This used to be a
1294 conditional around just the two extra args, but that might
1295 be undefined if yyoverflow is a macro. */
1296 yyoverflow ("parser stack overflow",
1297 &yyss1, yysize * sizeof (*yyssp),
1298 &yyvs1, yysize * sizeof (*yyvsp),
1305 #else /* no yyoverflow */
1306 # ifndef YYSTACK_RELOCATE
1309 /* Extend the stack our own way. */
1310 if (YYMAXDEPTH <= yystacksize)
1313 if (YYMAXDEPTH < yystacksize)
1314 yystacksize = YYMAXDEPTH;
1317 short *yyss1 = yyss;
1318 union yyalloc *yyptr =
1319 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1322 YYSTACK_RELOCATE (yyss);
1323 YYSTACK_RELOCATE (yyvs);
1325 # undef YYSTACK_RELOCATE
1327 YYSTACK_FREE (yyss1);
1330 #endif /* no yyoverflow */
1332 yyssp = yyss + yysize - 1;
1333 yyvsp = yyvs + yysize - 1;
1336 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1337 (unsigned long int) yystacksize));
1339 if (yyss + yystacksize - 1 <= yyssp)
1343 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1352 /* Do appropriate processing given the current state. */
1353 /* Read a lookahead token if we need one and don't already have one. */
1356 /* First try to decide what to do without reference to lookahead token. */
1358 yyn = yypact[yystate];
1359 if (yyn == YYPACT_NINF)
1362 /* Not known => get a lookahead token if don't already have one. */
1364 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1365 if (yychar == YYEMPTY)
1367 YYDPRINTF ((stderr, "Reading a token: "));
1371 if (yychar <= YYEOF)
1373 yychar = yytoken = YYEOF;
1374 YYDPRINTF ((stderr, "Now at end of input.\n"));
1378 yytoken = YYTRANSLATE (yychar);
1379 YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
1382 /* If the proper action on seeing token YYTOKEN is to reduce or to
1383 detect an error, take that action. */
1385 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1390 if (yyn == 0 || yyn == YYTABLE_NINF)
1399 /* Shift the lookahead token. */
1400 YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
1402 /* Discard the token being shifted unless it is eof. */
1403 if (yychar != YYEOF)
1409 /* Count tokens shifted since error; after three, turn off error
1418 /*-----------------------------------------------------------.
1419 | yydefault -- do the default action for the current state. |
1420 `-----------------------------------------------------------*/
1422 yyn = yydefact[yystate];
1428 /*-----------------------------.
1429 | yyreduce -- Do a reduction. |
1430 `-----------------------------*/
1432 /* yyn is the number of a rule to reduce with. */
1435 /* If YYLEN is nonzero, implement the default value of the action:
1438 Otherwise, the following line sets YYVAL to garbage.
1439 This behavior is undocumented and Bison
1440 users should not rely upon it. Assigning to YYVAL
1441 unconditionally makes the parser a bit smaller, and it avoids a
1442 GCC warning that YYVAL may be used uninitialized. */
1443 yyval = yyvsp[1-yylen];
1446 YY_REDUCE_PRINT (yyn);
1450 #line 210 "m2-exp.y"
1451 { write_exp_elt_opcode(OP_TYPE);
1452 write_exp_elt_type(yyvsp[0].tval);
1453 write_exp_elt_opcode(OP_TYPE);
1458 #line 219 "m2-exp.y"
1459 { write_exp_elt_opcode (UNOP_IND); }
1463 #line 223 "m2-exp.y"
1464 { number_sign = -1; }
1468 #line 225 "m2-exp.y"
1470 write_exp_elt_opcode (UNOP_NEG); }
1474 #line 230 "m2-exp.y"
1475 { write_exp_elt_opcode(UNOP_PLUS); }
1479 #line 234 "m2-exp.y"
1480 { write_exp_elt_opcode (UNOP_LOGICAL_NOT); }
1484 #line 242 "m2-exp.y"
1485 { write_exp_elt_opcode (UNOP_CAP); }
1489 #line 246 "m2-exp.y"
1490 { write_exp_elt_opcode (UNOP_ORD); }
1494 #line 250 "m2-exp.y"
1495 { write_exp_elt_opcode (UNOP_ABS); }
1499 #line 254 "m2-exp.y"
1500 { write_exp_elt_opcode (UNOP_HIGH); }
1504 #line 258 "m2-exp.y"
1505 { write_exp_elt_opcode (UNOP_MIN);
1506 write_exp_elt_type (yyvsp[-1].tval);
1507 write_exp_elt_opcode (UNOP_MIN); }
1511 #line 264 "m2-exp.y"
1512 { write_exp_elt_opcode (UNOP_MAX);
1513 write_exp_elt_type (yyvsp[-1].tval);
1514 write_exp_elt_opcode (UNOP_MIN); }
1518 #line 270 "m2-exp.y"
1519 { write_exp_elt_opcode (UNOP_FLOAT); }
1523 #line 274 "m2-exp.y"
1524 { write_exp_elt_opcode (BINOP_VAL);
1525 write_exp_elt_type (yyvsp[-3].tval);
1526 write_exp_elt_opcode (BINOP_VAL); }
1530 #line 280 "m2-exp.y"
1531 { write_exp_elt_opcode (UNOP_CHR); }
1535 #line 284 "m2-exp.y"
1536 { write_exp_elt_opcode (UNOP_ODD); }
1540 #line 288 "m2-exp.y"
1541 { write_exp_elt_opcode (UNOP_TRUNC); }
1545 #line 292 "m2-exp.y"
1546 { write_exp_elt_opcode (UNOP_SIZEOF); }
1550 #line 297 "m2-exp.y"
1551 { write_exp_elt_opcode(UNOP_PREINCREMENT); }
1555 #line 301 "m2-exp.y"
1556 { write_exp_elt_opcode(BINOP_ASSIGN_MODIFY);
1557 write_exp_elt_opcode(BINOP_ADD);
1558 write_exp_elt_opcode(BINOP_ASSIGN_MODIFY); }
1562 #line 307 "m2-exp.y"
1563 { write_exp_elt_opcode(UNOP_PREDECREMENT);}
1567 #line 311 "m2-exp.y"
1568 { write_exp_elt_opcode(BINOP_ASSIGN_MODIFY);
1569 write_exp_elt_opcode(BINOP_SUB);
1570 write_exp_elt_opcode(BINOP_ASSIGN_MODIFY); }
1574 #line 317 "m2-exp.y"
1575 { write_exp_elt_opcode (STRUCTOP_STRUCT);
1576 write_exp_string (yyvsp[0].sval);
1577 write_exp_elt_opcode (STRUCTOP_STRUCT); }
1581 #line 326 "m2-exp.y"
1582 { error("Sets are not implemented.");}
1586 #line 330 "m2-exp.y"
1587 { error("Sets are not implemented.");}
1591 #line 334 "m2-exp.y"
1592 { error("Sets are not implemented.");}
1596 #line 338 "m2-exp.y"
1597 { error("Sets are not implemented.");}
1601 #line 340 "m2-exp.y"
1602 { error("Sets are not implemented.");}
1606 #line 349 "m2-exp.y"
1607 { start_arglist(); }
1611 #line 351 "m2-exp.y"
1612 { write_exp_elt_opcode (MULTI_SUBSCRIPT);
1613 write_exp_elt_longcst ((LONGEST) end_arglist());
1614 write_exp_elt_opcode (MULTI_SUBSCRIPT); }
1618 #line 359 "m2-exp.y"
1619 { start_arglist (); }
1623 #line 361 "m2-exp.y"
1624 { write_exp_elt_opcode (OP_FUNCALL);
1625 write_exp_elt_longcst ((LONGEST) end_arglist ());
1626 write_exp_elt_opcode (OP_FUNCALL); }
1630 #line 370 "m2-exp.y"
1631 { arglist_len = 1; }
1635 #line 374 "m2-exp.y"
1640 #line 379 "m2-exp.y"
1641 { arglist_len = 1; }
1645 #line 384 "m2-exp.y"
1650 #line 389 "m2-exp.y"
1651 { write_exp_elt_opcode (UNOP_MEMVAL);
1652 write_exp_elt_type (yyvsp[-2].tval);
1653 write_exp_elt_opcode (UNOP_MEMVAL); }
1657 #line 395 "m2-exp.y"
1658 { write_exp_elt_opcode (UNOP_CAST);
1659 write_exp_elt_type (yyvsp[-3].tval);
1660 write_exp_elt_opcode (UNOP_CAST); }
1664 #line 401 "m2-exp.y"
1669 #line 409 "m2-exp.y"
1670 { write_exp_elt_opcode (BINOP_REPEAT); }
1674 #line 413 "m2-exp.y"
1675 { write_exp_elt_opcode (BINOP_MUL); }
1679 #line 417 "m2-exp.y"
1680 { write_exp_elt_opcode (BINOP_DIV); }
1684 #line 421 "m2-exp.y"
1685 { write_exp_elt_opcode (BINOP_INTDIV); }
1689 #line 425 "m2-exp.y"
1690 { write_exp_elt_opcode (BINOP_REM); }
1694 #line 429 "m2-exp.y"
1695 { write_exp_elt_opcode (BINOP_ADD); }
1699 #line 433 "m2-exp.y"
1700 { write_exp_elt_opcode (BINOP_SUB); }
1704 #line 437 "m2-exp.y"
1705 { write_exp_elt_opcode (BINOP_EQUAL); }
1709 #line 441 "m2-exp.y"
1710 { write_exp_elt_opcode (BINOP_NOTEQUAL); }
1714 #line 443 "m2-exp.y"
1715 { write_exp_elt_opcode (BINOP_NOTEQUAL); }
1719 #line 447 "m2-exp.y"
1720 { write_exp_elt_opcode (BINOP_LEQ); }
1724 #line 451 "m2-exp.y"
1725 { write_exp_elt_opcode (BINOP_GEQ); }
1729 #line 455 "m2-exp.y"
1730 { write_exp_elt_opcode (BINOP_LESS); }
1734 #line 459 "m2-exp.y"
1735 { write_exp_elt_opcode (BINOP_GTR); }
1739 #line 463 "m2-exp.y"
1740 { write_exp_elt_opcode (BINOP_LOGICAL_AND); }
1744 #line 467 "m2-exp.y"
1745 { write_exp_elt_opcode (BINOP_LOGICAL_OR); }
1749 #line 471 "m2-exp.y"
1750 { write_exp_elt_opcode (BINOP_ASSIGN); }
1754 #line 478 "m2-exp.y"
1755 { write_exp_elt_opcode (OP_BOOL);
1756 write_exp_elt_longcst ((LONGEST) yyvsp[0].ulval);
1757 write_exp_elt_opcode (OP_BOOL); }
1761 #line 484 "m2-exp.y"
1762 { write_exp_elt_opcode (OP_BOOL);
1763 write_exp_elt_longcst ((LONGEST) yyvsp[0].ulval);
1764 write_exp_elt_opcode (OP_BOOL); }
1768 #line 490 "m2-exp.y"
1769 { write_exp_elt_opcode (OP_LONG);
1770 write_exp_elt_type (builtin_type_m2_int);
1771 write_exp_elt_longcst ((LONGEST) yyvsp[0].lval);
1772 write_exp_elt_opcode (OP_LONG); }
1776 #line 497 "m2-exp.y"
1778 write_exp_elt_opcode (OP_LONG);
1779 write_exp_elt_type (builtin_type_m2_card);
1780 write_exp_elt_longcst ((LONGEST) yyvsp[0].ulval);
1781 write_exp_elt_opcode (OP_LONG);
1786 #line 506 "m2-exp.y"
1787 { write_exp_elt_opcode (OP_LONG);
1788 write_exp_elt_type (builtin_type_m2_char);
1789 write_exp_elt_longcst ((LONGEST) yyvsp[0].ulval);
1790 write_exp_elt_opcode (OP_LONG); }
1794 #line 514 "m2-exp.y"
1795 { write_exp_elt_opcode (OP_DOUBLE);
1796 write_exp_elt_type (builtin_type_m2_real);
1797 write_exp_elt_dblcst (yyvsp[0].dval);
1798 write_exp_elt_opcode (OP_DOUBLE); }
1802 #line 524 "m2-exp.y"
1803 { write_exp_elt_opcode (OP_LONG);
1804 write_exp_elt_type (builtin_type_int);
1805 write_exp_elt_longcst ((LONGEST) TYPE_LENGTH (yyvsp[-1].tval));
1806 write_exp_elt_opcode (OP_LONG); }
1810 #line 531 "m2-exp.y"
1811 { write_exp_elt_opcode (OP_M2_STRING);
1812 write_exp_string (yyvsp[0].sval);
1813 write_exp_elt_opcode (OP_M2_STRING); }
1817 #line 538 "m2-exp.y"
1818 { yyval.bval = SYMBOL_BLOCK_VALUE(yyvsp[0].sym); }
1822 #line 542 "m2-exp.y"
1823 { struct symbol *sym
1824 = lookup_symbol (copy_name (yyvsp[0].sval), expression_context_block,
1825 VAR_DOMAIN, 0, NULL);
1830 #line 551 "m2-exp.y"
1831 { struct symbol *tem
1832 = lookup_symbol (copy_name (yyvsp[0].sval), yyvsp[-2].bval,
1833 VAR_DOMAIN, 0, NULL);
1834 if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK)
1835 error ("No function \"%s\" in specified context.",
1836 copy_name (yyvsp[0].sval));
1842 #line 563 "m2-exp.y"
1843 { write_exp_elt_opcode(OP_VAR_VALUE);
1844 write_exp_elt_block (NULL);
1845 write_exp_elt_sym (yyvsp[0].sym);
1846 write_exp_elt_opcode (OP_VAR_VALUE); }
1850 #line 575 "m2-exp.y"
1851 { struct symbol *sym;
1852 sym = lookup_symbol (copy_name (yyvsp[0].sval), yyvsp[-2].bval,
1853 VAR_DOMAIN, 0, NULL);
1855 error ("No symbol \"%s\" in specified context.",
1856 copy_name (yyvsp[0].sval));
1858 write_exp_elt_opcode (OP_VAR_VALUE);
1859 /* block_found is set by lookup_symbol. */
1860 write_exp_elt_block (block_found);
1861 write_exp_elt_sym (sym);
1862 write_exp_elt_opcode (OP_VAR_VALUE); }
1866 #line 591 "m2-exp.y"
1867 { struct symbol *sym;
1868 int is_a_field_of_this;
1870 sym = lookup_symbol (copy_name (yyvsp[0].sval),
1871 expression_context_block,
1873 &is_a_field_of_this,
1877 if (symbol_read_needs_frame (sym))
1879 if (innermost_block == 0 ||
1880 contained_in (block_found,
1882 innermost_block = block_found;
1885 write_exp_elt_opcode (OP_VAR_VALUE);
1886 /* We want to use the selected frame, not
1887 another more inner frame which happens to
1888 be in the same block. */
1889 write_exp_elt_block (NULL);
1890 write_exp_elt_sym (sym);
1891 write_exp_elt_opcode (OP_VAR_VALUE);
1895 struct minimal_symbol *msymbol;
1896 char *arg = copy_name (yyvsp[0].sval);
1899 lookup_minimal_symbol (arg, NULL, NULL);
1900 if (msymbol != NULL)
1904 lookup_function_type (builtin_type_int),
1907 else if (!have_full_symbols () && !have_partial_symbols ())
1908 error ("No symbol table is loaded. Use the \"symbol-file\" command.");
1910 error ("No symbol \"%s\" in current context.",
1911 copy_name (yyvsp[0].sval));
1917 #line 642 "m2-exp.y"
1918 { yyval.tval = lookup_typename (copy_name (yyvsp[0].sval),
1919 expression_context_block, 0); }
1925 /* Line 991 of yacc.c. */
1931 YY_STACK_PRINT (yyss, yyssp);
1936 /* Now `shift' the result of the reduction. Determine what state
1937 that goes to, based on the state we popped back to and the rule
1938 number reduced by. */
1942 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1943 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1944 yystate = yytable[yystate];
1946 yystate = yydefgoto[yyn - YYNTOKENS];
1951 /*------------------------------------.
1952 | yyerrlab -- here on detecting error |
1953 `------------------------------------*/
1955 /* If not already recovering from an error, report this error. */
1960 yyn = yypact[yystate];
1962 if (YYPACT_NINF < yyn && yyn < YYLAST)
1964 YYSIZE_T yysize = 0;
1965 int yytype = YYTRANSLATE (yychar);
1970 /* Start YYX at -YYN if negative to avoid negative indexes in
1972 for (yyx = yyn < 0 ? -yyn : 0;
1973 yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
1974 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1975 yysize += yystrlen (yytname[yyx]) + 15, yycount++;
1976 yysize += yystrlen ("syntax error, unexpected ") + 1;
1977 yysize += yystrlen (yytname[yytype]);
1978 yymsg = (char *) YYSTACK_ALLOC (yysize);
1981 char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
1982 yyp = yystpcpy (yyp, yytname[yytype]);
1987 for (yyx = yyn < 0 ? -yyn : 0;
1988 yyx < (int) (sizeof (yytname) / sizeof (char *));
1990 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1992 const char *yyq = ! yycount ? ", expecting " : " or ";
1993 yyp = yystpcpy (yyp, yyq);
1994 yyp = yystpcpy (yyp, yytname[yyx]);
1999 YYSTACK_FREE (yymsg);
2002 yyerror ("syntax error; also virtual memory exhausted");
2005 #endif /* YYERROR_VERBOSE */
2006 yyerror ("syntax error");
2011 if (yyerrstatus == 3)
2013 /* If just tried and failed to reuse lookahead token after an
2014 error, discard it. */
2016 /* Return failure if at end of input. */
2017 if (yychar == YYEOF)
2019 /* Pop the error token. */
2021 /* Pop the rest of the stack. */
2022 while (yyss < yyssp)
2024 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
2025 yydestruct (yystos[*yyssp], yyvsp);
2031 YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
2032 yydestruct (yytoken, &yylval);
2037 /* Else will try to reuse lookahead token after shifting the error
2042 /*----------------------------------------------------.
2043 | yyerrlab1 -- error raised explicitly by an action. |
2044 `----------------------------------------------------*/
2047 /* Suppress GCC warning that yyerrlab1 is unused when no action
2048 invokes YYERROR. Doesn't work in C++ */
2050 #if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__)
2051 __attribute__ ((__unused__))
2059 /*---------------------------------------------------------------.
2060 | yyerrlab2 -- pop states until the error token can be shifted. |
2061 `---------------------------------------------------------------*/
2063 yyerrstatus = 3; /* Each real token shifted decrements this. */
2067 yyn = yypact[yystate];
2068 if (yyn != YYPACT_NINF)
2071 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2079 /* Pop the current state because it cannot handle the error token. */
2083 YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
2084 yydestruct (yystos[yystate], yyvsp);
2088 YY_STACK_PRINT (yyss, yyssp);
2094 YYDPRINTF ((stderr, "Shifting error token, "));
2103 /*-------------------------------------.
2104 | yyacceptlab -- YYACCEPT comes here. |
2105 `-------------------------------------*/
2110 /*-----------------------------------.
2111 | yyabortlab -- YYABORT comes here. |
2112 `-----------------------------------*/
2118 /*----------------------------------------------.
2119 | yyoverflowlab -- parser overflow comes here. |
2120 `----------------------------------------------*/
2122 yyerror ("parser stack overflow");
2130 YYSTACK_FREE (yyss);
2136 #line 647 "m2-exp.y"
2144 return (MAX_OF_TYPE(builtin_type_m2_int) - b) < a;
2151 return (MAX_OF_TYPE(builtin_type_m2_card) - b) < a;
2155 /* Take care of parsing a number (anything that starts with a digit).
2156 Set yylval and return the token type; update lexptr.
2157 LEN is the number of characters in it. */
2159 /*** Needs some error checking for the float case ***/
2169 int base = input_radix;
2171 int unsigned_p = number_sign == 1 ? 1 : 0;
2178 else if(p[len-1] == 'C' || p[len-1] == 'B')
2181 ischar = p[len-1] == 'C';
2185 /* Scan the number */
2186 for (c = 0; c < len; c++)
2188 if (p[c] == '.' && base == 10)
2190 /* It's a float since it contains a point. */
2191 yylval.dval = atof (p);
2195 if (p[c] == '.' && base != 10)
2196 error("Floating point numbers must be base 10.");
2197 if (base == 10 && (p[c] < '0' || p[c] > '9'))
2198 error("Invalid digit \'%c\' in number.",p[c]);
2205 if( base == 8 && (c == '8' || c == '9'))
2206 error("Invalid digit \'%c\' in octal number.",c);
2207 if (c >= '0' && c <= '9')
2211 if (base == 16 && c >= 'A' && c <= 'F')
2219 if(!unsigned_p && number_sign == 1 && (prevn >= n))
2220 unsigned_p=1; /* Try something unsigned */
2221 /* Don't do the range check if n==i and i==0, since that special
2222 case will give an overflow error. */
2223 if(RANGE_CHECK && n!=i && i)
2225 if((unsigned_p && (unsigned)prevn >= (unsigned)n) ||
2226 ((!unsigned_p && number_sign==-1) && -prevn <= -n))
2227 range_error("Overflow on numeric constant.");
2233 if(*p == 'B' || *p == 'C' || *p == 'H')
2234 lexptr++; /* Advance past B,C or H */
2241 else if ( unsigned_p && number_sign == 1)
2246 else if((unsigned_p && (n<0))) {
2247 range_error("Overflow on numeric constant -- number too large.");
2248 /* But, this can return if range_check == range_warn. */
2263 { {'<', '>'}, NOTEQUAL },
2264 { {':', '='}, ASSIGN },
2265 { {'<', '='}, LEQ },
2266 { {'>', '='}, GEQ },
2267 { {':', ':'}, COLONCOLON },
2271 /* Some specific keywords */
2278 static struct keyword keytab[] =
2281 {"IN", IN },/* Note space after IN */
2282 {"AND", LOGICAL_AND},
2300 {"FLOAT", FLOAT_FUNC },
2305 /* Read one token, getting characters through lexptr. */
2307 /* This is where we will check to make sure that the language and the operators used are
2321 prev_lexptr = lexptr;
2326 /* See if it is a special token of length 2 */
2327 for( i = 0 ; i < (int) (sizeof tokentab2 / sizeof tokentab2[0]) ; i++)
2328 if(DEPRECATED_STREQN(tokentab2[i].name, tokstart, 2))
2331 return tokentab2[i].token;
2334 switch (c = *tokstart)
2351 if (paren_depth == 0)
2358 if (comma_terminates && paren_depth == 0)
2364 /* Might be a floating point number. */
2365 if (lexptr[1] >= '0' && lexptr[1] <= '9')
2366 break; /* Falls into number code. */
2373 /* These are character tokens that appear as-is in the YACC grammar */
2396 for (namelen = 1; (c = tokstart[namelen]) != quote && c != '\0'; namelen++)
2399 c = tokstart[++namelen];
2400 if (c >= '0' && c <= '9')
2402 c = tokstart[++namelen];
2403 if (c >= '0' && c <= '9')
2404 c = tokstart[++namelen];
2408 error("Unterminated string or character constant.");
2409 yylval.sval.ptr = tokstart + 1;
2410 yylval.sval.length = namelen - 1;
2411 lexptr += namelen + 1;
2413 if(namelen == 2) /* Single character */
2415 yylval.ulval = tokstart[1];
2422 /* Is it a number? */
2423 /* Note: We have already dealt with the case of the token '.'.
2424 See case '.' above. */
2425 if ((c >= '0' && c <= '9'))
2427 /* It's a number. */
2428 int got_dot = 0, got_e = 0;
2434 if (!got_e && (*p == 'e' || *p == 'E'))
2435 got_dot = got_e = 1;
2436 else if (!got_dot && *p == '.')
2438 else if (got_e && (p[-1] == 'e' || p[-1] == 'E')
2439 && (*p == '-' || *p == '+'))
2440 /* This is the sign of the exponent, not the end of the
2443 else if ((*p < '0' || *p > '9') &&
2444 (*p < 'A' || *p > 'F') &&
2445 (*p != 'H')) /* Modula-2 hexadecimal number */
2448 toktype = parse_number (p - tokstart);
2449 if (toktype == ERROR)
2451 char *err_copy = (char *) alloca (p - tokstart + 1);
2453 memcpy (err_copy, tokstart, p - tokstart);
2454 err_copy[p - tokstart] = 0;
2455 error ("Invalid number \"%s\".", err_copy);
2461 if (!(c == '_' || c == '$'
2462 || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')))
2463 /* We must have come across a bad character (e.g. ';'). */
2464 error ("Invalid character '%c' in expression.", c);
2466 /* It's a name. See how long it is. */
2468 for (c = tokstart[namelen];
2469 (c == '_' || c == '$' || (c >= '0' && c <= '9')
2470 || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
2471 c = tokstart[++namelen])
2474 /* The token "if" terminates the expression and is NOT
2475 removed from the input stream. */
2476 if (namelen == 2 && tokstart[0] == 'i' && tokstart[1] == 'f')
2483 /* Lookup special keywords */
2484 for(i = 0 ; i < (int) (sizeof(keytab) / sizeof(keytab[0])) ; i++)
2485 if(namelen == strlen(keytab[i].keyw) && DEPRECATED_STREQN(tokstart,keytab[i].keyw,namelen))
2486 return keytab[i].token;
2488 yylval.sval.ptr = tokstart;
2489 yylval.sval.length = namelen;
2491 if (*tokstart == '$')
2493 write_dollar_variable (yylval.sval);
2494 return INTERNAL_VAR;
2497 /* Use token-type BLOCKNAME for symbols that happen to be defined as
2498 functions. If this is not so, then ...
2499 Use token-type TYPENAME for symbols that happen to be defined
2500 currently as names of types; NAME for other symbols.
2501 The caller is not constrained to care about the distinction. */
2505 char *tmp = copy_name (yylval.sval);
2508 if (lookup_partial_symtab (tmp))
2510 sym = lookup_symbol (tmp, expression_context_block,
2511 VAR_DOMAIN, 0, NULL);
2512 if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK)
2514 if (lookup_typename (copy_name (yylval.sval), expression_context_block, 1))
2526 case LOC_REGPARM_ADDR:
2530 case LOC_BASEREG_ARG:
2532 case LOC_CONST_BYTES:
2533 case LOC_OPTIMIZED_OUT:
2535 case LOC_COMPUTED_ARG:
2545 error("internal: Undefined class in m2lex()");
2548 case LOC_UNRESOLVED:
2549 error("internal: Unforseen case in m2lex()");
2552 error ("unhandled token in m2lex()");
2558 /* Built-in BOOLEAN type. This is sort of a hack. */
2559 if(DEPRECATED_STREQN(tokstart,"TRUE",4))
2564 else if(DEPRECATED_STREQN(tokstart,"FALSE",5))
2571 /* Must be another type of name... */
2578 make_qualname(mod,ident)
2581 char *new = xmalloc(strlen(mod)+strlen(ident)+2);
2595 lexptr = prev_lexptr;
2597 error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr);