From: Aidan Skinner Date: Sun, 30 Jun 2002 22:04:33 +0000 (+0000) Subject: Remove ada-lex.c and ada-exp.tab.c as they are generated files X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b372fff90f67bc94e5dfa044f23ce0b552168f6;p=binutils-gdb.git Remove ada-lex.c and ada-exp.tab.c as they are generated files --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3da11ad8a30..87b12fed9f7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-06-30 Aidan Skinner + + * ada-exp.tab.c: remove as it's a generated file + * ada-lex.c: remove as it's a generated file + 2002-06-30 Mark Kettenis * config/i386/tm-i386.h (struct frame_info, struct diff --git a/gdb/ada-exp.tab.c b/gdb/ada-exp.tab.c deleted file mode 100644 index bb6d29bf276..00000000000 --- a/gdb/ada-exp.tab.c +++ /dev/null @@ -1,2389 +0,0 @@ -/* A Bison parser, made from ./ada-exp.y - by GNU bison 1.35. */ - -#define YYBISON 1 /* Identify Bison output. */ - -# define INT 257 -# define NULL_PTR 258 -# define CHARLIT 259 -# define FLOAT 260 -# define TYPENAME 261 -# define BLOCKNAME 262 -# define STRING 263 -# define NAME 264 -# define DOT_ID 265 -# define OBJECT_RENAMING 266 -# define DOT_ALL 267 -# define LAST 268 -# define REGNAME 269 -# define INTERNAL_VARIABLE 270 -# define ASSIGN 271 -# define _AND_ 272 -# define OR 273 -# define XOR 274 -# define THEN 275 -# define ELSE 276 -# define NOTEQUAL 277 -# define LEQ 278 -# define GEQ 279 -# define IN 280 -# define DOTDOT 281 -# define UNARY 282 -# define MOD 283 -# define REM 284 -# define STARSTAR 285 -# define ABS 286 -# define NOT 287 -# define TICK_ACCESS 288 -# define TICK_ADDRESS 289 -# define TICK_FIRST 290 -# define TICK_LAST 291 -# define TICK_LENGTH 292 -# define TICK_MAX 293 -# define TICK_MIN 294 -# define TICK_MODULUS 295 -# define TICK_POS 296 -# define TICK_RANGE 297 -# define TICK_SIZE 298 -# define TICK_TAG 299 -# define TICK_VAL 300 -# define ARROW 301 -# define NEW 302 - -#line 38 "./ada-exp.y" - - -#include "defs.h" -#include -#include -#include "expression.h" -#include "value.h" -#include "parser-defs.h" -#include "language.h" -#include "ada-lang.h" -#include "bfd.h" /* Required by objfiles.h. */ -#include "symfile.h" /* Required by objfiles.h. */ -#include "objfiles.h" /* For have_full_symbols and have_partial_symbols */ -#include "frame.h" - -/* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc), - as well as gratuitiously global symbol names, so we can have multiple - yacc generated parsers in gdb. These are only the variables - produced by yacc. If other parser generators (bison, byacc, etc) produce - additional global names that conflict at link time, then those parser - generators need to be fixed instead of adding those names to this list. */ - -/* NOTE: This is clumsy, especially since BISON and FLEX provide --prefix - options. I presume we are maintaining it to accommodate systems - without BISON? (PNH) */ - -#define yymaxdepth ada_maxdepth -#define yyparse _ada_parse /* ada_parse calls this after initialization */ -#define yylex ada_lex -#define yyerror ada_error -#define yylval ada_lval -#define yychar ada_char -#define yydebug ada_debug -#define yypact ada_pact -#define yyr1 ada_r1 -#define yyr2 ada_r2 -#define yydef ada_def -#define yychk ada_chk -#define yypgo ada_pgo -#define yyact ada_act -#define yyexca ada_exca -#define yyerrflag ada_errflag -#define yynerrs ada_nerrs -#define yyps ada_ps -#define yypv ada_pv -#define yys ada_s -#define yy_yys ada_yys -#define yystate ada_state -#define yytmp ada_tmp -#define yyv ada_v -#define yy_yyv ada_yyv -#define yyval ada_val -#define yylloc ada_lloc -#define yyreds ada_reds /* With YYDEBUG defined */ -#define yytoks ada_toks /* With YYDEBUG defined */ - -#ifndef YYDEBUG -#define YYDEBUG 0 /* Default to no yydebug support */ -#endif - -struct name_info { - struct symbol* sym; - struct minimal_symbol* msym; - struct block* block; - struct stoken stoken; -}; - -/* If expression is in the context of TYPE'(...), then TYPE, else - * NULL. */ -static struct type* type_qualifier; - -int yyparse (void); - -static int yylex (void); - -void yyerror (char *); - -static struct stoken string_to_operator (struct stoken); - -static void write_attribute_call0 (enum ada_attribute); - -static void write_attribute_call1 (enum ada_attribute, LONGEST); - -static void write_attribute_calln (enum ada_attribute, int); - -static void write_object_renaming (struct block*, struct symbol*); - -static void write_var_from_name (struct block*, struct name_info); - -static LONGEST -convert_char_literal (struct type*, LONGEST); - -#line 131 "./ada-exp.y" -#ifndef YYSTYPE -typedef union - { - LONGEST lval; - struct { - LONGEST val; - struct type *type; - } typed_val; - struct { - DOUBLEST dval; - struct type *type; - } typed_val_float; - struct type *tval; - struct stoken sval; - struct name_info ssym; - int voidval; - struct block *bval; - struct internalvar *ivar; - - } yystype; -# define YYSTYPE yystype -# define YYSTYPE_IS_TRIVIAL 1 -#endif -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - - - -#define YYFINAL 184 -#define YYFLAG -32768 -#define YYNTBASE 68 - -/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ -#define YYTRANSLATE(x) ((unsigned)(x) <= 302 ? yytranslate[x] : 82) - -/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ -static const char yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 34, 63, - 57, 62, 36, 32, 64, 33, 56, 37, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 61, - 25, 23, 26, 2, 31, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 58, 2, 67, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 65, 2, 66, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 24, 27, 28, - 29, 30, 35, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 59, 60 -}; - -#if YYDEBUG -static const short yyprhs[] = -{ - 0, 0, 2, 4, 6, 10, 13, 16, 21, 26, - 27, 35, 36, 43, 47, 49, 51, 53, 55, 57, - 61, 64, 67, 70, 73, 74, 76, 80, 84, 90, - 95, 99, 103, 107, 111, 115, 119, 123, 127, 131, - 135, 139, 143, 149, 155, 159, 166, 173, 178, 182, - 186, 190, 194, 199, 203, 208, 212, 215, 218, 222, - 226, 230, 233, 236, 244, 252, 258, 262, 266, 270, - 276, 279, 280, 284, 286, 288, 289, 291, 293, 295, - 297, 299, 302, 304, 307, 309, 312, 314, 316, 318, - 320, 323, 325, 328, 331, 335, 338, 341 -}; -static const short yyrhs[] = -{ - 69, 0, 81, 0, 73, 0, 69, 61, 73, 0, - 70, 13, 0, 70, 11, 0, 70, 57, 74, 62, - 0, 81, 57, 73, 62, 0, 0, 81, 63, 72, - 71, 57, 73, 62, 0, 0, 70, 57, 73, 30, - 73, 62, 0, 57, 69, 62, 0, 78, 0, 15, - 0, 16, 0, 70, 0, 14, 0, 73, 17, 73, - 0, 33, 73, 0, 32, 73, 0, 42, 73, 0, - 41, 73, 0, 0, 73, 0, 79, 59, 73, 0, - 74, 64, 73, 0, 74, 64, 79, 59, 73, 0, - 65, 81, 66, 73, 0, 73, 40, 73, 0, 73, - 36, 73, 0, 73, 37, 73, 0, 73, 39, 73, - 0, 73, 38, 73, 0, 73, 31, 73, 0, 73, - 32, 73, 0, 73, 34, 73, 0, 73, 33, 73, - 0, 73, 23, 73, 0, 73, 24, 73, 0, 73, - 27, 73, 0, 73, 29, 73, 30, 73, 0, 73, - 29, 73, 52, 75, 0, 73, 29, 7, 0, 73, - 42, 29, 73, 30, 73, 0, 73, 42, 29, 73, - 52, 75, 0, 73, 42, 29, 7, 0, 73, 28, - 73, 0, 73, 25, 73, 0, 73, 26, 73, 0, - 73, 18, 73, 0, 73, 18, 21, 73, 0, 73, - 19, 73, 0, 73, 19, 22, 73, 0, 73, 20, - 73, 0, 70, 43, 0, 70, 44, 0, 70, 45, - 75, 0, 70, 46, 75, 0, 70, 47, 75, 0, - 70, 53, 0, 70, 54, 0, 77, 49, 57, 73, - 64, 73, 62, 0, 77, 48, 57, 73, 64, 73, - 62, 0, 77, 51, 57, 73, 62, 0, 76, 45, - 75, 0, 76, 46, 75, 0, 76, 47, 75, 0, - 76, 55, 57, 73, 62, 0, 76, 50, 0, 0, - 57, 3, 62, 0, 7, 0, 76, 0, 0, 3, - 0, 5, 0, 6, 0, 4, 0, 9, 0, 60, - 7, 0, 10, 0, 80, 10, 0, 12, 0, 80, - 12, 0, 10, 0, 7, 0, 12, 0, 8, 0, - 80, 8, 0, 7, 0, 80, 7, 0, 7, 43, - 0, 80, 7, 43, 0, 36, 73, 0, 34, 73, - 0, 73, 58, 73, 67, 0 -}; - -#endif - -#if YYDEBUG -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const short yyrline[] = -{ - 0, 203, 204, 210, 211, 216, 220, 227, 235, 243, - 243, 254, 256, 261, 264, 267, 274, 282, 285, 292, - 296, 300, 304, 308, 312, 315, 317, 319, 321, 325, - 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, - 375, 379, 383, 387, 393, 400, 405, 413, 423, 427, - 431, 435, 439, 443, 447, 451, 455, 457, 463, 465, - 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, - 487, 491, 493, 497, 504, 506, 513, 521, 533, 541, - 548, 575, 579, 580, 582, 583, 587, 588, 589, 592, - 594, 599, 600, 601, 603, 610, 612, 614 -}; -#endif - - -#if (YYDEBUG) || defined YYERROR_VERBOSE - -/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ -static const char *const yytname[] = -{ - "$", "error", "$undefined.", "INT", "NULL_PTR", "CHARLIT", "FLOAT", - "TYPENAME", "BLOCKNAME", "STRING", "NAME", "DOT_ID", "OBJECT_RENAMING", - "DOT_ALL", "LAST", "REGNAME", "INTERNAL_VARIABLE", "ASSIGN", "_AND_", - "OR", "XOR", "THEN", "ELSE", "'='", "NOTEQUAL", "'<'", "'>'", "LEQ", - "GEQ", "IN", "DOTDOT", "'@'", "'+'", "'-'", "'&'", "UNARY", "'*'", - "'/'", "MOD", "REM", "STARSTAR", "ABS", "NOT", "TICK_ACCESS", - "TICK_ADDRESS", "TICK_FIRST", "TICK_LAST", "TICK_LENGTH", "TICK_MAX", - "TICK_MIN", "TICK_MODULUS", "TICK_POS", "TICK_RANGE", "TICK_SIZE", - "TICK_TAG", "TICK_VAL", "'.'", "'('", "'['", "ARROW", "NEW", "';'", - "')'", "'\\''", "','", "'{'", "'}'", "']'", "start", "exp1", - "simple_exp", "@1", "save_qualifier", "exp", "arglist", "tick_arglist", - "type_prefix", "opt_type_prefix", "variable", "any_name", "block", - "type", 0 -}; -#endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const short yyr1[] = -{ - 0, 68, 68, 69, 69, 70, 70, 70, 70, 71, - 70, 72, 70, 70, 70, 70, 70, 73, 70, 73, - 73, 73, 73, 73, 74, 74, 74, 74, 74, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, - 73, 73, 73, 73, 73, 73, 70, 70, 70, 70, - 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, - 70, 75, 75, 76, 77, 77, 73, 73, 73, 73, - 73, 73, 78, 78, 78, 78, 79, 79, 79, 80, - 80, 81, 81, 81, 81, 73, 73, 73 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const short yyr2[] = -{ - 0, 1, 1, 1, 3, 2, 2, 4, 4, 0, - 7, 0, 6, 3, 1, 1, 1, 1, 1, 3, - 2, 2, 2, 2, 0, 1, 3, 3, 5, 4, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 5, 5, 3, 6, 6, 4, 3, 3, - 3, 3, 4, 3, 4, 3, 2, 2, 3, 3, - 3, 2, 2, 7, 7, 5, 3, 3, 3, 5, - 2, 0, 3, 1, 1, 0, 1, 1, 1, 1, - 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, - 2, 1, 2, 2, 3, 2, 2, 4 -}; - -/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE - doesn't specify something else to do. Zero means the default is an - error. */ -static const short yydefact[] = -{ - 75, 76, 79, 77, 78, 73, 89, 80, 82, 84, - 18, 15, 16, 75, 75, 75, 75, 75, 75, 75, - 0, 0, 1, 17, 3, 74, 0, 14, 0, 2, - 93, 21, 0, 20, 96, 95, 23, 22, 0, 81, - 91, 0, 0, 75, 6, 5, 56, 57, 71, 71, - 71, 61, 62, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 75, 75, - 75, 75, 75, 75, 0, 75, 71, 71, 71, 70, - 0, 0, 0, 0, 92, 90, 83, 85, 75, 11, - 13, 75, 4, 0, 58, 59, 60, 73, 82, 84, - 25, 0, 0, 19, 75, 51, 75, 53, 55, 39, - 40, 49, 50, 41, 48, 44, 0, 35, 36, 38, - 37, 31, 32, 34, 33, 30, 75, 0, 66, 67, - 68, 75, 75, 75, 75, 94, 0, 9, 29, 0, - 75, 7, 75, 75, 52, 54, 75, 71, 47, 0, - 97, 0, 0, 0, 0, 8, 0, 72, 0, 27, - 0, 26, 42, 43, 75, 71, 69, 75, 75, 65, - 75, 12, 75, 45, 46, 0, 0, 0, 28, 64, - 63, 10, 0, 0, 0 -}; - -static const short yydefgoto[] = -{ - 182, 22, 23, 156, 137, 24, 101, 94, 25, 26, - 27, 102, 28, 32 -}; - -static const short yypact[] = -{ - 251,-32768,-32768,-32768,-32768, 20,-32768,-32768,-32768,-32768, - -32768,-32768,-32768, 251, 251, 251, 251, 251, 251, 251, - 2, 79, -47, 53, 958, -23, 54,-32768, 104, -32, - -32768, 31, -32, 31, -22, -22, 31, 31, 33,-32768, - -5, 101, -27, 251,-32768,-32768,-32768,-32768, 4, 4, - 4,-32768,-32768, 131, 251, 171, 211, 251, 251, 251, - 251, 251, 251, 251, 291, 251, 251, 251, 251, 251, - 251, 251, 251, 251, 47, 251, 4, 4, 4,-32768, - 23, 25, 27, 35, 45,-32768,-32768,-32768, 251,-32768, - -32768, 251, 958, 98,-32768,-32768,-32768, 22, 56, 58, - 930, -36, 64, 986, 251, 1009, 251, 1009, 1009, -21, - -21, -21, -21, -21, -21, 534, 858, 387, 31, 31, - 31, 32, 32, 32, 32, 32, 331, 415,-32768,-32768, - -32768, 251, 251, 251, 251,-32768, 536,-32768, -22, 62, - 251,-32768, 371, 251, 1009, 1009, 251, 4, 534, 894, - -32768, 582, 452, 494, 628,-32768, 68,-32768, 674, 958, - 67, 958, -21,-32768, 251, 4,-32768, 251, 251,-32768, - 251,-32768, 251, -21,-32768, 720, 766, 812, 958,-32768, - -32768,-32768, 128, 132,-32768 -}; - -static const short yypgoto[] = -{ - -32768, 112,-32768,-32768,-32768, -13,-32768, -43,-32768,-32768, - -32768, 0, 123, 8 -}; - - -#define YYLAST 1067 - - -static const short yytable[] = -{ - 31, 33, 34, 35, 36, 37, 95, 96, 29, 39, - 65, 66, 67, 68, 43, 69, 70, 71, 72, 73, - -91, 74, 76, 77, 78, 88, 141, 79, 142, 42, - 92, 89, 80, 128, 129, 130, 75, 75, 30, 91, - 100, 103, 105, 107, 108, 109, 110, 111, 112, 113, - 114, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 93, 127, 30, 44, 30, 45, 69, 70, 71, - 72, 73, 73, 74, 74, 136, 126, -91, 138, -91, - 131, -87, 132, -91, 133, -91, 40, 6, 135, 75, - 75, 144, 134, 145, 43, 90, 46, 47, 48, 49, - 50, 139, 81, 82, 163, 83, 51, 52, 84, 85, - 53, 84, 85, 149, 86, -86, 87, -88, 151, 152, - 153, 154, 174, 143, 157, 170, 172, 158, 183, 159, - 161, 38, 184, 162, 1, 2, 3, 4, 97, 6, - 7, 98, 160, 99, 41, 10, 11, 12, 0, 0, - 0, 173, 0, 0, 175, 176, 0, 177, 0, 178, - 0, 0, 0, 13, 14, 15, 0, 16, 0, 0, - 0, 0, 17, 18, 1, 2, 3, 4, 5, 6, - 7, 8, 0, 9, 0, 10, 11, 12, 19, 0, - 0, 20, 104, -24, 0, -24, 21, 0, 0, 0, - 0, 0, 0, 13, 14, 15, 0, 16, 0, 0, - 0, 0, 17, 18, 1, 2, 3, 4, 5, 6, - 7, 8, 0, 9, 0, 10, 11, 12, 19, 0, - 0, 20, 0, 106, 0, 0, 21, 0, 0, 0, - 0, 0, 0, 13, 14, 15, 0, 16, 0, 0, - 0, 0, 17, 18, 1, 2, 3, 4, 5, 6, - 7, 8, 0, 9, 0, 10, 11, 12, 19, 0, - 0, 20, 0, 0, 0, 0, 21, 0, 0, 0, - 0, 0, 0, 13, 14, 15, 0, 16, 0, 0, - 0, 0, 17, 18, 1, 2, 3, 4, 115, 6, - 7, 8, 0, 9, 0, 10, 11, 12, 19, 0, - 0, 20, 0, 0, 0, 0, 21, 0, 0, 0, - 0, 0, 0, 13, 14, 15, 0, 16, 0, 0, - 0, 0, 17, 18, 1, 2, 3, 4, 148, 6, - 7, 8, 0, 9, 0, 10, 11, 12, 19, 0, - 0, 20, 0, 0, 0, 0, 21, 0, 0, 0, - 0, 0, 0, 13, 14, 15, 0, 16, 0, 0, - 0, 0, 17, 18, 1, 2, 3, 4, 97, 6, - 7, 98, 0, 99, 0, 10, 11, 12, 19, 0, - 0, 20, 0, 0, 0, 0, 21, 0, 0, 0, - 0, 0, 0, 13, 14, 15, 0, 16, 0, 0, - 0, 0, 17, 18, 0, 0, 0, 0, 0, 66, - 67, 68, 0, 69, 70, 71, 72, 73, 19, 74, - 0, 20, 54, 55, 56, 57, 21, 0, 58, 59, - 60, 61, 62, 63, 64, 75, 65, 66, 67, 68, - 0, 69, 70, 71, 72, 73, 0, 74, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, - 55, 56, 57, 75, 0, 58, 59, 60, 61, 62, - 63, 64, 150, 65, 66, 67, 68, 0, 69, 70, - 71, 72, 73, 0, 74, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 75, 54, 55, 56, 57, 0, 167, 58, 59, 60, - 61, 62, 63, 64, 0, 65, 66, 67, 68, 0, - 69, 70, 71, 72, 73, 0, 74, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 75, 54, 55, 56, 57, 0, 168, 58, - 59, 60, 61, 62, 63, 64, 0, 65, 66, 67, - 68, 0, 69, 70, 71, 72, 73, 30, 74, -73, - -73, -73, -73, -73, -73, -73, 0, 0, 0, -73, - 0, -91, 0, 0, 75, 0, 0, -91, 155, 54, - 55, 56, 57, 0, 0, 58, 59, 60, 61, 62, - 63, 64, 0, 65, 66, 67, 68, 0, 69, 70, - 71, 72, 73, 0, 74, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 75, 0, 0, 0, 166, 54, 55, 56, 57, 0, - 0, 58, 59, 60, 61, 62, 63, 64, 0, 65, - 66, 67, 68, 0, 69, 70, 71, 72, 73, 0, - 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 75, 0, 0, 0, - 169, 54, 55, 56, 57, 0, 0, 58, 59, 60, - 61, 62, 63, 64, 0, 65, 66, 67, 68, 0, - 69, 70, 71, 72, 73, 0, 74, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 75, 0, 0, 0, 171, 54, 55, 56, - 57, 0, 0, 58, 59, 60, 61, 62, 63, 64, - 0, 65, 66, 67, 68, 0, 69, 70, 71, 72, - 73, 0, 74, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 75, 0, - 0, 0, 179, 54, 55, 56, 57, 0, 0, 58, - 59, 60, 61, 62, 63, 64, 0, 65, 66, 67, - 68, 0, 69, 70, 71, 72, 73, 0, 74, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 75, 0, 0, 0, 180, 54, - 55, 56, 57, 0, 0, 58, 59, 60, 61, 62, - 63, 64, 0, 65, 66, 67, 68, 0, 69, 70, - 71, 72, 73, 0, 74, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 75, 0, 0, 0, 181, 54, 55, 56, 57, 0, - 0, 58, 59, 60, 61, 62, 63, 64, 146, 65, - 66, 67, 68, 0, 69, 70, 71, 72, 73, 0, - 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 147, 54, 55, 56, 57, 0, 75, 58, 59, 60, - 61, 62, 63, 64, 164, 65, 66, 67, 68, 0, - 69, 70, 71, 72, 73, 0, 74, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 165, 54, 55, 56, - 57, 0, 75, 58, 59, 60, 61, 62, 63, 64, - 140, 65, 66, 67, 68, 0, 69, 70, 71, 72, - 73, 0, 74, 0, 0, 54, 55, 56, 57, 0, - 0, 58, 59, 60, 61, 62, 63, 64, 75, 65, - 66, 67, 68, 0, 69, 70, 71, 72, 73, 0, - 74, 0, 0,-32768, 55, 56, 57, 0, 0, 58, - 59, 60, 61, 62, 63, 64, 75, 65, 66, 67, - 68, 0, 69, 70, 71, 72, 73, 0, 74, 0, - 0, 0, 58, 59, 60, 61, 62, 63, 64, 0, - 65, 66, 67, 68, 75, 69, 70, 71, 72, 73, - 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 75 -}; - -static const short yycheck[] = -{ - 13, 14, 15, 16, 17, 18, 49, 50, 0, 7, - 31, 32, 33, 34, 61, 36, 37, 38, 39, 40, - 0, 42, 45, 46, 47, 57, 62, 50, 64, 21, - 43, 63, 55, 76, 77, 78, 58, 58, 43, 66, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 57, 75, 43, 11, 43, 13, 36, 37, 38, - 39, 40, 40, 42, 42, 88, 29, 57, 91, 57, - 57, 59, 57, 63, 57, 63, 7, 8, 43, 58, - 58, 104, 57, 106, 61, 62, 43, 44, 45, 46, - 47, 3, 48, 49, 147, 51, 53, 54, 7, 8, - 57, 7, 8, 126, 10, 59, 12, 59, 131, 132, - 133, 134, 165, 59, 62, 57, 59, 140, 0, 142, - 143, 19, 0, 146, 3, 4, 5, 6, 7, 8, - 9, 10, 142, 12, 21, 14, 15, 16, -1, -1, - -1, 164, -1, -1, 167, 168, -1, 170, -1, 172, - -1, -1, -1, 32, 33, 34, -1, 36, -1, -1, - -1, -1, 41, 42, 3, 4, 5, 6, 7, 8, - 9, 10, -1, 12, -1, 14, 15, 16, 57, -1, - -1, 60, 21, 62, -1, 64, 65, -1, -1, -1, - -1, -1, -1, 32, 33, 34, -1, 36, -1, -1, - -1, -1, 41, 42, 3, 4, 5, 6, 7, 8, - 9, 10, -1, 12, -1, 14, 15, 16, 57, -1, - -1, 60, -1, 22, -1, -1, 65, -1, -1, -1, - -1, -1, -1, 32, 33, 34, -1, 36, -1, -1, - -1, -1, 41, 42, 3, 4, 5, 6, 7, 8, - 9, 10, -1, 12, -1, 14, 15, 16, 57, -1, - -1, 60, -1, -1, -1, -1, 65, -1, -1, -1, - -1, -1, -1, 32, 33, 34, -1, 36, -1, -1, - -1, -1, 41, 42, 3, 4, 5, 6, 7, 8, - 9, 10, -1, 12, -1, 14, 15, 16, 57, -1, - -1, 60, -1, -1, -1, -1, 65, -1, -1, -1, - -1, -1, -1, 32, 33, 34, -1, 36, -1, -1, - -1, -1, 41, 42, 3, 4, 5, 6, 7, 8, - 9, 10, -1, 12, -1, 14, 15, 16, 57, -1, - -1, 60, -1, -1, -1, -1, 65, -1, -1, -1, - -1, -1, -1, 32, 33, 34, -1, 36, -1, -1, - -1, -1, 41, 42, 3, 4, 5, 6, 7, 8, - 9, 10, -1, 12, -1, 14, 15, 16, 57, -1, - -1, 60, -1, -1, -1, -1, 65, -1, -1, -1, - -1, -1, -1, 32, 33, 34, -1, 36, -1, -1, - -1, -1, 41, 42, -1, -1, -1, -1, -1, 32, - 33, 34, -1, 36, 37, 38, 39, 40, 57, 42, - -1, 60, 17, 18, 19, 20, 65, -1, 23, 24, - 25, 26, 27, 28, 29, 58, 31, 32, 33, 34, - -1, 36, 37, 38, 39, 40, -1, 42, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 17, - 18, 19, 20, 58, -1, 23, 24, 25, 26, 27, - 28, 29, 67, 31, 32, 33, 34, -1, 36, 37, - 38, 39, 40, -1, 42, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 58, 17, 18, 19, 20, -1, 64, 23, 24, 25, - 26, 27, 28, 29, -1, 31, 32, 33, 34, -1, - 36, 37, 38, 39, 40, -1, 42, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 58, 17, 18, 19, 20, -1, 64, 23, - 24, 25, 26, 27, 28, 29, -1, 31, 32, 33, - 34, -1, 36, 37, 38, 39, 40, 43, 42, 45, - 46, 47, 48, 49, 50, 51, -1, -1, -1, 55, - -1, 57, -1, -1, 58, -1, -1, 63, 62, 17, - 18, 19, 20, -1, -1, 23, 24, 25, 26, 27, - 28, 29, -1, 31, 32, 33, 34, -1, 36, 37, - 38, 39, 40, -1, 42, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 58, -1, -1, -1, 62, 17, 18, 19, 20, -1, - -1, 23, 24, 25, 26, 27, 28, 29, -1, 31, - 32, 33, 34, -1, 36, 37, 38, 39, 40, -1, - 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 58, -1, -1, -1, - 62, 17, 18, 19, 20, -1, -1, 23, 24, 25, - 26, 27, 28, 29, -1, 31, 32, 33, 34, -1, - 36, 37, 38, 39, 40, -1, 42, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 58, -1, -1, -1, 62, 17, 18, 19, - 20, -1, -1, 23, 24, 25, 26, 27, 28, 29, - -1, 31, 32, 33, 34, -1, 36, 37, 38, 39, - 40, -1, 42, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 58, -1, - -1, -1, 62, 17, 18, 19, 20, -1, -1, 23, - 24, 25, 26, 27, 28, 29, -1, 31, 32, 33, - 34, -1, 36, 37, 38, 39, 40, -1, 42, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 58, -1, -1, -1, 62, 17, - 18, 19, 20, -1, -1, 23, 24, 25, 26, 27, - 28, 29, -1, 31, 32, 33, 34, -1, 36, 37, - 38, 39, 40, -1, 42, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 58, -1, -1, -1, 62, 17, 18, 19, 20, -1, - -1, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, -1, 36, 37, 38, 39, 40, -1, - 42, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 52, 17, 18, 19, 20, -1, 58, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, -1, - 36, 37, 38, 39, 40, -1, 42, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 52, 17, 18, 19, - 20, -1, 58, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, -1, 36, 37, 38, 39, - 40, -1, 42, -1, -1, 17, 18, 19, 20, -1, - -1, 23, 24, 25, 26, 27, 28, 29, 58, 31, - 32, 33, 34, -1, 36, 37, 38, 39, 40, -1, - 42, -1, -1, 17, 18, 19, 20, -1, -1, 23, - 24, 25, 26, 27, 28, 29, 58, 31, 32, 33, - 34, -1, 36, 37, 38, 39, 40, -1, 42, -1, - -1, -1, 23, 24, 25, 26, 27, 28, 29, -1, - 31, 32, 33, 34, 58, 36, 37, 38, 39, 40, - -1, 42, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 58 -}; -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/local/share/bison/bison.simple" - -/* Skeleton output parser for bison, - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* This is the parser code that is written into each bison parser when - the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) - -/* The parser invokes alloca or xmalloc; define the necessary symbols. */ - -# if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# else -# ifndef YYSTACK_USE_ALLOCA -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -# define YYSTACK_ALLOC xmalloc -# define YYSTACK_FREE free -# endif -#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ - - -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - short yyss; - YYSTYPE yyvs; -# if YYLSP_NEEDED - YYLTYPE yyls; -# endif -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# if YYLSP_NEEDED -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAX) -# else -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAX) -# endif - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - register YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (0) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - - -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 -#define YYEOF 0 -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ -#define YYFAIL goto yyerrlab -#define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror ("syntax error: cannot back up"); \ - YYERROR; \ - } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). - - When YYLLOC_DEFAULT is run, CURRENT is set the location of the - first token. By default, to implement support for ranges, extend - its range to the last symbol. */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - Current.last_line = Rhs[N].last_line; \ - Current.last_column = Rhs[N].last_column; -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#if YYPURE -# if YYLSP_NEEDED -# ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -# else -# define YYLEX yylex (&yylval, &yylloc) -# endif -# else /* !YYLSP_NEEDED */ -# ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -# else -# define YYLEX yylex (&yylval) -# endif -# endif /* !YYLSP_NEEDED */ -#else /* !YYPURE */ -# define YYLEX yylex () -#endif /* !YYPURE */ - - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -#endif /* !YYDEBUG */ - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#if YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - -#ifdef YYERROR_VERBOSE - -# ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) -yystrlen (const char *yystr) -# else -yystrlen (yystr) - const char *yystr; -# endif -{ - register const char *yys = yystr; - - while (*yys++ != '\0') - continue; - - return yys - yystr - 1; -} -# endif -# endif - -# ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -# if defined (__STDC__) || defined (__cplusplus) -yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif -{ - register char *yyd = yydest; - register const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif -#endif - -#line 315 "/usr/local/share/bison/bison.simple" - - -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM -# define YYPARSE_PARAM_DECL -# else -# define YYPARSE_PARAM_ARG YYPARSE_PARAM -# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -# endif -#else /* !YYPARSE_PARAM */ -# define YYPARSE_PARAM_ARG -# define YYPARSE_PARAM_DECL -#endif /* !YYPARSE_PARAM */ - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -# ifdef YYPARSE_PARAM -int yyparse (void *); -# else -int yyparse (void); -# endif -#endif - -/* YY_DECL_VARIABLES -- depending whether we use a pure parser, - variables are global, or local to YYPARSE. */ - -#define YY_DECL_NON_LSP_VARIABLES \ -/* The lookahead symbol. */ \ -int yychar; \ - \ -/* The semantic value of the lookahead symbol. */ \ -YYSTYPE yylval; \ - \ -/* Number of parse errors so far. */ \ -int yynerrs; - -#if YYLSP_NEEDED -# define YY_DECL_VARIABLES \ -YY_DECL_NON_LSP_VARIABLES \ - \ -/* Location data for the lookahead symbol. */ \ -YYLTYPE yylloc; -#else -# define YY_DECL_VARIABLES \ -YY_DECL_NON_LSP_VARIABLES -#endif - - -/* If nonreentrant, generate the variables here. */ - -#if !YYPURE -YY_DECL_VARIABLES -#endif /* !YYPURE */ - -int -yyparse (YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL -{ - /* If reentrant, generate the variables here. */ -#if YYPURE - YY_DECL_VARIABLES -#endif /* !YYPURE */ - - register int yystate; - register int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yychar1 = 0; - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to xreallocate them elsewhere. */ - - /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; - register short *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; - -#if YYLSP_NEEDED - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; -#endif - -#if YYLSP_NEEDED -# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -#else -# define YYPOPSTACK (yyvsp--, yyssp--) -#endif - - YYSIZE_T yystacksize = YYINITDEPTH; - - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; -#if YYLSP_NEEDED - YYLTYPE yyloc; -#endif - - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; -#if YYLSP_NEEDED - yylsp = yyls; -#endif - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyssp >= yyss + yystacksize - 1) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to xreallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. */ -# if YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - yyls = yyls1; -# else - yyoverflow ("parser stack overflow", - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yystacksize); -# endif - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyoverflowlab; -# else - /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - goto yyoverflowlab; - yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) - yystacksize = YYMAXDEPTH; - - { - short *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); -# if YYLSP_NEEDED - YYSTACK_RELOCATE (yyls); -# endif -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; -#if YYLSP_NEEDED - yylsp = yyls + yysize - 1; -#endif - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyssp >= yyss + yystacksize - 1) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ - - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ - { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yychar1 = YYTRANSLATE (yychar); - -#if YYDEBUG - /* We have to keep this `#if YYDEBUG', since we use variables - which are defined only if `YYDEBUG' is set. */ - if (yydebug) - { - YYFPRINTF (stderr, "Next token is %d (%s", - yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise - meaning of a token, for further debugging info. */ -# ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -# endif - YYFPRINTF (stderr, ")\n"); - } -#endif - } - - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) - goto yydefault; - - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrlab; - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %d (%s), ", - yychar, yytname[yychar1])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; -#if YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - yystate = yyn; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to the semantic value of - the lookahead token. This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - -#if YYLSP_NEEDED - /* Similarly for the default location. Let the user run additional - commands if for instance locations are ranges. */ - yyloc = yylsp[1-yylen]; - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); -#endif - -#if YYDEBUG - /* We have to keep this `#if YYDEBUG', since we use variables which - are defined only if `YYDEBUG' is set. */ - if (yydebug) - { - int yyi; - - YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); - YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif - - switch (yyn) { - -case 2: -#line 204 "./ada-exp.y" -{ write_exp_elt_opcode (OP_TYPE); - write_exp_elt_type (yyvsp[0].tval); - write_exp_elt_opcode (OP_TYPE); } - break; -case 4: -#line 212 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_COMMA); } - break; -case 5: -#line 217 "./ada-exp.y" -{ write_exp_elt_opcode (UNOP_IND); } - break; -case 6: -#line 221 "./ada-exp.y" -{ write_exp_elt_opcode (STRUCTOP_STRUCT); - write_exp_string (yyvsp[0].ssym.stoken); - write_exp_elt_opcode (STRUCTOP_STRUCT); - } - break; -case 7: -#line 228 "./ada-exp.y" -{ - write_exp_elt_opcode (OP_FUNCALL); - write_exp_elt_longcst (yyvsp[-1].lval); - write_exp_elt_opcode (OP_FUNCALL); - } - break; -case 8: -#line 236 "./ada-exp.y" -{ - write_exp_elt_opcode (UNOP_CAST); - write_exp_elt_type (yyvsp[-3].tval); - write_exp_elt_opcode (UNOP_CAST); - } - break; -case 9: -#line 243 "./ada-exp.y" -{ type_qualifier = yyvsp[-2].tval; } - break; -case 10: -#line 244 "./ada-exp.y" -{ - /* write_exp_elt_opcode (UNOP_QUAL); */ - /* FIXME: UNOP_QUAL should be defined in expression.h */ - write_exp_elt_type (yyvsp[-6].tval); - /* write_exp_elt_opcode (UNOP_QUAL); */ - /* FIXME: UNOP_QUAL should be defined in expression.h */ - type_qualifier = yyvsp[-4].tval; - } - break; -case 11: -#line 254 "./ada-exp.y" -{ yyval.tval = type_qualifier; } - break; -case 12: -#line 258 "./ada-exp.y" -{ write_exp_elt_opcode (TERNOP_SLICE); } - break; -case 13: -#line 261 "./ada-exp.y" -{ } - break; -case 15: -#line 268 "./ada-exp.y" -{ write_exp_elt_opcode (OP_REGISTER); - write_exp_elt_longcst ((LONGEST) yyvsp[0].lval); - write_exp_elt_opcode (OP_REGISTER); - } - break; -case 16: -#line 275 "./ada-exp.y" -{ write_exp_elt_opcode (OP_INTERNALVAR); - write_exp_elt_intern (yyvsp[0].ivar); - write_exp_elt_opcode (OP_INTERNALVAR); - } - break; -case 18: -#line 286 "./ada-exp.y" -{ write_exp_elt_opcode (OP_LAST); - write_exp_elt_longcst ((LONGEST) yyvsp[0].lval); - write_exp_elt_opcode (OP_LAST); - } - break; -case 19: -#line 293 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_ASSIGN); } - break; -case 20: -#line 297 "./ada-exp.y" -{ write_exp_elt_opcode (UNOP_NEG); } - break; -case 21: -#line 301 "./ada-exp.y" -{ write_exp_elt_opcode (UNOP_PLUS); } - break; -case 22: -#line 305 "./ada-exp.y" -{ write_exp_elt_opcode (UNOP_LOGICAL_NOT); } - break; -case 23: -#line 309 "./ada-exp.y" -{ write_exp_elt_opcode (UNOP_ABS); } - break; -case 24: -#line 312 "./ada-exp.y" -{ yyval.lval = 0; } - break; -case 25: -#line 316 "./ada-exp.y" -{ yyval.lval = 1; } - break; -case 26: -#line 318 "./ada-exp.y" -{ yyval.lval = 1; } - break; -case 27: -#line 320 "./ada-exp.y" -{ yyval.lval = yyvsp[-2].lval + 1; } - break; -case 28: -#line 322 "./ada-exp.y" -{ yyval.lval = yyvsp[-4].lval + 1; } - break; -case 29: -#line 327 "./ada-exp.y" -{ write_exp_elt_opcode (UNOP_MEMVAL); - write_exp_elt_type (yyvsp[-2].tval); - write_exp_elt_opcode (UNOP_MEMVAL); - } - break; -case 30: -#line 336 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_EXP); } - break; -case 31: -#line 340 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_MUL); } - break; -case 32: -#line 344 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_DIV); } - break; -case 33: -#line 348 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_REM); } - break; -case 34: -#line 352 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_MOD); } - break; -case 35: -#line 356 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_REPEAT); } - break; -case 36: -#line 360 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_ADD); } - break; -case 37: -#line 364 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_CONCAT); } - break; -case 38: -#line 368 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_SUB); } - break; -case 39: -#line 372 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_EQUAL); } - break; -case 40: -#line 376 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_NOTEQUAL); } - break; -case 41: -#line 380 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_LEQ); } - break; -case 42: -#line 384 "./ada-exp.y" -{ /*write_exp_elt_opcode (TERNOP_MBR); */ } - break; -case 43: -#line 388 "./ada-exp.y" -{ /*write_exp_elt_opcode (BINOP_MBR); */ - /* FIXME: BINOP_MBR should be defined in expression.h */ - write_exp_elt_longcst ((LONGEST) yyvsp[0].lval); - /*write_exp_elt_opcode (BINOP_MBR); */ - } - break; -case 44: -#line 394 "./ada-exp.y" -{ /*write_exp_elt_opcode (UNOP_MBR); */ - /* FIXME: UNOP_QUAL should be defined in expression.h */ - write_exp_elt_type (yyvsp[0].tval); - /* write_exp_elt_opcode (UNOP_MBR); */ - /* FIXME: UNOP_MBR should be defined in expression.h */ - } - break; -case 45: -#line 401 "./ada-exp.y" -{ /*write_exp_elt_opcode (TERNOP_MBR); */ - /* FIXME: TERNOP_MBR should be defined in expression.h */ - write_exp_elt_opcode (UNOP_LOGICAL_NOT); - } - break; -case 46: -#line 406 "./ada-exp.y" -{ /* write_exp_elt_opcode (BINOP_MBR); */ - /* FIXME: BINOP_MBR should be defined in expression.h */ - write_exp_elt_longcst ((LONGEST) yyvsp[0].lval); - /*write_exp_elt_opcode (BINOP_MBR);*/ - /* FIXME: BINOP_MBR should be defined in expression.h */ - write_exp_elt_opcode (UNOP_LOGICAL_NOT); - } - break; -case 47: -#line 414 "./ada-exp.y" -{ /*write_exp_elt_opcode (UNOP_MBR);*/ - /* FIXME: UNOP_MBR should be defined in expression.h */ - write_exp_elt_type (yyvsp[0].tval); - /* write_exp_elt_opcode (UNOP_MBR);*/ - /* FIXME: UNOP_MBR should be defined in expression.h */ - write_exp_elt_opcode (UNOP_LOGICAL_NOT); - } - break; -case 48: -#line 424 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_GEQ); } - break; -case 49: -#line 428 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_LESS); } - break; -case 50: -#line 432 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_GTR); } - break; -case 51: -#line 436 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_BITWISE_AND); } - break; -case 52: -#line 440 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_LOGICAL_AND); } - break; -case 53: -#line 444 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_BITWISE_IOR); } - break; -case 54: -#line 448 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_LOGICAL_OR); } - break; -case 55: -#line 452 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_BITWISE_XOR); } - break; -case 56: -#line 456 "./ada-exp.y" -{ write_exp_elt_opcode (UNOP_ADDR); } - break; -case 57: -#line 458 "./ada-exp.y" -{ write_exp_elt_opcode (UNOP_ADDR); - write_exp_elt_opcode (UNOP_CAST); - write_exp_elt_type (builtin_type_ada_system_address); - write_exp_elt_opcode (UNOP_CAST); - } - break; -case 58: -#line 464 "./ada-exp.y" -{ write_attribute_call1 (ATR_FIRST, yyvsp[0].lval); } - break; -case 59: -#line 466 "./ada-exp.y" -{ write_attribute_call1 (ATR_LAST, yyvsp[0].lval); } - break; -case 60: -#line 468 "./ada-exp.y" -{ write_attribute_call1 (ATR_LENGTH, yyvsp[0].lval); } - break; -case 61: -#line 470 "./ada-exp.y" -{ write_attribute_call0 (ATR_SIZE); } - break; -case 62: -#line 472 "./ada-exp.y" -{ write_attribute_call0 (ATR_TAG); } - break; -case 63: -#line 474 "./ada-exp.y" -{ write_attribute_calln (ATR_MIN, 2); } - break; -case 64: -#line 476 "./ada-exp.y" -{ write_attribute_calln (ATR_MAX, 2); } - break; -case 65: -#line 478 "./ada-exp.y" -{ write_attribute_calln (ATR_POS, 1); } - break; -case 66: -#line 480 "./ada-exp.y" -{ write_attribute_call1 (ATR_FIRST, yyvsp[0].lval); } - break; -case 67: -#line 482 "./ada-exp.y" -{ write_attribute_call1 (ATR_LAST, yyvsp[0].lval); } - break; -case 68: -#line 484 "./ada-exp.y" -{ write_attribute_call1 (ATR_LENGTH, yyvsp[0].lval); } - break; -case 69: -#line 486 "./ada-exp.y" -{ write_attribute_calln (ATR_VAL, 1); } - break; -case 70: -#line 488 "./ada-exp.y" -{ write_attribute_call0 (ATR_MODULUS); } - break; -case 71: -#line 492 "./ada-exp.y" -{ yyval.lval = 1; } - break; -case 72: -#line 494 "./ada-exp.y" -{ yyval.lval = yyvsp[-1].typed_val.val; } - break; -case 73: -#line 499 "./ada-exp.y" -{ write_exp_elt_opcode (OP_TYPE); - write_exp_elt_type (yyvsp[0].tval); - write_exp_elt_opcode (OP_TYPE); } - break; -case 75: -#line 507 "./ada-exp.y" -{ write_exp_elt_opcode (OP_TYPE); - write_exp_elt_type (builtin_type_void); - write_exp_elt_opcode (OP_TYPE); } - break; -case 76: -#line 514 "./ada-exp.y" -{ write_exp_elt_opcode (OP_LONG); - write_exp_elt_type (yyvsp[0].typed_val.type); - write_exp_elt_longcst ((LONGEST)(yyvsp[0].typed_val.val)); - write_exp_elt_opcode (OP_LONG); - } - break; -case 77: -#line 522 "./ada-exp.y" -{ write_exp_elt_opcode (OP_LONG); - if (type_qualifier == NULL) - write_exp_elt_type (yyvsp[0].typed_val.type); - else - write_exp_elt_type (type_qualifier); - write_exp_elt_longcst - (convert_char_literal (type_qualifier, yyvsp[0].typed_val.val)); - write_exp_elt_opcode (OP_LONG); - } - break; -case 78: -#line 534 "./ada-exp.y" -{ write_exp_elt_opcode (OP_DOUBLE); - write_exp_elt_type (yyvsp[0].typed_val_float.type); - write_exp_elt_dblcst (yyvsp[0].typed_val_float.dval); - write_exp_elt_opcode (OP_DOUBLE); - } - break; -case 79: -#line 542 "./ada-exp.y" -{ write_exp_elt_opcode (OP_LONG); - write_exp_elt_type (builtin_type_int); - write_exp_elt_longcst ((LONGEST)(0)); - write_exp_elt_opcode (OP_LONG); - } - break; -case 80: -#line 549 "./ada-exp.y" -{ /* Ada strings are converted into array constants - a lower bound of 1. Thus, the array upper bound - is the string length. */ - char *sp = yyvsp[0].sval.ptr; int count; - if (yyvsp[0].sval.length == 0) - { /* One dummy character for the type */ - write_exp_elt_opcode (OP_LONG); - write_exp_elt_type (builtin_type_ada_char); - write_exp_elt_longcst ((LONGEST)(0)); - write_exp_elt_opcode (OP_LONG); - } - for (count = yyvsp[0].sval.length; count > 0; count -= 1) - { - write_exp_elt_opcode (OP_LONG); - write_exp_elt_type (builtin_type_ada_char); - write_exp_elt_longcst ((LONGEST)(*sp)); - sp += 1; - write_exp_elt_opcode (OP_LONG); - } - write_exp_elt_opcode (OP_ARRAY); - write_exp_elt_longcst ((LONGEST) 1); - write_exp_elt_longcst ((LONGEST) (yyvsp[0].sval.length)); - write_exp_elt_opcode (OP_ARRAY); - } - break; -case 81: -#line 576 "./ada-exp.y" -{ error ("NEW not implemented."); } - break; -case 82: -#line 579 "./ada-exp.y" -{ write_var_from_name (NULL, yyvsp[0].ssym); } - break; -case 83: -#line 581 "./ada-exp.y" -{ write_var_from_name (yyvsp[-1].bval, yyvsp[0].ssym); } - break; -case 84: -#line 582 "./ada-exp.y" -{ write_object_renaming (NULL, yyvsp[0].ssym.sym); } - break; -case 85: -#line 584 "./ada-exp.y" -{ write_object_renaming (yyvsp[-1].bval, yyvsp[0].ssym.sym); } - break; -case 86: -#line 587 "./ada-exp.y" -{ } - break; -case 87: -#line 588 "./ada-exp.y" -{ } - break; -case 88: -#line 589 "./ada-exp.y" -{ } - break; -case 89: -#line 593 "./ada-exp.y" -{ yyval.bval = yyvsp[0].bval; } - break; -case 90: -#line 595 "./ada-exp.y" -{ yyval.bval = yyvsp[0].bval; } - break; -case 91: -#line 599 "./ada-exp.y" -{ yyval.tval = yyvsp[0].tval; } - break; -case 92: -#line 600 "./ada-exp.y" -{ yyval.tval = yyvsp[0].tval; } - break; -case 93: -#line 602 "./ada-exp.y" -{ yyval.tval = lookup_pointer_type (yyvsp[-1].tval); } - break; -case 94: -#line 604 "./ada-exp.y" -{ yyval.tval = lookup_pointer_type (yyvsp[-1].tval); } - break; -case 95: -#line 611 "./ada-exp.y" -{ write_exp_elt_opcode (UNOP_IND); } - break; -case 96: -#line 613 "./ada-exp.y" -{ write_exp_elt_opcode (UNOP_ADDR); } - break; -case 97: -#line 615 "./ada-exp.y" -{ write_exp_elt_opcode (BINOP_SUBSCRIPT); } - break; -} - -#line 705 "/usr/local/share/bison/bison.simple" - - - yyvsp -= yylen; - yyssp -= yylen; -#if YYLSP_NEEDED - yylsp -= yylen; -#endif - -#if YYDEBUG - if (yydebug) - { - short *yyssp1 = yyss - 1; - YYFPRINTF (stderr, "state stack now"); - while (yyssp1 != yyssp) - YYFPRINTF (stderr, " %d", *++yyssp1); - YYFPRINTF (stderr, "\n"); - } -#endif - - *++yyvsp = yyval; -#if YYLSP_NEEDED - *++yylsp = yyloc; -#endif - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTBASE]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; - -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - char *yymsg; - int yyx, yycount; - - yycount = 0; - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx) - yysize += yystrlen (yytname[yyx]) + 15, yycount++; - yysize += yystrlen ("parse error, unexpected ") + 1; - yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "parse error, unexpected "); - yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); - - if (yycount < 5) - { - yycount = 0; - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); - yyx++) - if (yycheck[yyx + yyn] == yyx) - { - const char *yyq = ! yycount ? ", expecting " : " or "; - yyp = yystpcpy (yyp, yyq); - yyp = yystpcpy (yyp, yytname[yyx]); - yycount++; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror ("parse error; also virtual memory exhausted"); - } - else -#endif /* defined (YYERROR_VERBOSE) */ - yyerror ("parse error"); - } - goto yyerrlab1; - - -/*--------------------------------------------------. -| yyerrlab1 -- error raised explicitly by an action | -`--------------------------------------------------*/ -yyerrlab1: - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; - YYDPRINTF ((stderr, "Discarding token %d (%s).\n", - yychar, yytname[yychar1])); - yychar = YYEMPTY; - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - - -/*-------------------------------------------------------------------. -| yyerrdefault -- current state does not do anything special for the | -| error token. | -`-------------------------------------------------------------------*/ -yyerrdefault: -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - - /* If its default is to accept any token, ok. Otherwise pop it. */ - yyn = yydefact[yystate]; - if (yyn) - goto yydefault; -#endif - - -/*---------------------------------------------------------------. -| yyerrpop -- pop the current state because it cannot handle the | -| error token | -`---------------------------------------------------------------*/ -yyerrpop: - if (yyssp == yyss) - YYABORT; - yyvsp--; - yystate = *--yyssp; -#if YYLSP_NEEDED - yylsp--; -#endif - -#if YYDEBUG - if (yydebug) - { - short *yyssp1 = yyss - 1; - YYFPRINTF (stderr, "Error: state stack now"); - while (yyssp1 != yyssp) - YYFPRINTF (stderr, " %d", *++yyssp1); - YYFPRINTF (stderr, "\n"); - } -#endif - -/*--------------. -| yyerrhandle. | -`--------------*/ -yyerrhandle: - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; - - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; - } - else if (yyn == 0) - goto yyerrpop; - - if (yyn == YYFINAL) - YYACCEPT; - - YYDPRINTF ((stderr, "Shifting error token, ")); - - *++yyvsp = yylval; -#if YYLSP_NEEDED - *++yylsp = yylloc; -#endif - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -/*---------------------------------------------. -| yyoverflowab -- parser overflow comes here. | -`---------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); - yyresult = 2; - /* Fall through. */ - -yyreturn: -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif - return yyresult; -} -#line 618 "./ada-exp.y" - - -/* yylex defined in ada-lex.c: Reads one token, getting characters */ -/* through lexptr. */ - -/* Remap normal flex interface names (yylex) as well as gratuitiously */ -/* global symbol names, so we can have multiple flex-generated parsers */ -/* in gdb. */ - -/* (See note above on previous definitions for YACC.) */ - -#define yy_create_buffer ada_yy_create_buffer -#define yy_delete_buffer ada_yy_delete_buffer -#define yy_init_buffer ada_yy_init_buffer -#define yy_load_buffer_state ada_yy_load_buffer_state -#define yy_switch_to_buffer ada_yy_switch_to_buffer -#define yyrestart ada_yyrestart -#define yytext ada_yytext -#define yywrap ada_yywrap - -/* The following kludge was found necessary to prevent conflicts between */ -/* defs.h and non-standard stdlib.h files. */ -#define qsort __qsort__dummy -#include "ada-lex.c" - -int -ada_parse () -{ - lexer_init (yyin); /* (Re-)initialize lexer. */ - left_block_context = NULL; - type_qualifier = NULL; - - return _ada_parse (); -} - -void -yyerror (msg) - char *msg; -{ - error ("A %s in expression, near `%s'.", (msg ? msg : "error"), lexptr); -} - -/* The operator name corresponding to operator symbol STRING (adds - quotes and maps to lower-case). Destroys the previous contents of - the array pointed to by STRING.ptr. Error if STRING does not match - a valid Ada operator. Assumes that STRING.ptr points to a - null-terminated string and that, if STRING is a valid operator - symbol, the array pointed to by STRING.ptr contains at least - STRING.length+3 characters. */ - -static struct stoken -string_to_operator (string) - struct stoken string; -{ - int i; - - for (i = 0; ada_opname_table[i].mangled != NULL; i += 1) - { - if (string.length == strlen (ada_opname_table[i].demangled)-2 - && strncasecmp (string.ptr, ada_opname_table[i].demangled+1, - string.length) == 0) - { - strncpy (string.ptr, ada_opname_table[i].demangled, - string.length+2); - string.length += 2; - return string; - } - } - error ("Invalid operator symbol `%s'", string.ptr); -} - -/* Emit expression to access an instance of SYM, in block BLOCK (if - * non-NULL), and with :: qualification ORIG_LEFT_CONTEXT. */ -static void -write_var_from_sym (orig_left_context, block, sym) - struct block* orig_left_context; - struct block* block; - struct symbol* sym; -{ - if (orig_left_context == NULL && symbol_read_needs_frame (sym)) - { - if (innermost_block == 0 || - contained_in (block, innermost_block)) - innermost_block = block; - } - - write_exp_elt_opcode (OP_VAR_VALUE); - /* We want to use the selected frame, not another more inner frame - which happens to be in the same block */ - write_exp_elt_block (NULL); - write_exp_elt_sym (sym); - write_exp_elt_opcode (OP_VAR_VALUE); -} - -/* Emit expression to access an instance of NAME. */ -static void -write_var_from_name (orig_left_context, name) - struct block* orig_left_context; - struct name_info name; -{ - if (name.msym != NULL) - { - write_exp_msymbol (name.msym, - lookup_function_type (builtin_type_int), - builtin_type_int); - } - else if (name.sym == NULL) - { - /* Multiple matches: record name and starting block for later - resolution by ada_resolve. */ - /* write_exp_elt_opcode (OP_UNRESOLVED_VALUE); */ - /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */ - write_exp_elt_block (name.block); - /* write_exp_elt_name (name.stoken.ptr); */ - /* FIXME: write_exp_elt_name should be defined in defs.h, located in parse.c */ - /* write_exp_elt_opcode (OP_UNRESOLVED_VALUE); */ - /* FIXME: OP_UNRESOLVED_VALUE should be defined in expression.h */ - } - else - write_var_from_sym (orig_left_context, name.block, name.sym); -} - -/* Write a call on parameterless attribute ATR. */ - -static void -write_attribute_call0 (atr) - enum ada_attribute atr; -{ - /* write_exp_elt_opcode (OP_ATTRIBUTE); */ - /* FIXME: OP_ATTRIBUTE should be defined in expression.h */ - write_exp_elt_longcst ((LONGEST) 0); - write_exp_elt_longcst ((LONGEST) atr); - /* write_exp_elt_opcode (OP_ATTRIBUTE); */ - /* FIXME: OP_ATTRIBUTE should be defined in expression.h */ -} - -/* Write a call on an attribute ATR with one constant integer - * parameter. */ - -static void -write_attribute_call1 (atr, arg) - enum ada_attribute atr; - LONGEST arg; -{ - write_exp_elt_opcode (OP_LONG); - write_exp_elt_type (builtin_type_int); - write_exp_elt_longcst (arg); - write_exp_elt_opcode (OP_LONG); - /*write_exp_elt_opcode (OP_ATTRIBUTE);*/ - /* FIXME: OP_ATTRIBUTE should be defined in expression.h */ - write_exp_elt_longcst ((LONGEST) 1); - write_exp_elt_longcst ((LONGEST) atr); - /*write_exp_elt_opcode (OP_ATTRIBUTE);*/ - /* FIXME: OP_ATTRIBUTE should be defined in expression.h */ -} - -/* Write a call on an attribute ATR with N parameters, whose code must have - * been generated previously. */ - -static void -write_attribute_calln (atr, n) - enum ada_attribute atr; - int n; -{ - /*write_exp_elt_opcode (OP_ATTRIBUTE);*/ - /* FIXME: OP_ATTRIBUTE should be defined in expression.h */ - write_exp_elt_longcst ((LONGEST) n); - write_exp_elt_longcst ((LONGEST) atr); - /* write_exp_elt_opcode (OP_ATTRIBUTE);*/ - /* FIXME: OP_ATTRIBUTE should be defined in expression.h */ -} - -/* Emit expression corresponding to the renamed object designated by - * the type RENAMING, which must be the referent of an object renaming - * type, in the context of ORIG_LEFT_CONTEXT (?). */ -static void -write_object_renaming (orig_left_context, renaming) - struct block* orig_left_context; - struct symbol* renaming; -{ - const char* qualification = SYMBOL_NAME (renaming); - const char* simple_tail; - const char* expr = TYPE_FIELD_NAME (SYMBOL_TYPE (renaming), 0); - const char* suffix; - char* name; - struct symbol* sym; - enum { SIMPLE_INDEX, LOWER_BOUND, UPPER_BOUND } slice_state; - - /* if orig_left_context is null, then use the currently selected - block, otherwise we might fail our symbol lookup below */ - if (orig_left_context == NULL) - orig_left_context = get_selected_block (NULL); - - for (simple_tail = qualification + strlen (qualification); - simple_tail != qualification; simple_tail -= 1) - { - if (*simple_tail == '.') - { - simple_tail += 1; - break; - } - else if (STREQN (simple_tail, "__", 2)) - { - simple_tail += 2; - break; - } - } - - suffix = strstr (expr, "___XE"); - if (suffix == NULL) - goto BadEncoding; - - name = (char*) xmalloc (suffix - expr + 1); - /* add_name_string_cleanup (name); */ - /* FIXME: add_name_string_cleanup should be defined in - parser-defs.h, implemented in parse.c */ - strncpy (name, expr, suffix-expr); - name[suffix-expr] = '\000'; - sym = lookup_symbol (name, orig_left_context, VAR_NAMESPACE, 0, NULL); - /* if (sym == NULL) - error ("Could not find renamed variable: %s", ada_demangle (name)); - */ - /* FIXME: ada_demangle should be defined in defs.h, implemented in ada-lang.c */ - write_var_from_sym (orig_left_context, block_found, sym); - - suffix += 5; - slice_state = SIMPLE_INDEX; - while (*suffix == 'X') - { - suffix += 1; - - switch (*suffix) { - case 'L': - slice_state = LOWER_BOUND; - case 'S': - suffix += 1; - if (isdigit (*suffix)) - { - char* next; - long val = strtol (suffix, &next, 10); - if (next == suffix) - goto BadEncoding; - suffix = next; - write_exp_elt_opcode (OP_LONG); - write_exp_elt_type (builtin_type_ada_int); - write_exp_elt_longcst ((LONGEST) val); - write_exp_elt_opcode (OP_LONG); - } - else - { - const char* end; - char* index_name; - int index_len; - struct symbol* index_sym; - - end = strchr (suffix, 'X'); - if (end == NULL) - end = suffix + strlen (suffix); - - index_len = simple_tail - qualification + 2 + (suffix - end) + 1; - index_name = (char*) xmalloc (index_len); - memset (index_name, '\000', index_len); - /* add_name_string_cleanup (index_name);*/ - /* FIXME: add_name_string_cleanup should be defined in - parser-defs.h, implemented in parse.c */ - strncpy (index_name, qualification, simple_tail - qualification); - index_name[simple_tail - qualification] = '\000'; - strncat (index_name, suffix, suffix-end); - suffix = end; - - index_sym = - lookup_symbol (index_name, NULL, VAR_NAMESPACE, 0, NULL); - if (index_sym == NULL) - error ("Could not find %s", index_name); - write_var_from_sym (NULL, block_found, sym); - } - if (slice_state == SIMPLE_INDEX) - { - write_exp_elt_opcode (OP_FUNCALL); - write_exp_elt_longcst ((LONGEST) 1); - write_exp_elt_opcode (OP_FUNCALL); - } - else if (slice_state == LOWER_BOUND) - slice_state = UPPER_BOUND; - else if (slice_state == UPPER_BOUND) - { - write_exp_elt_opcode (TERNOP_SLICE); - slice_state = SIMPLE_INDEX; - } - break; - - case 'R': - { - struct stoken field_name; - const char* end; - suffix += 1; - - if (slice_state != SIMPLE_INDEX) - goto BadEncoding; - end = strchr (suffix, 'X'); - if (end == NULL) - end = suffix + strlen (suffix); - field_name.length = end - suffix; - field_name.ptr = (char*) xmalloc (end - suffix + 1); - strncpy (field_name.ptr, suffix, end - suffix); - field_name.ptr[end - suffix] = '\000'; - suffix = end; - write_exp_elt_opcode (STRUCTOP_STRUCT); - write_exp_string (field_name); - write_exp_elt_opcode (STRUCTOP_STRUCT); - break; - } - - default: - goto BadEncoding; - } - } - if (slice_state == SIMPLE_INDEX) - return; - - BadEncoding: - error ("Internal error in encoding of renaming declaration: %s", - SYMBOL_NAME (renaming)); -} - -/* Convert the character literal whose ASCII value would be VAL to the - appropriate value of type TYPE, if there is a translation. - Otherwise return VAL. Hence, in an enumeration type ('A', 'B'), - the literal 'A' (VAL == 65), returns 0. */ -static LONGEST -convert_char_literal (struct type* type, LONGEST val) -{ - char name[7]; - int f; - - if (type == NULL || TYPE_CODE (type) != TYPE_CODE_ENUM) - return val; - sprintf (name, "QU%02x", (int) val); - for (f = 0; f < TYPE_NFIELDS (type); f += 1) - { - if (STREQ (name, TYPE_FIELD_NAME (type, f))) - return TYPE_FIELD_BITPOS (type, f); - } - return val; -} diff --git a/gdb/ada-lex.c b/gdb/ada-lex.c deleted file mode 100644 index 9538f76b0cb..00000000000 --- a/gdb/ada-lex.c +++ /dev/null @@ -1,3174 +0,0 @@ -/* A lexical scanner generated by flex */ - -/* Scanner skeleton version: - * $Header$ - * $FreeBSD: src/usr.bin/lex/flex.skl,v 1.4 1999/10/27 07:56:44 obrien Exp $ - */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 - -#include - - -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif - - -#ifdef __cplusplus - -#include -#include - -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -#if __STDC__ - -#define YY_USE_PROTOS -#define YY_USE_CONST - -#endif /* __STDC__ */ -#endif /* ! __cplusplus */ - -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#define YY_BUF_SIZE 16384 - -typedef struct yy_buffer_state *YY_BUFFER_STATE; - -extern int yyleng; -extern FILE *yyin, *yyout; - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; - - -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via yyrestart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - }; - -static YY_BUFFER_STATE yy_current_buffer = 0; - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - */ -#define YY_CURRENT_BUFFER yy_current_buffer - - -/* yy_hold_char holds the character lost when yytext is formed. */ -static char yy_hold_char; - -static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - -int yyleng; - -/* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ -static int yy_start = 0; /* start state number */ - -/* Flag which is used to allow yywrap()'s to do buffer switches - * instead of setting up a fresh yyin. A bit of a hack ... - */ -static int yy_did_buffer_switch_on_eof; - -void yyrestart YY_PROTO(( FILE *input_file )); - -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) - -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); - -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); - -#define yy_new_buffer yy_create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) - - -#define YY_USES_REJECT -typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; -typedef int yy_state_type; -extern char *yytext; -#define yytext_ptr yytext - -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 57 -#define YY_END_OF_BUFFER 58 -static yyconst short int yy_acclist[386] = - { 0, - 58, 56, 57, 1, 56, 57, 1, 57, 15, 56, - 57, 53, 56, 57, 41, 56, 57, 56, 57, 43, - 56, 57, 44, 56, 57, 41, 56, 57, 42, 56, - 57, 41, 56, 57, 41, 56, 57, 41, 56, 57, - 4, 56, 57, 4, 56, 57, 41, 56, 57, 41, - 56, 57, 41, 56, 57, 41, 56, 57, 50, 56, - 57, 47, 56, 57, 47, 56, 57, 47, 56, 57, - 47, 56, 57, 47, 56, 57, 47, 56, 57, 47, - 56, 57, 47, 56, 57, 47, 56, 57, 47, 56, - 57, 1, 56, 57, 56, 57, 16, 56, 57, 53, - - 56, 57, 41, 56, 57, 56, 57, 43, 56, 57, - 44, 56, 57, 41, 56, 57, 42, 56, 57, 41, - 56, 57, 41, 56, 57, 41, 56, 57, 4, 56, - 57, 4, 56, 57, 41, 56, 57, 41, 56, 57, - 41, 56, 57, 41, 56, 57, 50, 56, 57, 41, - 56, 57, 47, 56, 57, 47, 56, 57, 47, 56, - 57, 47, 56, 57, 47, 56, 57, 47, 56, 57, - 47, 56, 57, 47, 56, 57, 47, 56, 57, 47, - 56, 57, 56, 57, 40, 56, 57, 51, 55, 54, - 55, 55, 35, 2, 34, 46, 46, 37, 4, 36, - - 38, 33, 39, 47, 47, 47, 47, 47, 19, 47, - 23, 47, 47, 47, 47, 47, 28, 47, 47, 47, - 47, 16, 51, 55, 54, 55, 55, 16, 35, 2, - 34, 46, 46, 37, 4, 36, 38, 33, 39, 16, - 47, 47, 47, 47, 47, 19, 47, 23, 47, 47, - 47, 47, 47, 28, 47, 47, 47, 47,16398, 52, - 55, 12, 12, 32, 2, 46, 46, 9, 3, 7, - 47, 47, 49, 20, 47, 21, 47, 47, 24, 47, - 25, 47, 26, 47, 47, 29, 47, 47, 31, 47, - 52, 55, 16, 32, 2, 2, 16, 2, 46, 46, - - 9, 3, 7, 47, 16, 47, 49, 20, 47, 21, - 47, 47, 24, 47, 25, 47, 26, 47, 47, 29, - 47, 47, 31, 47, 8206, 46, 45, 46, 6, 9, - 3, 47, 22, 47, 27, 47, 30, 47, 2, 16, - 46, 45, 46, 6, 9, 3, 47, 22, 47, 27, - 47, 30, 47, 48, 47, 48, 2, 2, 18, 47, - 5, 11, 8, 18, 2, 2, 5, 11, 8, 17, - 5, 8, 17, 2, 18, 2, 5, 8, 13, 2, - 17, 10, 10, 10, 10 - } ; - -static yyconst short int yy_accept[364] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 2, 4, 7, - 9, 12, 15, 18, 20, 23, 26, 29, 32, 35, - 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, - 68, 71, 74, 77, 80, 83, 86, 89, 92, 95, - 97, 100, 103, 106, 108, 111, 114, 117, 120, 123, - 126, 129, 132, 135, 138, 141, 144, 147, 150, 153, - 156, 159, 162, 165, 168, 171, 174, 177, 180, 183, - 185, 188, 188, 188, 188, 188, 188, 188, 188, 188, - 188, 188, 188, 190, 192, 193, 193, 193, 193, 193, - 193, 193, 193, 194, 195, 195, 196, 196, 197, 198, - - 199, 199, 199, 200, 200, 200, 201, 202, 202, 203, - 204, 204, 204, 205, 205, 206, 206, 207, 208, 209, - 211, 213, 214, 215, 216, 217, 219, 220, 221, 222, - 222, 223, 223, 225, 227, 228, 228, 228, 229, 229, - 229, 230, 231, 231, 232, 232, 233, 234, 235, 235, - 235, 236, 236, 236, 237, 238, 238, 239, 240, 241, - 241, 242, 242, 243, 243, 244, 245, 246, 248, 250, - 251, 252, 253, 254, 256, 257, 258, 259, 259, 260, - 260, 260, 260, 260, 260, 260, 262, 262, 263, 264, - 264, 265, 266, 266, 267, 268, 268, 269, 269, 270, - - 271, 271, 272, 272, 272, 272, 273, 274, 276, 278, - 279, 281, 283, 285, 286, 288, 289, 291, 293, 293, - 294, 295, 296, 298, 299, 299, 300, 301, 301, 302, - 302, 303, 304, 304, 305, 305, 305, 305, 306, 306, - 307, 308, 310, 312, 313, 315, 317, 319, 320, 322, - 323, 325, 325, 326, 326, 326, 326, 326, 327, 329, - 330, 330, 330, 331, 331, 332, 332, 332, 332, 332, - 332, 332, 332, 332, 332, 332, 332, 332, 333, 335, - 337, 339, 339, 339, 339, 339, 341, 341, 342, 344, - 345, 345, 345, 346, 346, 347, 347, 347, 347, 348, - - 350, 352, 354, 355, 355, 355, 355, 355, 356, 356, - 356, 356, 356, 356, 356, 356, 357, 357, 357, 358, - 359, 359, 359, 359, 360, 360, 360, 361, 361, 361, - 362, 363, 363, 364, 365, 365, 366, 367, 367, 368, - 369, 369, 370, 371, 371, 372, 372, 373, 374, 376, - 377, 378, 378, 379, 380, 380, 382, 382, 383, 384, - 385, 386, 386 - } ; - -static yyconst int yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 5, 6, 7, 8, 5, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 21, 22, 23, - 24, 25, 5, 26, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 36, 36, 39, 40, 41, 42, 36, - 36, 43, 44, 45, 46, 36, 47, 48, 36, 36, - 27, 5, 28, 5, 29, 5, 30, 31, 32, 33, - - 34, 35, 36, 37, 38, 36, 36, 39, 40, 41, - 42, 36, 36, 43, 44, 45, 46, 36, 47, 48, - 36, 36, 26, 22, 26, 5, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst int yy_meta[49] = - { 0, - 1, 2, 3, 4, 5, 6, 7, 8, 5, 9, - 5, 5, 5, 5, 5, 5, 10, 5, 11, 11, - 9, 5, 12, 13, 14, 5, 5, 5, 15, 16, - 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17 - } ; - -static yyconst short int yy_base[385] = - { 0, - 0, 0, 48, 0, 91, 92, 1405, 1771, 1771, 1771, - 94, 96, 1771, 142, 1771, 1771, 1391, 1771, 1387, 189, - 1378, 188, 194, 1377, 1376, 1374, 1361, 1771, 222, 242, - 82, 91, 89, 196, 68, 163, 179, 97, 100, 194, - 0, 280, 223, 328, 227, 228, 234, 229, 235, 375, - 242, 418, 1335, 243, 463, 247, 251, 252, 254, 510, - 168, 1343, 161, 1333, 234, 1331, 1336, 1323, 1316, 0, - 558, 1340, 127, 258, 420, 422, 398, 1299, 1285, 1258, - 1266, 1257, 411, 413, 0, 605, 1288, 1287, 1286, 1285, - 119, 644, 1771, 0, 691, 1771, 0, 0, 1255, 1771, - - 0, 421, 690, 429, 0, 1771, 1771, 1244, 1771, 1771, - 608, 696, 1771, 699, 419, 1247, 420, 422, 582, 583, - 586, 587, 624, 625, 591, 590, 627, 628, 684, 430, - 1771, 705, 653, 1256, 710, 1252, 731, 0, 1254, 750, - 710, 798, 1222, 717, 802, 832, 1199, 720, 875, 730, - 1189, 732, 892, 733, 795, 924, 796, 797, 1230, 971, - 800, 997, 0, 876, 1183, 1191, 1176, 0, 0, 1174, - 1151, 1150, 1097, 0, 1095, 1100, 1089, 1096, 805, 1043, - 1047, 1043, 1023, 1016, 1010, 439, 808, 883, 1771, 1027, - 1041, 0, 971, 0, 952, 736, 864, 614, 799, 0, - - 965, 976, 1046, 1061, 0, 1061, 1771, 714, 717, 858, - 774, 789, 859, 1042, 860, 953, 954, 1047, 1086, 1108, - 0, 1092, 0, 1094, 1140, 0, 950, 1182, 1091, 1110, - 1199, 1210, 0, 1244, 981, 0, 0, 0, 1243, 1273, - 890, 0, 0, 949, 0, 0, 0, 943, 0, 935, - 0, 1120, 1771, 1188, 900, 1303, 895, 1771, 0, 882, - 0, 1098, 1174, 440, 1177, 909, 421, 1048, 1093, 1102, - 1169, 846, 818, 814, 822, 779, 792, 1249, 1190, 1191, - 1192, 1322, 1228, 750, 1331, 1361, 0, 1106, 0, 1229, - 1378, 0, 1325, 1326, 1349, 726, 725, 1410, 0, 0, - - 0, 0, 1771, 722, 839, 713, 644, 1369, 668, 671, - 663, 615, 617, 576, 591, 1198, 540, 459, 456, 1440, - 1462, 1483, 1458, 1771, 414, 0, 1517, 249, 794, 1238, - 237, 258, 1310, 0, 203, 190, 209, 1460, 1477, 1350, - 0, 1480, 1771, 131, 1328, 726, 1472, 0, 0, 86, - 1516, 1523, 1522, 1385, 835, 0, 1505, 1511, 1527, 1533, - 1549, 1771, 1571, 1587, 1592, 1608, 1622, 1639, 1642, 1649, - 89, 187, 1656, 1672, 1689, 1701, 1707, 1718, 1720, 1736, - 902, 903, 1743, 1754 - } ; - -static yyconst short int yy_def[385] = - { 0, - 362, 1, 362, 3, 1, 1, 362, 362, 362, 362, - 362, 363, 362, 362, 362, 362, 362, 362, 362, 364, - 362, 362, 362, 362, 365, 362, 362, 362, 366, 366, - 30, 30, 30, 30, 30, 30, 30, 30, 367, 367, - 11, 362, 367, 362, 367, 367, 367, 367, 367, 362, - 367, 367, 52, 367, 362, 367, 367, 367, 367, 362, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 11, - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 363, 363, 363, 71, 71, 71, 86, 362, - 86, 86, 362, 368, 364, 362, 369, 370, 370, 362, - - 371, 362, 362, 362, 372, 362, 362, 373, 362, 362, - 362, 362, 362, 374, 30, 362, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, 30, 367, - 362, 367, 42, 42, 42, 44, 44, 86, 137, 137, - 367, 375, 50, 367, 55, 145, 146, 367, 367, 367, - 52, 367, 149, 367, 367, 362, 367, 367, 376, 367, - 367, 362, 60, 367, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 92, 362, 362, - 362, 362, 362, 362, 362, 363, 362, 362, 362, 86, - 92, 368, 377, 370, 370, 378, 362, 362, 362, 372, - - 373, 362, 374, 362, 379, 380, 362, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 42, 367, 86, - 140, 375, 368, 375, 362, 146, 146, 149, 367, 367, - 367, 149, 156, 367, 362, 381, 162, 204, 145, 60, - 367, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 362, 362, 362, 362, 86, 377, 362, 370, 362, - 382, 378, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 383, 380, 30, 30, - 30, 367, 367, 86, 86, 368, 225, 367, 146, 367, - 149, 228, 367, 367, 367, 362, 362, 362, 240, 60, - - 60, 60, 362, 86, 362, 384, 362, 362, 362, 362, - 362, 362, 362, 362, 383, 367, 86, 86, 368, 368, - 367, 149, 367, 362, 362, 298, 367, 86, 362, 362, - 362, 384, 362, 86, 86, 368, 368, 367, 367, 367, - 322, 367, 362, 86, 362, 362, 362, 86, 368, 368, - 367, 367, 367, 362, 362, 368, 367, 362, 367, 362, - 367, 0, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362 - } ; - -static yyconst short int yy_nxt[1820] = - { 0, - 8, 9, 10, 9, 8, 11, 8, 12, 13, 14, - 15, 16, 17, 13, 18, 19, 20, 21, 22, 23, - 24, 13, 25, 26, 27, 28, 13, 13, 29, 30, - 29, 29, 29, 31, 29, 29, 29, 32, 29, 33, - 34, 35, 36, 29, 37, 29, 29, 38, 8, 9, - 10, 39, 40, 41, 40, 42, 43, 44, 45, 46, - 47, 43, 48, 49, 50, 51, 52, 53, 54, 43, - 55, 56, 57, 58, 59, 43, 60, 61, 60, 60, - 60, 62, 60, 60, 60, 63, 60, 64, 65, 66, - 67, 60, 68, 60, 60, 69, 70, 70, 115, 196, - - 71, 71, 72, 83, 196, 131, 73, 72, 115, 72, - 126, 74, 115, 356, 84, 84, 75, 72, 76, 115, - 119, 115, 115, 77, 190, 120, 132, 115, 188, 115, - 122, 121, 179, 78, 79, 80, 81, 115, 129, 72, - 354, 82, 86, 87, 87, 88, 89, 89, 89, 89, - 89, 90, 89, 89, 89, 89, 89, 89, 89, 89, - 89, 89, 89, 89, 89, 89, 89, 89, 91, 89, - 89, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 95, 95, 95, 115, 101, 168, 127, 200, 165, 131, - - 101, 169, 200, 115, 102, 96, 103, 103, 166, 115, - 102, 97, 103, 103, 350, 128, 103, 349, 99, 115, - 132, 104, 103, 111, 111, 112, 115, 104, 131, 123, - 348, 113, 131, 131, 131, 105, 115, 124, 114, 131, - 131, 125, 116, 111, 111, 112, 141, 131, 131, 132, - 142, 113, 131, 132, 132, 132, 131, 131, 114, 159, - 132, 132, 116, 179, 331, 148, 154, 171, 132, 132, - 346, 157, 117, 132, 158, 172, 344, 132, 132, 173, - 132, 72, 118, 130, 130, 131, 130, 133, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 134, 134, - - 130, 130, 130, 130, 130, 130, 132, 130, 135, 135, - 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 135, 135, 135, 135, 135, 135, 135, 86, 87, - 87, 136, 137, 138, 137, 137, 137, 130, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 139, 137, 137, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 95, 95, 143, 130, - 131, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 144, 130, 130, 130, 130, 130, 145, 130, 130, - - 130, 132, 130, 146, 147, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 131, 149, 179, 308, 179, 180, 186, - 186, 84, 84, 266, 150, 131, 151, 151, 181, 197, - 197, 343, 198, 72, 132, 72, 151, 199, 199, 115, - 115, 152, 115, 307, 209, 307, 132, 186, 186, 115, - 115, 336, 115, 208, 335, 153, 130, 130, 131, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 155, 130, 130, 132, - 130, 156, 156, 156, 156, 156, 156, 156, 156, 156, - - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 111, 111, 160, 130, 131, 130, 130, 130, 161, - 130, 130, 130, 130, 130, 130, 162, 130, 163, 163, - 164, 130, 130, 130, 130, 130, 132, 130, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 163, 163, - 163, 163, 163, 163, 163, 163, 163, 163, 86, 87, - 87, 87, 86, 86, 86, 86, 86, 334, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 178, 178, 178, - 178, 178, 178, 178, 178, 178, 178, 178, 178, 178, - - 178, 178, 178, 178, 178, 178, 86, 86, 86, 111, - 111, 111, 115, 115, 187, 308, 115, 115, 266, 211, - 115, 115, 115, 115, 114, 210, 115, 115, 116, 214, - 115, 115, 199, 199, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 188, 115, 115, 266, 115, 115, 266, - 135, 216, 333, 333, 115, 115, 215, 115, 115, 213, - 212, 218, 218, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, - 191, 191, 95, 95, 95, 266, 101, 111, 111, 112, - - 203, 203, 203, 266, 204, 113, 102, 362, 103, 103, - 159, 266, 114, 97, 115, 131, 116, 135, 103, 331, - 99, 205, 131, 104, 115, 131, 217, 328, 135, 135, - 325, 132, 86, 86, 137, 131, 132, 131, 131, 355, - 219, 355, 260, 132, 115, 230, 132, 115, 229, 229, - 231, 231, 261, 324, 115, 317, 132, 115, 132, 132, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 221, 221, - 221, 221, 221, 221, 221, 221, 221, 221, 192, 192, - - 131, 131, 131, 223, 115, 131, 252, 252, 252, 254, - 254, 254, 330, 330, 115, 253, 308, 265, 265, 115, - 314, 132, 132, 132, 224, 130, 132, 265, 255, 115, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 226, 226, 329, 358, 358, 313, 266, 330, 330, 312, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 226, 226, 226, 226, 226, 226, 226, 226, 226, 226, - 131, 131, 263, 263, 254, 254, 254, 311, 115, 115, - 115, 279, 263, 228, 228, 131, 241, 264, 115, 115, - - 115, 132, 132, 255, 228, 228, 228, 228, 228, 228, - 232, 232, 297, 306, 308, 305, 132, 297, 306, 258, - 303, 232, 232, 232, 232, 232, 232, 130, 130, 131, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 233, 233, 130, 130, 130, 130, 234, 130, - 132, 130, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 233, 233, 233, 233, 233, 233, 233, 233, - 233, 233, 111, 111, 160, 302, 131, 111, 111, 112, - 161, 301, 300, 115, 115, 113, 296, 162, 289, 202, - 259, 164, 114, 281, 115, 258, 116, 132, 203, 203, - - 237, 130, 238, 130, 130, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 239, - 130, 130, 130, 132, 130, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 256, 256, 203, 203, 203, - 187, 204, 72, 308, 135, 72, 256, 256, 256, 256, - 256, 256, 111, 111, 112, 218, 218, 72, 205, 266, - 113, 266, 115, 267, 266, 72, 266, 114, 268, 72, - 280, 116, 115, 269, 266, 270, 72, 254, 254, 282, - 271, 131, 192, 192, 192, 192, 131, 223, 308, 286, - - 272, 273, 274, 275, 260, 187, 283, 308, 276, 293, - 293, 131, 132, 284, 261, 131, 266, 132, 224, 293, - 224, 252, 252, 252, 294, 266, 285, 285, 231, 231, - 253, 251, 132, 250, 249, 248, 132, 285, 285, 285, - 285, 285, 285, 130, 130, 131, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 287, 287, - 130, 130, 130, 130, 288, 130, 132, 130, 287, 287, - 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, - 287, 287, 287, 287, 287, 287, 287, 287, 290, 254, - 254, 254, 263, 263, 247, 265, 265, 246, 291, 309, - - 292, 292, 263, 131, 131, 265, 245, 264, 255, 310, - 292, 292, 292, 292, 292, 292, 292, 295, 295, 244, - 115, 115, 115, 243, 132, 132, 242, 295, 232, 232, - 115, 115, 115, 131, 131, 235, 130, 227, 130, 232, - 232, 232, 232, 232, 232, 111, 111, 160, 316, 131, - 111, 111, 112, 161, 132, 132, 345, 345, 113, 220, - 162, 219, 321, 135, 164, 114, 345, 207, 202, 116, - 132, 298, 298, 298, 298, 298, 298, 298, 298, 298, - 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, - 298, 299, 299, 195, 189, 188, 188, 187, 185, 184, - - 72, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, - 299, 304, 304, 254, 254, 282, 183, 131, 347, 347, - 131, 131, 304, 304, 304, 304, 304, 304, 347, 323, - 182, 323, 283, 293, 293, 179, 345, 345, 132, 318, - 318, 132, 132, 293, 131, 131, 345, 177, 294, 176, - 318, 318, 318, 318, 318, 318, 319, 295, 295, 175, - 111, 111, 112, 174, 170, 132, 132, 295, 113, 320, - 320, 167, 130, 352, 110, 114, 254, 254, 254, 116, - 320, 320, 320, 320, 320, 320, 322, 322, 109, 107, - - 106, 100, 94, 93, 362, 255, 362, 322, 322, 322, - 322, 322, 322, 130, 130, 131, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 326, 326, - 130, 130, 130, 130, 327, 130, 132, 130, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, - 326, 326, 326, 326, 326, 326, 326, 326, 337, 337, - 362, 362, 362, 131, 362, 131, 362, 131, 362, 337, - 337, 337, 337, 337, 337, 338, 342, 342, 339, 339, - 339, 339, 131, 362, 132, 131, 132, 362, 132, 340, - 347, 347, 362, 362, 362, 351, 351, 362, 353, 353, - - 347, 341, 341, 132, 362, 351, 132, 362, 353, 362, - 131, 341, 341, 341, 341, 341, 341, 341, 111, 111, - 160, 131, 131, 359, 359, 362, 161, 131, 131, 360, - 360, 132, 131, 162, 351, 351, 357, 164, 357, 360, - 353, 353, 132, 132, 351, 361, 361, 362, 132, 132, - 353, 360, 360, 132, 131, 361, 362, 362, 362, 362, - 362, 360, 362, 362, 362, 362, 362, 361, 361, 362, - 362, 362, 362, 362, 362, 132, 362, 361, 85, 362, - 362, 85, 362, 362, 362, 85, 85, 85, 98, 98, - 98, 362, 362, 362, 362, 362, 98, 362, 98, 362, - - 362, 98, 98, 98, 108, 362, 108, 108, 108, 115, - 115, 115, 362, 362, 362, 362, 115, 115, 115, 362, - 362, 362, 115, 115, 115, 130, 130, 130, 130, 130, - 130, 130, 130, 130, 130, 130, 130, 130, 130, 192, - 192, 362, 192, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 193, 193, 193, 194, - 362, 362, 362, 194, 194, 194, 201, 362, 362, 201, - 201, 201, 201, 206, 206, 206, 362, 206, 362, 362, - 362, 362, 362, 206, 362, 362, 206, 206, 206, 222, - 222, 362, 222, 222, 222, 222, 222, 222, 222, 222, - - 222, 222, 222, 222, 222, 222, 236, 362, 362, 362, - 362, 236, 362, 362, 362, 362, 236, 257, 362, 362, - 257, 257, 257, 257, 262, 362, 362, 262, 262, 362, - 362, 362, 262, 262, 277, 277, 277, 278, 278, 278, - 362, 362, 362, 362, 278, 278, 278, 362, 362, 362, - 278, 278, 278, 315, 362, 362, 315, 315, 315, 315, - 332, 362, 362, 362, 332, 362, 362, 362, 332, 332, - 7, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, 362 - } ; - -static yyconst short int yy_chk[1820] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 5, 6, 35, 371, - - 5, 6, 11, 12, 371, 39, 11, 11, 35, 11, - 35, 11, 31, 350, 12, 12, 11, 11, 11, 33, - 31, 32, 31, 11, 91, 32, 39, 38, 91, 33, - 33, 32, 73, 11, 11, 11, 11, 38, 38, 73, - 344, 11, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 20, 20, 20, 36, 22, 63, 36, 372, 61, 40, - - 23, 63, 372, 36, 22, 20, 22, 22, 61, 37, - 23, 20, 23, 23, 337, 37, 22, 336, 20, 37, - 40, 22, 23, 29, 29, 29, 34, 23, 43, 34, - 335, 29, 45, 46, 48, 22, 34, 34, 29, 47, - 49, 34, 29, 30, 30, 30, 47, 51, 54, 43, - 49, 30, 56, 45, 46, 48, 57, 58, 30, 59, - 47, 49, 30, 74, 332, 51, 54, 65, 51, 54, - 331, 56, 30, 56, 57, 65, 328, 57, 58, 65, - 59, 74, 30, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, - 44, 44, 44, 44, 44, 44, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, - 50, 50, 50, 52, 52, 75, 267, 76, 77, 83, - 83, 84, 84, 267, 52, 130, 52, 52, 77, 102, - 102, 325, 104, 75, 52, 76, 52, 104, 104, 115, - 117, 52, 118, 264, 118, 264, 130, 186, 186, 115, - 117, 319, 118, 117, 318, 52, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - - 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, - 55, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, - 60, 60, 60, 60, 60, 60, 60, 60, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 317, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, - - 71, 71, 71, 71, 71, 71, 86, 86, 86, 111, - 111, 111, 119, 120, 86, 315, 121, 122, 314, 122, - 126, 125, 119, 120, 111, 119, 121, 122, 111, 125, - 126, 125, 198, 198, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 92, 123, 124, 313, 127, 128, 312, - 133, 128, 307, 307, 123, 124, 127, 127, 128, 124, - 123, 133, 133, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, - 92, 92, 95, 95, 95, 311, 103, 112, 112, 112, - - 114, 114, 114, 310, 114, 112, 103, 95, 103, 103, - 132, 309, 112, 95, 129, 141, 112, 135, 103, 306, - 95, 114, 144, 103, 129, 148, 129, 304, 135, 135, - 297, 132, 137, 137, 137, 150, 141, 152, 154, 346, - 137, 346, 196, 144, 208, 152, 148, 209, 150, 150, - 152, 152, 196, 296, 208, 284, 150, 209, 152, 154, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 137, 137, 137, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, - 140, 140, 140, 140, 140, 140, 140, 140, 142, 142, - - 155, 157, 158, 142, 211, 161, 179, 179, 179, 187, - 187, 187, 329, 329, 211, 179, 277, 199, 199, 212, - 276, 155, 157, 158, 142, 145, 161, 199, 187, 212, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, - 146, 146, 305, 355, 355, 275, 274, 305, 305, 273, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 149, 164, 197, 197, 188, 188, 188, 272, 210, 213, - 215, 210, 197, 149, 149, 241, 164, 197, 210, 213, - - 215, 149, 164, 188, 149, 149, 149, 149, 149, 149, - 153, 153, 381, 382, 266, 260, 241, 381, 382, 257, - 255, 153, 153, 153, 153, 153, 153, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, - 156, 156, 160, 160, 160, 250, 160, 202, 202, 202, - 160, 248, 244, 216, 217, 202, 235, 160, 227, 201, - 195, 160, 202, 216, 217, 193, 202, 160, 162, 162, - - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, - 162, 162, 162, 162, 162, 190, 190, 203, 203, 203, - 191, 203, 185, 268, 218, 184, 190, 190, 190, 190, - 190, 190, 206, 206, 206, 218, 218, 183, 203, 204, - 206, 268, 214, 204, 204, 182, 204, 206, 204, 181, - 214, 206, 214, 204, 204, 204, 180, 219, 219, 219, - 204, 219, 222, 222, 224, 224, 229, 222, 269, 224, - - 204, 204, 204, 204, 262, 178, 219, 270, 204, 229, - 229, 288, 219, 220, 262, 230, 269, 229, 222, 229, - 224, 252, 252, 252, 229, 270, 220, 220, 230, 230, - 252, 177, 288, 176, 175, 173, 230, 220, 220, 220, - 220, 220, 220, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 225, 225, - 225, 225, 225, 225, 225, 225, 225, 225, 228, 254, - 254, 254, 263, 263, 172, 265, 265, 171, 228, 271, - - 228, 228, 263, 316, 231, 265, 170, 263, 254, 271, - 228, 228, 228, 228, 228, 228, 228, 231, 231, 167, - 279, 280, 281, 166, 316, 231, 165, 231, 232, 232, - 279, 280, 281, 283, 290, 159, 151, 147, 143, 232, - 232, 232, 232, 232, 232, 234, 234, 234, 283, 234, - 278, 278, 278, 234, 283, 290, 330, 330, 278, 139, - 234, 136, 290, 134, 234, 278, 330, 116, 108, 278, - 234, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, - 239, 240, 240, 99, 90, 89, 88, 87, 82, 81, - - 80, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, - 240, 256, 256, 282, 282, 282, 79, 282, 333, 333, - 293, 294, 256, 256, 256, 256, 256, 256, 333, 294, - 78, 294, 282, 293, 293, 72, 345, 345, 282, 285, - 285, 293, 294, 293, 295, 340, 345, 69, 293, 68, - 285, 285, 285, 285, 285, 285, 286, 295, 295, 67, - 308, 308, 308, 66, 64, 295, 340, 295, 308, 286, - 286, 62, 53, 340, 27, 308, 354, 354, 354, 308, - 286, 286, 286, 286, 286, 286, 291, 291, 26, 25, - - 24, 21, 19, 17, 7, 354, 0, 291, 291, 291, - 291, 291, 291, 298, 298, 298, 298, 298, 298, 298, - 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, - 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, - 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, - 298, 298, 298, 298, 298, 298, 298, 298, 320, 320, - 0, 0, 0, 323, 0, 338, 0, 321, 0, 320, - 320, 320, 320, 320, 320, 321, 323, 323, 338, 338, - 321, 321, 339, 0, 323, 342, 338, 0, 321, 322, - 347, 347, 0, 0, 0, 339, 339, 0, 342, 342, - - 347, 322, 322, 339, 0, 339, 342, 0, 342, 0, - 357, 322, 322, 322, 322, 322, 322, 322, 327, 327, - 327, 351, 327, 357, 357, 0, 327, 353, 352, 358, - 358, 357, 359, 327, 351, 351, 352, 327, 352, 358, - 353, 353, 351, 327, 351, 359, 359, 0, 353, 352, - 353, 360, 360, 359, 361, 359, 0, 0, 0, 0, - 0, 360, 0, 0, 0, 0, 0, 361, 361, 0, - 0, 0, 0, 0, 0, 361, 0, 361, 363, 0, - 0, 363, 0, 0, 0, 363, 363, 363, 364, 364, - 364, 0, 0, 0, 0, 0, 364, 0, 364, 0, - - 0, 364, 364, 364, 365, 0, 365, 365, 365, 366, - 366, 366, 0, 0, 0, 0, 366, 366, 366, 0, - 0, 0, 366, 366, 366, 367, 367, 367, 367, 367, - 367, 367, 367, 367, 367, 367, 367, 367, 367, 368, - 368, 0, 368, 368, 368, 368, 368, 368, 368, 368, - 368, 368, 368, 368, 368, 368, 369, 369, 369, 370, - 0, 0, 0, 370, 370, 370, 373, 0, 0, 373, - 373, 373, 373, 374, 374, 374, 0, 374, 0, 0, - 0, 0, 0, 374, 0, 0, 374, 374, 374, 375, - 375, 0, 375, 375, 375, 375, 375, 375, 375, 375, - - 375, 375, 375, 375, 375, 375, 376, 0, 0, 0, - 0, 376, 0, 0, 0, 0, 376, 377, 0, 0, - 377, 377, 377, 377, 378, 0, 0, 378, 378, 0, - 0, 0, 378, 378, 379, 379, 379, 380, 380, 380, - 0, 0, 0, 0, 380, 380, 380, 0, 0, 0, - 380, 380, 380, 383, 0, 0, 383, 383, 383, 383, - 384, 0, 0, 0, 384, 0, 0, 0, 384, 384, - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - - 362, 362, 362, 362, 362, 362, 362, 362, 362, 362, - 362, 362, 362, 362, 362, 362, 362, 362, 362 - } ; - -static yy_state_type yy_state_buf[YY_BUF_SIZE + 2], *yy_state_ptr; -static char *yy_full_match; -static int yy_lp; -static int yy_looking_for_trail_begin = 0; -static int yy_full_lp; -static int *yy_full_state; -#define YY_TRAILING_MASK 0x2000 -#define YY_TRAILING_HEAD_MASK 0x4000 -#define REJECT \ -{ \ -*yy_cp = yy_hold_char; /* undo effects of setting up yytext */ \ -yy_cp = yy_full_match; /* restore poss. backed-over text */ \ -yy_lp = yy_full_lp; /* restore orig. accepting pos. */ \ -yy_state_ptr = yy_full_state; /* restore orig. state */ \ -yy_current_state = *yy_state_ptr; /* restore curr. state */ \ -++yy_lp; \ -goto find_rule; \ -} -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -char *yytext; -#line 1 "./ada-lex.l" -#define INITIAL 0 -/* FLEX lexer for Ada expressions, for GDB. - Copyright (C) 1994, 1997, 2000 - Free Software Foundation, Inc. - -This file is part of GDB. - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/*----------------------------------------------------------------------*/ -/* The converted version of this file is to be included in ada-exp.y, */ -/* the Ada parser for gdb. The function yylex obtains characters from */ -/* the global pointer lexptr. It returns a syntactic category for */ -/* each successive token and places a semantic value into yylval */ -/* (ada-lval), defined by the parser. */ -/* Run flex with (at least) the -i option (case-insensitive), and the -I */ -/* option (interactive---no unnecessary lookahead). */ -#line 48 "./ada-lex.l" -#define NUMERAL_WIDTH 256 -#define LONGEST_SIGN ((ULONGEST) 1 << (sizeof(LONGEST) * HOST_CHAR_BIT - 1)) - -/* Temporary staging for numeric literals. */ -static char numbuf[NUMERAL_WIDTH]; - static void canonicalizeNumeral (char* s1, const char*); -static int processInt (const char*, const char*, const char*); -static int processReal (const char*); -static int processId (const char*, int); -static int processAttribute (const char*); -static int find_dot_all (const char*); - -#undef YY_DECL -#define YY_DECL static int yylex ( void ) - -#undef YY_INPUT -#define YY_INPUT(BUF, RESULT, MAX_SIZE) \ - if ( *lexptr == '\000' ) \ - (RESULT) = YY_NULL; \ - else \ - { \ - *(BUF) = *lexptr; \ - (RESULT) = 1; \ - lexptr += 1; \ - } - -static char *tempbuf = NULL; -static int tempbufsize = 0; -static int tempbuf_len; -static struct block* left_block_context; - -static void resize_tempbuf (unsigned int); - -static void block_lookup (char*, char*); - -static int name_lookup (char*, char*, int*); - -static int find_dot_all (const char*); - -#define IN_STRING 1 -#define BEFORE_QUAL_QUOTE 2 - - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); -#else -extern int yywrap YY_PROTO(( void )); -#endif -#endif - -#ifndef YY_NO_UNPUT -static void yyunput YY_PROTO(( int c, char *buf_ptr )); -#endif - -#ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); -#endif - -#ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif - -#else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 -#endif - -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ - -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ - { \ - int c = '*', n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \ - && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -#endif - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -YY_DECL - { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - -#line 91 "./ada-lex.l" - - - - if ( yy_init ) - { - yy_init = 0; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yy_start ) - yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_load_buffer_state(); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yy_start; - yy_state_ptr = yy_state_buf; - *yy_state_ptr++ = yy_current_state; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 363 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; - ++yy_cp; - } - while ( yy_base[yy_current_state] != 1771 ); - -yy_find_action: - yy_current_state = *--yy_state_ptr; - yy_lp = yy_accept[yy_current_state]; -find_rule: /* we branch to this label when backing up */ - for ( ; ; ) /* until we find what rule we matched */ - { - if ( yy_lp && yy_lp < yy_accept[yy_current_state + 1] ) - { - yy_act = yy_acclist[yy_lp]; - if ( yy_act & YY_TRAILING_HEAD_MASK || - yy_looking_for_trail_begin ) - { - if ( yy_act == yy_looking_for_trail_begin ) - { - yy_looking_for_trail_begin = 0; - yy_act &= ~YY_TRAILING_HEAD_MASK; - break; - } - } - else if ( yy_act & YY_TRAILING_MASK ) - { - yy_looking_for_trail_begin = yy_act & ~YY_TRAILING_MASK; - yy_looking_for_trail_begin |= YY_TRAILING_HEAD_MASK; - } - else - { - yy_full_match = yy_cp; - yy_full_state = yy_state_ptr; - yy_full_lp = yy_lp; - break; - } - ++yy_lp; - goto find_rule; - } - --yy_cp; - yy_current_state = *--yy_state_ptr; - yy_lp = yy_accept[yy_current_state]; - } - - YY_DO_BEFORE_ACTION; - - -do_action: /* This label is used only to access EOF actions. */ - - - switch ( yy_act ) - { /* beginning of action switch */ -case 1: -YY_RULE_SETUP -#line 93 "./ada-lex.l" -{ } - YY_BREAK -case 2: -YY_RULE_SETUP -#line 95 "./ada-lex.l" -{ yyterminate(); } - YY_BREAK -case 3: -YY_RULE_SETUP -#line 97 "./ada-lex.l" -{ - canonicalizeNumeral (numbuf, yytext); - return processInt (NULL, numbuf, strrchr(numbuf, 'e')+1); - } - YY_BREAK -case 4: -YY_RULE_SETUP -#line 102 "./ada-lex.l" -{ - canonicalizeNumeral (numbuf, yytext); - return processInt (NULL, numbuf, NULL); - } - YY_BREAK -case 5: -YY_RULE_SETUP -#line 107 "./ada-lex.l" -{ - canonicalizeNumeral (numbuf, yytext); - return processInt (numbuf, - strchr (numbuf, '#') + 1, - strrchr(numbuf, '#') + 1); - } - YY_BREAK -case 6: -YY_RULE_SETUP -#line 114 "./ada-lex.l" -{ - canonicalizeNumeral (numbuf, yytext); - return processInt (numbuf, strchr (numbuf, '#') + 1, NULL); - } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 119 "./ada-lex.l" -{ - canonicalizeNumeral (numbuf, yytext+2); - return processInt ("16#", numbuf, NULL); - } - YY_BREAK -case 8: -YY_RULE_SETUP -#line 125 "./ada-lex.l" -{ - canonicalizeNumeral (numbuf, yytext); - return processReal (numbuf); - } - YY_BREAK -case 9: -YY_RULE_SETUP -#line 130 "./ada-lex.l" -{ - canonicalizeNumeral (numbuf, yytext); - return processReal (numbuf); - } - YY_BREAK -case 10: -YY_RULE_SETUP -#line 135 "./ada-lex.l" -{ - error ("Based real literals not implemented yet."); - } - YY_BREAK -case 11: -YY_RULE_SETUP -#line 139 "./ada-lex.l" -{ - error ("Based real literals not implemented yet."); - } - YY_BREAK -case 12: -YY_RULE_SETUP -#line 143 "./ada-lex.l" -{ - yylval.typed_val.type = builtin_type_ada_char; - yylval.typed_val.val = yytext[1]; - return CHARLIT; - } - YY_BREAK -case 13: -YY_RULE_SETUP -#line 149 "./ada-lex.l" -{ - int v; - yylval.typed_val.type = builtin_type_ada_char; - sscanf (yytext+3, "%2x", &v); - yylval.typed_val.val = v; - return CHARLIT; - } - YY_BREAK -case 14: -YY_RULE_SETUP -#line 157 "./ada-lex.l" -{ return processId (yytext, yyleng); } - YY_BREAK -case 15: -YY_RULE_SETUP -#line 159 "./ada-lex.l" -{ - tempbuf_len = 0; - BEGIN IN_STRING; - } - YY_BREAK -case 16: -YY_RULE_SETUP -#line 164 "./ada-lex.l" -{ - resize_tempbuf (yyleng+tempbuf_len); - strncpy (tempbuf+tempbuf_len, yytext, yyleng-1); - tempbuf_len += yyleng-1; - yylval.sval.ptr = tempbuf; - yylval.sval.length = tempbuf_len; - BEGIN INITIAL; - return STRING; - } - YY_BREAK -case 17: -YY_RULE_SETUP -#line 174 "./ada-lex.l" -{ - int n; - resize_tempbuf (yyleng-5+tempbuf_len+1); - strncpy (tempbuf+tempbuf_len, yytext, yyleng-6); - sscanf(yytext+yyleng-4, "%2x", &n); - tempbuf[yyleng-6+tempbuf_len] = (char) n; - tempbuf_len += yyleng-5; - } - YY_BREAK -case 18: -YY_RULE_SETUP -#line 183 "./ada-lex.l" -{ - int n; - resize_tempbuf (yyleng-4+tempbuf_len+1); - strncpy (tempbuf+tempbuf_len, yytext, yyleng-6); - tempbuf[yyleng-5+tempbuf_len] = '"'; - tempbuf_len += yyleng-4; - } - YY_BREAK -case 19: -YY_RULE_SETUP -#line 191 "./ada-lex.l" -{ - while (*lexptr != 'i' && *lexptr != 'I') - lexptr -= 1; - yyrestart(NULL); - return 0; - } - YY_BREAK -/* ADA KEYWORDS */ -case 20: -YY_RULE_SETUP -#line 200 "./ada-lex.l" -{ return ABS; } - YY_BREAK -case 21: -YY_RULE_SETUP -#line 201 "./ada-lex.l" -{ return _AND_; } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 202 "./ada-lex.l" -{ return ELSE; } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 203 "./ada-lex.l" -{ return IN; } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 204 "./ada-lex.l" -{ return MOD; } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 205 "./ada-lex.l" -{ return NEW; } - YY_BREAK -case 26: -YY_RULE_SETUP -#line 206 "./ada-lex.l" -{ return NOT; } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 207 "./ada-lex.l" -{ return NULL_PTR; } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 208 "./ada-lex.l" -{ return OR; } - YY_BREAK -case 29: -YY_RULE_SETUP -#line 209 "./ada-lex.l" -{ return REM; } - YY_BREAK -case 30: -YY_RULE_SETUP -#line 210 "./ada-lex.l" -{ return THEN; } - YY_BREAK -case 31: -YY_RULE_SETUP -#line 211 "./ada-lex.l" -{ return XOR; } - YY_BREAK -/* ATTRIBUTES */ -case 32: -YY_RULE_SETUP -#line 215 "./ada-lex.l" -{ return processAttribute (yytext+1); } - YY_BREAK -/* PUNCTUATION */ -case 33: -YY_RULE_SETUP -#line 219 "./ada-lex.l" -{ return ARROW; } - YY_BREAK -case 34: -YY_RULE_SETUP -#line 220 "./ada-lex.l" -{ return DOTDOT; } - YY_BREAK -case 35: -YY_RULE_SETUP -#line 221 "./ada-lex.l" -{ return STARSTAR; } - YY_BREAK -case 36: -YY_RULE_SETUP -#line 222 "./ada-lex.l" -{ return ASSIGN; } - YY_BREAK -case 37: -YY_RULE_SETUP -#line 223 "./ada-lex.l" -{ return NOTEQUAL; } - YY_BREAK -case 38: -YY_RULE_SETUP -#line 224 "./ada-lex.l" -{ return LEQ; } - YY_BREAK -case 39: -YY_RULE_SETUP -#line 225 "./ada-lex.l" -{ return GEQ; } - YY_BREAK -case 40: -YY_RULE_SETUP -#line 227 "./ada-lex.l" -{ BEGIN INITIAL; return '\''; } - YY_BREAK -case 41: -YY_RULE_SETUP -#line 229 "./ada-lex.l" -{ return yytext[0]; } - YY_BREAK -case 42: -YY_RULE_SETUP -#line 231 "./ada-lex.l" -{ if (paren_depth == 0 && comma_terminates) - { - lexptr -= 1; - yyrestart(NULL); - return 0; - } - else - return ','; - } - YY_BREAK -case 43: -YY_RULE_SETUP -#line 241 "./ada-lex.l" -{ paren_depth += 1; return '('; } - YY_BREAK -case 44: -YY_RULE_SETUP -#line 242 "./ada-lex.l" -{ if (paren_depth == 0) - { - lexptr -= 1; - yyrestart(NULL); - return 0; - } - else - { - paren_depth -= 1; - return ')'; - } - } - YY_BREAK -case 45: -YY_RULE_SETUP -#line 255 "./ada-lex.l" -{ return DOT_ALL; } - YY_BREAK -case 46: -YY_RULE_SETUP -#line 257 "./ada-lex.l" -{ - processId (yytext+1, yyleng-1); - return DOT_ID; - } - YY_BREAK -case 47: -YY_RULE_SETUP -#line 262 "./ada-lex.l" -{ - int all_posn = find_dot_all (yytext); - int token_type, segments, k; - int quote_follows; - - if (all_posn == -1 && yytext[yyleng-1] == '\'') - { - quote_follows = 1; - do { - yyless (yyleng-1); - } while (yytext[yyleng-1] == ' '); - } - else - quote_follows = 0; - - if (all_posn >= 0) - yyless (all_posn); - processId(yytext, yyleng); - segments = name_lookup (ada_mangle (yylval.ssym.stoken.ptr), - yylval.ssym.stoken.ptr, &token_type); - left_block_context = NULL; - for (k = yyleng; segments > 0 && k > 0; k -= 1) - { - if (yytext[k-1] == '.') - segments -= 1; - quote_follows = 0; - } - if (k <= 0) - error ("confused by name %s", yytext); - yyless (k); - if (quote_follows) - BEGIN BEFORE_QUAL_QUOTE; - return token_type; - } - YY_BREAK -/* GDB EXPRESSION CONSTRUCTS */ -case 48: -YY_RULE_SETUP -#line 300 "./ada-lex.l" -{ - processId(yytext, yyleng-2); - block_lookup (yylval.ssym.stoken.ptr, yylval.ssym.stoken.ptr); - return BLOCKNAME; - } - YY_BREAK -case 49: -YY_RULE_SETUP -#line 306 "./ada-lex.l" -{ - processId(yytext, yyleng-2); - block_lookup (ada_mangle (yylval.ssym.stoken.ptr), - yylval.ssym.stoken.ptr); - return BLOCKNAME; - } - YY_BREAK -case 50: -YY_RULE_SETUP -#line 313 "./ada-lex.l" -{ return yytext[0]; } - YY_BREAK -case 51: -YY_RULE_SETUP -#line 315 "./ada-lex.l" -{ yylval.lval = -1; return LAST; } - YY_BREAK -case 52: -YY_RULE_SETUP -#line 316 "./ada-lex.l" -{ yylval.lval = -atoi(yytext+2); return LAST; } - YY_BREAK -case 53: -YY_RULE_SETUP -#line 317 "./ada-lex.l" -{ yylval.lval = 0; return LAST; } - YY_BREAK -case 54: -YY_RULE_SETUP -#line 318 "./ada-lex.l" -{ yylval.lval = atoi(yytext+1); return LAST; } - YY_BREAK -/* REGISTERS AND GDB CONVENIENCE VARIABLES */ -case 55: -YY_RULE_SETUP -#line 323 "./ada-lex.l" -{ - int c; - for (c = 0; c < NUM_REGS; c++) - if (REGISTER_NAME (c) && - strcmp (yytext + 1, REGISTER_NAME (c)) == 0) - { - yylval.lval = c; - return REGNAME; - } - yylval.sval.ptr = yytext; - yylval.sval.length = yyleng; - yylval.ivar = - lookup_internalvar (copy_name (yylval.sval) + 1); - return INTERNAL_VARIABLE; - } - YY_BREAK -/* CATCH-ALL ERROR CASE */ -case 56: -YY_RULE_SETUP -#line 341 "./ada-lex.l" -{ error ("Invalid character '%s' in expression.", yytext); } - YY_BREAK -case 57: -YY_RULE_SETUP -#line 342 "./ada-lex.l" -YY_FATAL_ERROR( "flex scanner jammed" ); - YY_BREAK - case YY_STATE_EOF(INITIAL): - case YY_STATE_EOF(IN_STRING): - case YY_STATE_EOF(BEFORE_QUAL_QUOTE): - yyterminate(); - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state ); - - yy_bp = yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yy_c_buf_p; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer() ) - { - case EOB_ACT_END_OF_FILE: - { - yy_did_buffer_switch_on_eof = 0; - - if ( yywrap() ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; - - yy_current_state = yy_get_previous_state(); - - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ - } /* end of yylex */ - - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ - -static int yy_get_next_buffer() - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( yy_current_buffer->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - yy_current_buffer->yy_n_chars = yy_n_chars = 0; - - else - { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; - - int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = yy_current_buffer->yy_buf_size - - number_to_move - 1; -#endif - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); - - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - if ( yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; - - return ret_val; - } - - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - -static yy_state_type yy_get_previous_state() - { - register yy_state_type yy_current_state; - register char *yy_cp; - - yy_current_state = yy_start; - yy_state_ptr = yy_state_buf; - *yy_state_ptr++ = yy_current_state; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 363 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - *yy_state_ptr++ = yy_current_state; - } - - return yy_current_state; - } - - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { - register int yy_is_jam; - - register YY_CHAR yy_c = 1; - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 363 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 362); - if ( ! yy_is_jam ) - *yy_state_ptr++ = yy_current_state; - - return yy_is_jam ? 0 : yy_current_state; - } - - -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; - register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; - - while ( source > yy_current_buffer->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; - - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ - - -#ifdef __cplusplus -static int yyinput() -#else -static int input() -#endif - { - int c; - - *yy_c_buf_p = yy_hold_char; - - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) - /* This was really a NUL. */ - *yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; - - switch ( yy_get_next_buffer() ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - yyrestart( yyin ); - - /* fall through */ - - case EOB_ACT_END_OF_FILE: - { - if ( yywrap() ) - return EOF; - - if ( ! yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(); -#else - return input(); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - - - return c; - } - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); - - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); - } - - -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) - return; - - if ( yy_current_buffer ) - { - /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; - } - - yy_current_buffer = new_buffer; - yy_load_buffer_state(); - - /* We don't actually know whether we did this switch during - * EOF (yywrap()) processing, but the only time this flag - * is looked at is after yywrap() is called, so it's safe - * to go ahead and always set it. - */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } - - -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - - b->yy_is_our_buffer = 1; - - yy_init_buffer( b, file ); - - return b; - } - - -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { - if ( ! b ) - return; - - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - - -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif - - - { - yy_flush_buffer( b ); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif - - { - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == yy_current_buffer ) - yy_load_buffer_state(); - } - - -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - yy_switch_to_buffer( b ); - - return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif - - -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; - - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; - - b = yy_scan_buffer( buf, n ); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; - } -#endif - - -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; -#endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); - - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); - - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); - - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } - - yy_start_stack[yy_start_stack_ptr++] = YY_START; - - BEGIN(new_state); - } -#endif - - -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); - - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif - - -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); - } - - - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) - - -/* Internal utility routines. */ - -#ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; - } -#endif - -#ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; - } -#endif - - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { - return (void *) malloc( size ); - } - -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); - } - -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } - -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 342 "./ada-lex.l" - - -#include -#include - -/* Initialize the lexer for processing new expression */ -void -lexer_init (FILE* inp) -{ - BEGIN INITIAL; - yyrestart (inp); -} - - -/* Make sure that tempbuf points at an array at least N characters long. */ - -static void -resize_tempbuf (n) - unsigned int n; -{ - if (tempbufsize < n) - { - tempbufsize = (n+63) & ~63; - tempbuf = (char*) xrealloc (tempbuf, tempbufsize); - } -} - -/* Copy S2 to S1, removing all underscores, and downcasing all letters. */ - -static void -canonicalizeNumeral (s1,s2) - char* s1; - const char* s2; -{ - for (; *s2 != '\000'; s2 += 1) - { - if (*s2 != '_') - { - *s1 = tolower(*s2); - s1 += 1; - } - } - s1[0] = '\000'; -} - -#define HIGH_BYTE_POSN ((sizeof (ULONGEST) - 1) * HOST_CHAR_BIT) - -/* True (non-zero) iff DIGIT is a valid digit in radix BASE, - where 2 <= BASE <= 16. */ - -static int -is_digit_in_base (digit, base) - unsigned char digit; - int base; -{ - if (!isxdigit (digit)) - return 0; - if (base <= 10) - return (isdigit (digit) && digit < base + '0'); - else - return (isdigit (digit) || tolower (digit) < base - 10 + 'a'); -} - -static int -digit_to_int (c) - unsigned char c; -{ - if (isdigit (c)) - return c - '0'; - else - return tolower (c) - 'a' + 10; -} - -/* As for strtoul, but for ULONGEST results. */ -ULONGEST -strtoulst (num, trailer, base) - const char *num; - const char **trailer; - int base; -{ - unsigned int high_part; - ULONGEST result; - int i; - unsigned char lim; - - if (base < 2 || base > 16) - { - errno = EINVAL; - return 0; - } - lim = base - 1 + '0'; - - result = high_part = 0; - for (i = 0; is_digit_in_base (num[i], base); i += 1) - { - result = result*base + digit_to_int (num[i]); - high_part = high_part*base + (unsigned int) (result >> HIGH_BYTE_POSN); - result &= ((ULONGEST) 1 << HIGH_BYTE_POSN) - 1; - if (high_part > 0xff) - { - errno = ERANGE; - result = high_part = 0; - break; - } - } - - if (trailer != NULL) - *trailer = &num[i]; - - return result + ((ULONGEST) high_part << HIGH_BYTE_POSN); -} - - - -/* Interprets the prefix of NUM that consists of digits of the given BASE - as an integer of that BASE, with the string EXP as an exponent. - Puts value in yylval, and returns INT, if the string is valid. Causes - an error if the number is improperly formated. BASE, if NULL, defaults - to "10", and EXP to "1". The EXP does not contain a leading 'e' or 'E'. */ - -static int -processInt (base0, num0, exp0) - const char* num0; - const char* base0; - const char* exp0; -{ - ULONGEST result; - long exp; - int base; - - char* trailer; - - if (base0 == NULL) - base = 10; - else - { - base = strtol (base0, (char**) NULL, 10); - if (base < 2 || base > 16) - error ("Invalid base: %d.", base); - } - - if (exp0 == NULL) - exp = 0; - else - exp = strtol(exp0, (char**) NULL, 10); - - errno = 0; - result = strtoulst (num0, &trailer, base); - if (errno == ERANGE) - error ("Integer literal out of range"); - if (isxdigit(*trailer)) - error ("Invalid digit `%c' in based literal", *trailer); - - while (exp > 0) - { - if (result > (ULONG_MAX / base)) - error ("Integer literal out of range"); - result *= base; - exp -= 1; - } - - if ((result >> (TARGET_INT_BIT-1)) == 0) - yylval.typed_val.type = builtin_type_ada_int; - else if ((result >> (TARGET_LONG_BIT-1)) == 0) - yylval.typed_val.type = builtin_type_ada_long; - else if (((result >> (TARGET_LONG_BIT-1)) >> 1) == 0) - { - /* We have a number representable as an unsigned integer quantity. - For consistency with the C treatment, we will treat it as an - anonymous modular (unsigned) quantity. Alas, the types are such - that we need to store .val as a signed quantity. Sorry - for the mess, but C doesn't officially guarantee that a simple - assignment does the trick (no, it doesn't; read the reference manual). - */ - yylval.typed_val.type = builtin_type_unsigned_long; - if (result & LONGEST_SIGN) - yylval.typed_val.val = - (LONGEST) (result & ~LONGEST_SIGN) - - (LONGEST_SIGN>>1) - (LONGEST_SIGN>>1); - else - yylval.typed_val.val = (LONGEST) result; - return INT; - } - else - yylval.typed_val.type = builtin_type_ada_long_long; - - yylval.typed_val.val = (LONGEST) result; - return INT; -} - -static int -processReal (num0) - const char* num0; -{ - if (sizeof (DOUBLEST) <= sizeof (float)) - sscanf (num0, "%g", &yylval.typed_val_float.dval); - else if (sizeof (DOUBLEST) <= sizeof (double)) - sscanf (num0, "%lg", &yylval.typed_val_float.dval); - else - { -#ifdef PRINTF_HAS_LONG_DOUBLE - sscanf (num0, "%Lg", &yylval.typed_val_float.dval); -#else - /* Scan it into a double, then convert and assign it to the - long double. This at least wins with values representable - in the range of doubles. */ - double temp; - sscanf (num0, "%lg", &temp); - yylval.typed_val_float.dval = temp; -#endif - } - - yylval.typed_val_float.type = builtin_type_ada_float; - if (sizeof(DOUBLEST) >= TARGET_DOUBLE_BIT / TARGET_CHAR_BIT) - yylval.typed_val_float.type = builtin_type_ada_double; - if (sizeof(DOUBLEST) >= TARGET_LONG_DOUBLE_BIT / TARGET_CHAR_BIT) - yylval.typed_val_float.type = builtin_type_ada_long_double; - - return FLOAT; -} - -static int -processId (name0, len) - const char *name0; - int len; -{ - char* name = xmalloc (len + 11); - int i0, i; - -/* add_name_string_cleanup (name); */ -/* FIXME: add_name_string_cleanup should be defined in parse.c */ - while (len > 0 && isspace (name0[len-1])) - len -= 1; - i = i0 = 0; - while (i0 < len) - { - if (isalnum (name0[i0])) - { - name[i] = tolower (name0[i0]); - i += 1; i0 += 1; - } - else switch (name0[i0]) - { - default: - name[i] = name0[i0]; - i += 1; i0 += 1; - break; - case ' ': case '\t': - i0 += 1; - break; - case '\'': - i0 += 1; - while (i0 < len && name0[i0] != '\'') - { - name[i] = name0[i0]; - i += 1; i0 += 1; - } - i0 += 1; - break; - case '<': - i0 += 1; - while (i0 < len && name0[i0] != '>') - { - name[i] = name0[i0]; - i += 1; i0 += 1; - } - i0 += 1; - break; - } - } - name[i] = '\000'; - - yylval.ssym.sym = NULL; - yylval.ssym.stoken.ptr = name; - yylval.ssym.stoken.length = i; - return NAME; -} - -static void -block_lookup (name, err_name) - char* name; - char* err_name; -{ - struct symbol** syms; - struct block** blocks; - int nsyms; - struct symtab *symtab; - nsyms = ada_lookup_symbol_list (name, left_block_context, - VAR_NAMESPACE, &syms, &blocks); - if (left_block_context == NULL && - (nsyms == 0 || SYMBOL_CLASS (syms[0]) != LOC_BLOCK)) - symtab = lookup_symtab (name); - else - symtab = NULL; - - if (symtab != NULL) - left_block_context = yylval.bval = - BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK); - else if (nsyms == 0 || SYMBOL_CLASS (syms[0]) != LOC_BLOCK) - { - if (left_block_context == NULL) - error ("No file or function \"%s\".", err_name); - else - error ("No function \"%s\" in specified context.", err_name); - } - else - { - left_block_context = yylval.bval = SYMBOL_BLOCK_VALUE (syms[0]); - if (nsyms > 1) - warning ("Function name \"%s\" ambiguous here", err_name); - } -} - -/* Look up NAME0 (assumed to be mangled) as a name in VAR_NAMESPACE, - setting *TOKEN_TYPE to NAME or TYPENAME, depending on what is - found. Try first the entire name, then the name without the last - segment (i.e., after the last .id), etc., and return the number of - segments that had to be removed to get a match. Calls error if no - matches are found, using ERR_NAME in any error message. When - exactly one symbol match is found, it is placed in yylval. */ - -static int -name_lookup (name0, err_name, token_type) - char* name0; - char* err_name; - int* token_type; -{ - struct symbol** syms; - struct block** blocks; - struct type* type; - int len0 = strlen (name0); - char* name = savestring (name0, len0); - int nsyms; - int segments; - -/* add_name_string_cleanup (name);*/ -/* FIXME: add_name_string_cleanup should be defined in parse.c */ - yylval.ssym.stoken.ptr = name; - yylval.ssym.stoken.length = strlen (name); - for (segments = 0; ; segments += 1) - { - struct type* preferred_type; - int i, preferred_index; - - if (left_block_context == NULL) - nsyms = ada_lookup_symbol_list (name, expression_context_block, - VAR_NAMESPACE, &syms, &blocks); - else - nsyms = ada_lookup_symbol_list (name, left_block_context, - VAR_NAMESPACE, &syms, &blocks); - - /* Check for a type definition. */ - - /* Look for a symbol that doesn't denote void. This is (I think) a */ - /* temporary kludge to get around problems in GNAT output. */ - preferred_index = -1; preferred_type = NULL; - for (i = 0; i < nsyms; i += 1) - switch (SYMBOL_CLASS (syms[i])) - { - case LOC_TYPEDEF: - if (ada_prefer_type (SYMBOL_TYPE (syms[i]), preferred_type)) - { - preferred_index = i; - preferred_type = SYMBOL_TYPE (syms[i]); - } - break; - case LOC_REGISTER: - case LOC_ARG: - case LOC_REF_ARG: - case LOC_REGPARM: - case LOC_REGPARM_ADDR: - case LOC_LOCAL: - case LOC_LOCAL_ARG: - case LOC_BASEREG: - case LOC_BASEREG_ARG: - goto NotType; - default: - break; - } - if (preferred_type != NULL) - { -/* if (TYPE_CODE (preferred_type) == TYPE_CODE_VOID) - error ("`%s' matches only void type name(s)", - ada_demangle (name)); -*/ -/* FIXME: ada_demangle should be defined in defs.h, and is located in ada-lang.c */ -/* else*/ if (ada_is_object_renaming (syms[preferred_index])) - { - yylval.ssym.sym = syms[preferred_index]; - *token_type = OBJECT_RENAMING; - return segments; - } - else if (ada_renaming_type (SYMBOL_TYPE (syms[preferred_index])) - != NULL) - { - int result; - const char* renaming = - ada_simple_renamed_entity (syms[preferred_index]); - char* new_name = xmalloc (strlen (renaming) + len0 - - yylval.ssym.stoken.length + 1); -/* add_name_string_cleanup (new_name);*/ -/* FIXME: add_name_string_cleanup should be defined in parse.c */ - strcpy (new_name, renaming); - strcat (new_name, name0 + yylval.ssym.stoken.length); - result = name_lookup (new_name, err_name, token_type); - if (result > segments) - error ("Confused by renamed symbol."); - return result; - } - else if (segments == 0) - { - yylval.tval = preferred_type; - *token_type = TYPENAME; - return 0; - } - } - - if (segments == 0) - { - type = lookup_primitive_typename (name); - if (type == NULL && STREQ ("system__address", name)) - type = builtin_type_ada_system_address; - if (type != NULL) - { - yylval.tval = type; - *token_type = TYPENAME; - return 0; - } - } - - NotType: - if (nsyms == 1) - { - *token_type = NAME; - yylval.ssym.sym = syms[0]; - yylval.ssym.msym = NULL; - yylval.ssym.block = blocks[0]; - return segments; - } - else if (nsyms == 0) { - int i; - yylval.ssym.msym = ada_lookup_minimal_symbol (name); - if (yylval.ssym.msym != NULL) - { - yylval.ssym.sym = NULL; - yylval.ssym.block = NULL; - *token_type = NAME; - return segments; - } - - for (i = yylval.ssym.stoken.length - 1; i > 0; i -= 1) - { - if (name[i] == '.') - { - name[i] = '\0'; - yylval.ssym.stoken.length = i; - break; - } - else if (name[i] == '_' && name[i-1] == '_') - { - i -= 1; - name[i] = '\0'; - yylval.ssym.stoken.length = i; - break; - } - } - if (i <= 0) - { - if (!have_full_symbols () && !have_partial_symbols () - && left_block_context == NULL) - error ("No symbol table is loaded. Use the \"file\" command."); - if (left_block_context == NULL) - error ("No definition of \"%s\" in current context.", - err_name); - else - error ("No definition of \"%s\" in specified context.", - err_name); - } - } - else - { - *token_type = NAME; - yylval.ssym.sym = NULL; - yylval.ssym.msym = NULL; - if (left_block_context == NULL) - yylval.ssym.block = expression_context_block; - else - yylval.ssym.block = left_block_context; - return segments; - } - } -} - -/* Returns the position within STR of the '.' in a - '.{WHITE}*all' component of a dotted name, or -1 if there is none. */ -static int -find_dot_all (str) - const char* str; -{ - int i; - for (i = 0; str[i] != '\000'; i += 1) - { - if (str[i] == '.') - { - int i0 = i; - do - i += 1; - while (isspace (str[i])); - if (strcmp (str+i, "all") == 0 - && ! isalnum (str[i+3]) && str[i+3] != '_') - return i0; - } - } - return -1; -} - -/* Returns non-zero iff string SUBSEQ matches a subsequence of STR, ignoring - case. */ - -static int -subseqMatch (subseq, str) - const char* subseq; - const char* str; -{ - if (subseq[0] == '\0') - return 1; - else if (str[0] == '\0') - return 0; - else if (tolower (subseq[0]) == tolower (str[0])) - return subseqMatch (subseq+1, str+1) || subseqMatch (subseq, str+1); - else - return subseqMatch (subseq, str+1); -} - - -static struct { const char* name; int code; } -attributes[] = { - { "address", TICK_ADDRESS }, - { "unchecked_access", TICK_ACCESS }, - { "unrestricted_access", TICK_ACCESS }, - { "access", TICK_ACCESS }, - { "first", TICK_FIRST }, - { "last", TICK_LAST }, - { "length", TICK_LENGTH }, - { "max", TICK_MAX }, - { "min", TICK_MIN }, - { "modulus", TICK_MODULUS }, - { "pos", TICK_POS }, - { "range", TICK_RANGE }, - { "size", TICK_SIZE }, - { "tag", TICK_TAG }, - { "val", TICK_VAL }, - { NULL, -1 } -}; - -/* Return the syntactic code corresponding to the attribute name or - abbreviation STR. */ - -static int -processAttribute (str) - const char* str; -{ - int i, k; - - for (i = 0; attributes[i].code != -1; i += 1) - if (strcasecmp (str, attributes[i].name) == 0) - return attributes[i].code; - - for (i = 0, k = -1; attributes[i].code != -1; i += 1) - if (subseqMatch (str, attributes[i].name)) - { - if (k == -1) - k = i; - else - error ("ambiguous attribute name: `%s'", str); - } - if (k == -1) - error ("unrecognized attribute: `%s'", str); - - return attributes[k].code; -} - -int -yywrap() -{ - return 1; -}