1*ef5ccd6cSJohn Marino
2*ef5ccd6cSJohn Marino /* A Bison parser, made by GNU Bison 2.4.1. */
3*ef5ccd6cSJohn Marino
4*ef5ccd6cSJohn Marino /* Skeleton implementation for Bison's Yacc-like parsers in C
5*ef5ccd6cSJohn Marino
6*ef5ccd6cSJohn Marino Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7*ef5ccd6cSJohn Marino Free Software Foundation, Inc.
8*ef5ccd6cSJohn Marino
9*ef5ccd6cSJohn Marino This program is free software: you can redistribute it and/or modify
10*ef5ccd6cSJohn Marino it under the terms of the GNU General Public License as published by
11*ef5ccd6cSJohn Marino the Free Software Foundation, either version 3 of the License, or
12*ef5ccd6cSJohn Marino (at your option) any later version.
13*ef5ccd6cSJohn Marino
14*ef5ccd6cSJohn Marino This program is distributed in the hope that it will be useful,
15*ef5ccd6cSJohn Marino but WITHOUT ANY WARRANTY; without even the implied warranty of
16*ef5ccd6cSJohn Marino MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17*ef5ccd6cSJohn Marino GNU General Public License for more details.
18*ef5ccd6cSJohn Marino
19*ef5ccd6cSJohn Marino You should have received a copy of the GNU General Public License
20*ef5ccd6cSJohn Marino along with this program. If not, see <http://www.gnu.org/licenses/>. */
21*ef5ccd6cSJohn Marino
22*ef5ccd6cSJohn Marino /* As a special exception, you may create a larger work that contains
23*ef5ccd6cSJohn Marino part or all of the Bison parser skeleton and distribute that work
24*ef5ccd6cSJohn Marino under terms of your choice, so long as that work isn't itself a
25*ef5ccd6cSJohn Marino parser generator using the skeleton or a modified version thereof
26*ef5ccd6cSJohn Marino as a parser skeleton. Alternatively, if you modify or redistribute
27*ef5ccd6cSJohn Marino the parser skeleton itself, you may (at your option) remove this
28*ef5ccd6cSJohn Marino special exception, which will cause the skeleton and the resulting
29*ef5ccd6cSJohn Marino Bison output files to be licensed under the GNU General Public
30*ef5ccd6cSJohn Marino License without this special exception.
31*ef5ccd6cSJohn Marino
32*ef5ccd6cSJohn Marino This special exception was added by the Free Software Foundation in
33*ef5ccd6cSJohn Marino version 2.2 of Bison. */
34*ef5ccd6cSJohn Marino
35*ef5ccd6cSJohn Marino /* C LALR(1) parser skeleton written by Richard Stallman, by
36*ef5ccd6cSJohn Marino simplifying the original so-called "semantic" parser. */
37*ef5ccd6cSJohn Marino
38*ef5ccd6cSJohn Marino /* All symbols defined below should begin with yy or YY, to avoid
39*ef5ccd6cSJohn Marino infringing on user name space. This should be done even for local
40*ef5ccd6cSJohn Marino variables, as they might otherwise be expanded by user macros.
41*ef5ccd6cSJohn Marino There are some unavoidable exceptions within include files to
42*ef5ccd6cSJohn Marino define necessary library symbols; they are noted "INFRINGES ON
43*ef5ccd6cSJohn Marino USER NAME SPACE" below. */
44*ef5ccd6cSJohn Marino
45*ef5ccd6cSJohn Marino /* Identify Bison output. */
46*ef5ccd6cSJohn Marino #define YYBISON 1
47*ef5ccd6cSJohn Marino
48*ef5ccd6cSJohn Marino /* Bison version. */
49*ef5ccd6cSJohn Marino #define YYBISON_VERSION "2.4.1"
50*ef5ccd6cSJohn Marino
51*ef5ccd6cSJohn Marino /* Skeleton name. */
52*ef5ccd6cSJohn Marino #define YYSKELETON_NAME "yacc.c"
53*ef5ccd6cSJohn Marino
54*ef5ccd6cSJohn Marino /* Pure parsers. */
55*ef5ccd6cSJohn Marino #define YYPURE 0
56*ef5ccd6cSJohn Marino
57*ef5ccd6cSJohn Marino /* Push parsers. */
58*ef5ccd6cSJohn Marino #define YYPUSH 0
59*ef5ccd6cSJohn Marino
60*ef5ccd6cSJohn Marino /* Pull parsers. */
61*ef5ccd6cSJohn Marino #define YYPULL 1
62*ef5ccd6cSJohn Marino
63*ef5ccd6cSJohn Marino /* Using locations. */
64*ef5ccd6cSJohn Marino #define YYLSP_NEEDED 0
65*ef5ccd6cSJohn Marino
66*ef5ccd6cSJohn Marino
67*ef5ccd6cSJohn Marino
68*ef5ccd6cSJohn Marino /* Copy the first part of user declarations. */
69*ef5ccd6cSJohn Marino
70*ef5ccd6cSJohn Marino /* Line 189 of yacc.c */
71*ef5ccd6cSJohn Marino #line 36 "ada-exp.y"
72*ef5ccd6cSJohn Marino
73*ef5ccd6cSJohn Marino
74*ef5ccd6cSJohn Marino #include "defs.h"
75*ef5ccd6cSJohn Marino #include "gdb_string.h"
76*ef5ccd6cSJohn Marino #include <ctype.h>
77*ef5ccd6cSJohn Marino #include "expression.h"
78*ef5ccd6cSJohn Marino #include "value.h"
79*ef5ccd6cSJohn Marino #include "parser-defs.h"
80*ef5ccd6cSJohn Marino #include "language.h"
81*ef5ccd6cSJohn Marino #include "ada-lang.h"
82*ef5ccd6cSJohn Marino #include "bfd.h" /* Required by objfiles.h. */
83*ef5ccd6cSJohn Marino #include "symfile.h" /* Required by objfiles.h. */
84*ef5ccd6cSJohn Marino #include "objfiles.h" /* For have_full_symbols and have_partial_symbols */
85*ef5ccd6cSJohn Marino #include "frame.h"
86*ef5ccd6cSJohn Marino #include "block.h"
87*ef5ccd6cSJohn Marino
88*ef5ccd6cSJohn Marino #define parse_type builtin_type (parse_gdbarch)
89*ef5ccd6cSJohn Marino
90*ef5ccd6cSJohn Marino /* Remap normal yacc parser interface names (yyparse, yylex, yyerror, etc),
91*ef5ccd6cSJohn Marino as well as gratuitiously global symbol names, so we can have multiple
92*ef5ccd6cSJohn Marino yacc generated parsers in gdb. These are only the variables
93*ef5ccd6cSJohn Marino produced by yacc. If other parser generators (bison, byacc, etc) produce
94*ef5ccd6cSJohn Marino additional global names that conflict at link time, then those parser
95*ef5ccd6cSJohn Marino generators need to be fixed instead of adding those names to this list. */
96*ef5ccd6cSJohn Marino
97*ef5ccd6cSJohn Marino /* NOTE: This is clumsy, especially since BISON and FLEX provide --prefix
98*ef5ccd6cSJohn Marino options. I presume we are maintaining it to accommodate systems
99*ef5ccd6cSJohn Marino without BISON? (PNH) */
100*ef5ccd6cSJohn Marino
101*ef5ccd6cSJohn Marino #define yymaxdepth ada_maxdepth
102*ef5ccd6cSJohn Marino #define yyparse _ada_parse /* ada_parse calls this after initialization */
103*ef5ccd6cSJohn Marino #define yylex ada_lex
104*ef5ccd6cSJohn Marino #define yyerror ada_error
105*ef5ccd6cSJohn Marino #define yylval ada_lval
106*ef5ccd6cSJohn Marino #define yychar ada_char
107*ef5ccd6cSJohn Marino #define yydebug ada_debug
108*ef5ccd6cSJohn Marino #define yypact ada_pact
109*ef5ccd6cSJohn Marino #define yyr1 ada_r1
110*ef5ccd6cSJohn Marino #define yyr2 ada_r2
111*ef5ccd6cSJohn Marino #define yydef ada_def
112*ef5ccd6cSJohn Marino #define yychk ada_chk
113*ef5ccd6cSJohn Marino #define yypgo ada_pgo
114*ef5ccd6cSJohn Marino #define yyact ada_act
115*ef5ccd6cSJohn Marino #define yyexca ada_exca
116*ef5ccd6cSJohn Marino #define yyerrflag ada_errflag
117*ef5ccd6cSJohn Marino #define yynerrs ada_nerrs
118*ef5ccd6cSJohn Marino #define yyps ada_ps
119*ef5ccd6cSJohn Marino #define yypv ada_pv
120*ef5ccd6cSJohn Marino #define yys ada_s
121*ef5ccd6cSJohn Marino #define yy_yys ada_yys
122*ef5ccd6cSJohn Marino #define yystate ada_state
123*ef5ccd6cSJohn Marino #define yytmp ada_tmp
124*ef5ccd6cSJohn Marino #define yyv ada_v
125*ef5ccd6cSJohn Marino #define yy_yyv ada_yyv
126*ef5ccd6cSJohn Marino #define yyval ada_val
127*ef5ccd6cSJohn Marino #define yylloc ada_lloc
128*ef5ccd6cSJohn Marino #define yyreds ada_reds /* With YYDEBUG defined */
129*ef5ccd6cSJohn Marino #define yytoks ada_toks /* With YYDEBUG defined */
130*ef5ccd6cSJohn Marino #define yyname ada_name /* With YYDEBUG defined */
131*ef5ccd6cSJohn Marino #define yyrule ada_rule /* With YYDEBUG defined */
132*ef5ccd6cSJohn Marino #define yyss ada_yyss
133*ef5ccd6cSJohn Marino #define yysslim ada_yysslim
134*ef5ccd6cSJohn Marino #define yyssp ada_yyssp
135*ef5ccd6cSJohn Marino #define yystacksize ada_yystacksize
136*ef5ccd6cSJohn Marino #define yyvs ada_yyvs
137*ef5ccd6cSJohn Marino #define yyvsp ada_yyvsp
138*ef5ccd6cSJohn Marino
139*ef5ccd6cSJohn Marino #ifndef YYDEBUG
140*ef5ccd6cSJohn Marino #define YYDEBUG 1 /* Default to yydebug support */
141*ef5ccd6cSJohn Marino #endif
142*ef5ccd6cSJohn Marino
143*ef5ccd6cSJohn Marino #define YYFPRINTF parser_fprintf
144*ef5ccd6cSJohn Marino
145*ef5ccd6cSJohn Marino struct name_info {
146*ef5ccd6cSJohn Marino struct symbol *sym;
147*ef5ccd6cSJohn Marino struct minimal_symbol *msym;
148*ef5ccd6cSJohn Marino struct block *block;
149*ef5ccd6cSJohn Marino struct stoken stoken;
150*ef5ccd6cSJohn Marino };
151*ef5ccd6cSJohn Marino
152*ef5ccd6cSJohn Marino static struct stoken empty_stoken = { "", 0 };
153*ef5ccd6cSJohn Marino
154*ef5ccd6cSJohn Marino /* If expression is in the context of TYPE'(...), then TYPE, else
155*ef5ccd6cSJohn Marino * NULL. */
156*ef5ccd6cSJohn Marino static struct type *type_qualifier;
157*ef5ccd6cSJohn Marino
158*ef5ccd6cSJohn Marino int yyparse (void);
159*ef5ccd6cSJohn Marino
160*ef5ccd6cSJohn Marino static int yylex (void);
161*ef5ccd6cSJohn Marino
162*ef5ccd6cSJohn Marino void yyerror (char *);
163*ef5ccd6cSJohn Marino
164*ef5ccd6cSJohn Marino static struct stoken string_to_operator (struct stoken);
165*ef5ccd6cSJohn Marino
166*ef5ccd6cSJohn Marino static void write_int (LONGEST, struct type *);
167*ef5ccd6cSJohn Marino
168*ef5ccd6cSJohn Marino static void write_object_renaming (const struct block *, const char *, int,
169*ef5ccd6cSJohn Marino const char *, int);
170*ef5ccd6cSJohn Marino
171*ef5ccd6cSJohn Marino static struct type* write_var_or_type (const struct block *, struct stoken);
172*ef5ccd6cSJohn Marino
173*ef5ccd6cSJohn Marino static void write_name_assoc (struct stoken);
174*ef5ccd6cSJohn Marino
175*ef5ccd6cSJohn Marino static void write_exp_op_with_string (enum exp_opcode, struct stoken);
176*ef5ccd6cSJohn Marino
177*ef5ccd6cSJohn Marino static struct block *block_lookup (struct block *, char *);
178*ef5ccd6cSJohn Marino
179*ef5ccd6cSJohn Marino static LONGEST convert_char_literal (struct type *, LONGEST);
180*ef5ccd6cSJohn Marino
181*ef5ccd6cSJohn Marino static void write_ambiguous_var (const struct block *, char *, int);
182*ef5ccd6cSJohn Marino
183*ef5ccd6cSJohn Marino static struct type *type_int (void);
184*ef5ccd6cSJohn Marino
185*ef5ccd6cSJohn Marino static struct type *type_long (void);
186*ef5ccd6cSJohn Marino
187*ef5ccd6cSJohn Marino static struct type *type_long_long (void);
188*ef5ccd6cSJohn Marino
189*ef5ccd6cSJohn Marino static struct type *type_float (void);
190*ef5ccd6cSJohn Marino
191*ef5ccd6cSJohn Marino static struct type *type_double (void);
192*ef5ccd6cSJohn Marino
193*ef5ccd6cSJohn Marino static struct type *type_long_double (void);
194*ef5ccd6cSJohn Marino
195*ef5ccd6cSJohn Marino static struct type *type_char (void);
196*ef5ccd6cSJohn Marino
197*ef5ccd6cSJohn Marino static struct type *type_boolean (void);
198*ef5ccd6cSJohn Marino
199*ef5ccd6cSJohn Marino static struct type *type_system_address (void);
200*ef5ccd6cSJohn Marino
201*ef5ccd6cSJohn Marino
202*ef5ccd6cSJohn Marino
203*ef5ccd6cSJohn Marino /* Line 189 of yacc.c */
204*ef5ccd6cSJohn Marino #line 205 "ada-exp.c"
205*ef5ccd6cSJohn Marino
206*ef5ccd6cSJohn Marino /* Enabling traces. */
207*ef5ccd6cSJohn Marino #ifndef YYDEBUG
208*ef5ccd6cSJohn Marino # define YYDEBUG 0
209*ef5ccd6cSJohn Marino #endif
210*ef5ccd6cSJohn Marino
211*ef5ccd6cSJohn Marino /* Enabling verbose error messages. */
212*ef5ccd6cSJohn Marino #ifdef YYERROR_VERBOSE
213*ef5ccd6cSJohn Marino # undef YYERROR_VERBOSE
214*ef5ccd6cSJohn Marino # define YYERROR_VERBOSE 1
215*ef5ccd6cSJohn Marino #else
216*ef5ccd6cSJohn Marino # define YYERROR_VERBOSE 0
217*ef5ccd6cSJohn Marino #endif
218*ef5ccd6cSJohn Marino
219*ef5ccd6cSJohn Marino /* Enabling the token table. */
220*ef5ccd6cSJohn Marino #ifndef YYTOKEN_TABLE
221*ef5ccd6cSJohn Marino # define YYTOKEN_TABLE 0
222*ef5ccd6cSJohn Marino #endif
223*ef5ccd6cSJohn Marino
224*ef5ccd6cSJohn Marino
225*ef5ccd6cSJohn Marino /* Tokens. */
226*ef5ccd6cSJohn Marino #ifndef YYTOKENTYPE
227*ef5ccd6cSJohn Marino # define YYTOKENTYPE
228*ef5ccd6cSJohn Marino /* Put the tokens into the symbol table, so that GDB and other debuggers
229*ef5ccd6cSJohn Marino know about them. */
230*ef5ccd6cSJohn Marino enum yytokentype {
231*ef5ccd6cSJohn Marino INT = 258,
232*ef5ccd6cSJohn Marino NULL_PTR = 259,
233*ef5ccd6cSJohn Marino CHARLIT = 260,
234*ef5ccd6cSJohn Marino FLOAT = 261,
235*ef5ccd6cSJohn Marino TRUEKEYWORD = 262,
236*ef5ccd6cSJohn Marino FALSEKEYWORD = 263,
237*ef5ccd6cSJohn Marino COLONCOLON = 264,
238*ef5ccd6cSJohn Marino STRING = 265,
239*ef5ccd6cSJohn Marino NAME = 266,
240*ef5ccd6cSJohn Marino DOT_ID = 267,
241*ef5ccd6cSJohn Marino DOT_ALL = 268,
242*ef5ccd6cSJohn Marino SPECIAL_VARIABLE = 269,
243*ef5ccd6cSJohn Marino ASSIGN = 270,
244*ef5ccd6cSJohn Marino ELSE = 271,
245*ef5ccd6cSJohn Marino THEN = 272,
246*ef5ccd6cSJohn Marino XOR = 273,
247*ef5ccd6cSJohn Marino OR = 274,
248*ef5ccd6cSJohn Marino _AND_ = 275,
249*ef5ccd6cSJohn Marino DOTDOT = 276,
250*ef5ccd6cSJohn Marino IN = 277,
251*ef5ccd6cSJohn Marino GEQ = 278,
252*ef5ccd6cSJohn Marino LEQ = 279,
253*ef5ccd6cSJohn Marino NOTEQUAL = 280,
254*ef5ccd6cSJohn Marino UNARY = 281,
255*ef5ccd6cSJohn Marino REM = 282,
256*ef5ccd6cSJohn Marino MOD = 283,
257*ef5ccd6cSJohn Marino NOT = 284,
258*ef5ccd6cSJohn Marino ABS = 285,
259*ef5ccd6cSJohn Marino STARSTAR = 286,
260*ef5ccd6cSJohn Marino VAR = 287,
261*ef5ccd6cSJohn Marino ARROW = 288,
262*ef5ccd6cSJohn Marino TICK_LENGTH = 289,
263*ef5ccd6cSJohn Marino TICK_LAST = 290,
264*ef5ccd6cSJohn Marino TICK_FIRST = 291,
265*ef5ccd6cSJohn Marino TICK_ADDRESS = 292,
266*ef5ccd6cSJohn Marino TICK_ACCESS = 293,
267*ef5ccd6cSJohn Marino TICK_MODULUS = 294,
268*ef5ccd6cSJohn Marino TICK_MIN = 295,
269*ef5ccd6cSJohn Marino TICK_MAX = 296,
270*ef5ccd6cSJohn Marino TICK_VAL = 297,
271*ef5ccd6cSJohn Marino TICK_TAG = 298,
272*ef5ccd6cSJohn Marino TICK_SIZE = 299,
273*ef5ccd6cSJohn Marino TICK_RANGE = 300,
274*ef5ccd6cSJohn Marino TICK_POS = 301,
275*ef5ccd6cSJohn Marino NEW = 302,
276*ef5ccd6cSJohn Marino OTHERS = 303
277*ef5ccd6cSJohn Marino };
278*ef5ccd6cSJohn Marino #endif
279*ef5ccd6cSJohn Marino /* Tokens. */
280*ef5ccd6cSJohn Marino #define INT 258
281*ef5ccd6cSJohn Marino #define NULL_PTR 259
282*ef5ccd6cSJohn Marino #define CHARLIT 260
283*ef5ccd6cSJohn Marino #define FLOAT 261
284*ef5ccd6cSJohn Marino #define TRUEKEYWORD 262
285*ef5ccd6cSJohn Marino #define FALSEKEYWORD 263
286*ef5ccd6cSJohn Marino #define COLONCOLON 264
287*ef5ccd6cSJohn Marino #define STRING 265
288*ef5ccd6cSJohn Marino #define NAME 266
289*ef5ccd6cSJohn Marino #define DOT_ID 267
290*ef5ccd6cSJohn Marino #define DOT_ALL 268
291*ef5ccd6cSJohn Marino #define SPECIAL_VARIABLE 269
292*ef5ccd6cSJohn Marino #define ASSIGN 270
293*ef5ccd6cSJohn Marino #define ELSE 271
294*ef5ccd6cSJohn Marino #define THEN 272
295*ef5ccd6cSJohn Marino #define XOR 273
296*ef5ccd6cSJohn Marino #define OR 274
297*ef5ccd6cSJohn Marino #define _AND_ 275
298*ef5ccd6cSJohn Marino #define DOTDOT 276
299*ef5ccd6cSJohn Marino #define IN 277
300*ef5ccd6cSJohn Marino #define GEQ 278
301*ef5ccd6cSJohn Marino #define LEQ 279
302*ef5ccd6cSJohn Marino #define NOTEQUAL 280
303*ef5ccd6cSJohn Marino #define UNARY 281
304*ef5ccd6cSJohn Marino #define REM 282
305*ef5ccd6cSJohn Marino #define MOD 283
306*ef5ccd6cSJohn Marino #define NOT 284
307*ef5ccd6cSJohn Marino #define ABS 285
308*ef5ccd6cSJohn Marino #define STARSTAR 286
309*ef5ccd6cSJohn Marino #define VAR 287
310*ef5ccd6cSJohn Marino #define ARROW 288
311*ef5ccd6cSJohn Marino #define TICK_LENGTH 289
312*ef5ccd6cSJohn Marino #define TICK_LAST 290
313*ef5ccd6cSJohn Marino #define TICK_FIRST 291
314*ef5ccd6cSJohn Marino #define TICK_ADDRESS 292
315*ef5ccd6cSJohn Marino #define TICK_ACCESS 293
316*ef5ccd6cSJohn Marino #define TICK_MODULUS 294
317*ef5ccd6cSJohn Marino #define TICK_MIN 295
318*ef5ccd6cSJohn Marino #define TICK_MAX 296
319*ef5ccd6cSJohn Marino #define TICK_VAL 297
320*ef5ccd6cSJohn Marino #define TICK_TAG 298
321*ef5ccd6cSJohn Marino #define TICK_SIZE 299
322*ef5ccd6cSJohn Marino #define TICK_RANGE 300
323*ef5ccd6cSJohn Marino #define TICK_POS 301
324*ef5ccd6cSJohn Marino #define NEW 302
325*ef5ccd6cSJohn Marino #define OTHERS 303
326*ef5ccd6cSJohn Marino
327*ef5ccd6cSJohn Marino
328*ef5ccd6cSJohn Marino
329*ef5ccd6cSJohn Marino
330*ef5ccd6cSJohn Marino #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
331*ef5ccd6cSJohn Marino typedef union YYSTYPE
332*ef5ccd6cSJohn Marino {
333*ef5ccd6cSJohn Marino
334*ef5ccd6cSJohn Marino /* Line 214 of yacc.c */
335*ef5ccd6cSJohn Marino #line 168 "ada-exp.y"
336*ef5ccd6cSJohn Marino
337*ef5ccd6cSJohn Marino LONGEST lval;
338*ef5ccd6cSJohn Marino struct {
339*ef5ccd6cSJohn Marino LONGEST val;
340*ef5ccd6cSJohn Marino struct type *type;
341*ef5ccd6cSJohn Marino } typed_val;
342*ef5ccd6cSJohn Marino struct {
343*ef5ccd6cSJohn Marino DOUBLEST dval;
344*ef5ccd6cSJohn Marino struct type *type;
345*ef5ccd6cSJohn Marino } typed_val_float;
346*ef5ccd6cSJohn Marino struct type *tval;
347*ef5ccd6cSJohn Marino struct stoken sval;
348*ef5ccd6cSJohn Marino struct block *bval;
349*ef5ccd6cSJohn Marino struct internalvar *ivar;
350*ef5ccd6cSJohn Marino
351*ef5ccd6cSJohn Marino
352*ef5ccd6cSJohn Marino
353*ef5ccd6cSJohn Marino /* Line 214 of yacc.c */
354*ef5ccd6cSJohn Marino #line 355 "ada-exp.c"
355*ef5ccd6cSJohn Marino } YYSTYPE;
356*ef5ccd6cSJohn Marino # define YYSTYPE_IS_TRIVIAL 1
357*ef5ccd6cSJohn Marino # define yystype YYSTYPE /* obsolescent; will be withdrawn */
358*ef5ccd6cSJohn Marino # define YYSTYPE_IS_DECLARED 1
359*ef5ccd6cSJohn Marino #endif
360*ef5ccd6cSJohn Marino
361*ef5ccd6cSJohn Marino
362*ef5ccd6cSJohn Marino /* Copy the second part of user declarations. */
363*ef5ccd6cSJohn Marino
364*ef5ccd6cSJohn Marino
365*ef5ccd6cSJohn Marino /* Line 264 of yacc.c */
366*ef5ccd6cSJohn Marino #line 367 "ada-exp.c"
367*ef5ccd6cSJohn Marino
368*ef5ccd6cSJohn Marino #ifdef short
369*ef5ccd6cSJohn Marino # undef short
370*ef5ccd6cSJohn Marino #endif
371*ef5ccd6cSJohn Marino
372*ef5ccd6cSJohn Marino #ifdef YYTYPE_UINT8
373*ef5ccd6cSJohn Marino typedef YYTYPE_UINT8 yytype_uint8;
374*ef5ccd6cSJohn Marino #else
375*ef5ccd6cSJohn Marino typedef unsigned char yytype_uint8;
376*ef5ccd6cSJohn Marino #endif
377*ef5ccd6cSJohn Marino
378*ef5ccd6cSJohn Marino #ifdef YYTYPE_INT8
379*ef5ccd6cSJohn Marino typedef YYTYPE_INT8 yytype_int8;
380*ef5ccd6cSJohn Marino #elif (defined __STDC__ || defined __C99__FUNC__ \
381*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
382*ef5ccd6cSJohn Marino typedef signed char yytype_int8;
383*ef5ccd6cSJohn Marino #else
384*ef5ccd6cSJohn Marino typedef short int yytype_int8;
385*ef5ccd6cSJohn Marino #endif
386*ef5ccd6cSJohn Marino
387*ef5ccd6cSJohn Marino #ifdef YYTYPE_UINT16
388*ef5ccd6cSJohn Marino typedef YYTYPE_UINT16 yytype_uint16;
389*ef5ccd6cSJohn Marino #else
390*ef5ccd6cSJohn Marino typedef unsigned short int yytype_uint16;
391*ef5ccd6cSJohn Marino #endif
392*ef5ccd6cSJohn Marino
393*ef5ccd6cSJohn Marino #ifdef YYTYPE_INT16
394*ef5ccd6cSJohn Marino typedef YYTYPE_INT16 yytype_int16;
395*ef5ccd6cSJohn Marino #else
396*ef5ccd6cSJohn Marino typedef short int yytype_int16;
397*ef5ccd6cSJohn Marino #endif
398*ef5ccd6cSJohn Marino
399*ef5ccd6cSJohn Marino #ifndef YYSIZE_T
400*ef5ccd6cSJohn Marino # ifdef __SIZE_TYPE__
401*ef5ccd6cSJohn Marino # define YYSIZE_T __SIZE_TYPE__
402*ef5ccd6cSJohn Marino # elif defined size_t
403*ef5ccd6cSJohn Marino # define YYSIZE_T size_t
404*ef5ccd6cSJohn Marino # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
405*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
406*ef5ccd6cSJohn Marino # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
407*ef5ccd6cSJohn Marino # define YYSIZE_T size_t
408*ef5ccd6cSJohn Marino # else
409*ef5ccd6cSJohn Marino # define YYSIZE_T unsigned int
410*ef5ccd6cSJohn Marino # endif
411*ef5ccd6cSJohn Marino #endif
412*ef5ccd6cSJohn Marino
413*ef5ccd6cSJohn Marino #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
414*ef5ccd6cSJohn Marino
415*ef5ccd6cSJohn Marino #ifndef YY_
416*ef5ccd6cSJohn Marino # if YYENABLE_NLS
417*ef5ccd6cSJohn Marino # if ENABLE_NLS
418*ef5ccd6cSJohn Marino # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
419*ef5ccd6cSJohn Marino # define YY_(msgid) dgettext ("bison-runtime", msgid)
420*ef5ccd6cSJohn Marino # endif
421*ef5ccd6cSJohn Marino # endif
422*ef5ccd6cSJohn Marino # ifndef YY_
423*ef5ccd6cSJohn Marino # define YY_(msgid) msgid
424*ef5ccd6cSJohn Marino # endif
425*ef5ccd6cSJohn Marino #endif
426*ef5ccd6cSJohn Marino
427*ef5ccd6cSJohn Marino /* Suppress unused-variable warnings by "using" E. */
428*ef5ccd6cSJohn Marino #if ! defined lint || defined __GNUC__
429*ef5ccd6cSJohn Marino # define YYUSE(e) ((void) (e))
430*ef5ccd6cSJohn Marino #else
431*ef5ccd6cSJohn Marino # define YYUSE(e) /* empty */
432*ef5ccd6cSJohn Marino #endif
433*ef5ccd6cSJohn Marino
434*ef5ccd6cSJohn Marino /* Identity function, used to suppress warnings about constant conditions. */
435*ef5ccd6cSJohn Marino #ifndef lint
436*ef5ccd6cSJohn Marino # define YYID(n) (n)
437*ef5ccd6cSJohn Marino #else
438*ef5ccd6cSJohn Marino #if (defined __STDC__ || defined __C99__FUNC__ \
439*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
440*ef5ccd6cSJohn Marino static int
YYID(int yyi)441*ef5ccd6cSJohn Marino YYID (int yyi)
442*ef5ccd6cSJohn Marino #else
443*ef5ccd6cSJohn Marino static int
444*ef5ccd6cSJohn Marino YYID (yyi)
445*ef5ccd6cSJohn Marino int yyi;
446*ef5ccd6cSJohn Marino #endif
447*ef5ccd6cSJohn Marino {
448*ef5ccd6cSJohn Marino return yyi;
449*ef5ccd6cSJohn Marino }
450*ef5ccd6cSJohn Marino #endif
451*ef5ccd6cSJohn Marino
452*ef5ccd6cSJohn Marino #if ! defined yyoverflow || YYERROR_VERBOSE
453*ef5ccd6cSJohn Marino
454*ef5ccd6cSJohn Marino /* The parser invokes alloca or xmalloc; define the necessary symbols. */
455*ef5ccd6cSJohn Marino
456*ef5ccd6cSJohn Marino # ifdef YYSTACK_USE_ALLOCA
457*ef5ccd6cSJohn Marino # if YYSTACK_USE_ALLOCA
458*ef5ccd6cSJohn Marino # ifdef __GNUC__
459*ef5ccd6cSJohn Marino # define YYSTACK_ALLOC __builtin_alloca
460*ef5ccd6cSJohn Marino # elif defined __BUILTIN_VA_ARG_INCR
461*ef5ccd6cSJohn Marino # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
462*ef5ccd6cSJohn Marino # elif defined _AIX
463*ef5ccd6cSJohn Marino # define YYSTACK_ALLOC __alloca
464*ef5ccd6cSJohn Marino # elif defined _MSC_VER
465*ef5ccd6cSJohn Marino # define alloca _alloca
466*ef5ccd6cSJohn Marino # else
467*ef5ccd6cSJohn Marino # define YYSTACK_ALLOC alloca
468*ef5ccd6cSJohn Marino # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
469*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
470*ef5ccd6cSJohn Marino # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
471*ef5ccd6cSJohn Marino # ifndef _STDLIB_H
472*ef5ccd6cSJohn Marino # define _STDLIB_H 1
473*ef5ccd6cSJohn Marino # endif
474*ef5ccd6cSJohn Marino # endif
475*ef5ccd6cSJohn Marino # endif
476*ef5ccd6cSJohn Marino # endif
477*ef5ccd6cSJohn Marino # endif
478*ef5ccd6cSJohn Marino
479*ef5ccd6cSJohn Marino # ifdef YYSTACK_ALLOC
480*ef5ccd6cSJohn Marino /* Pacify GCC's `empty if-body' warning. */
481*ef5ccd6cSJohn Marino # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
482*ef5ccd6cSJohn Marino # ifndef YYSTACK_ALLOC_MAXIMUM
483*ef5ccd6cSJohn Marino /* The OS might guarantee only one guard page at the bottom of the stack,
484*ef5ccd6cSJohn Marino and a page size can be as small as 4096 bytes. So we cannot safely
485*ef5ccd6cSJohn Marino invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
486*ef5ccd6cSJohn Marino to allow for a few compiler-allocated temporary stack slots. */
487*ef5ccd6cSJohn Marino # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
488*ef5ccd6cSJohn Marino # endif
489*ef5ccd6cSJohn Marino # else
490*ef5ccd6cSJohn Marino # define YYSTACK_ALLOC YYMALLOC
491*ef5ccd6cSJohn Marino # define YYSTACK_FREE YYFREE
492*ef5ccd6cSJohn Marino # ifndef YYSTACK_ALLOC_MAXIMUM
493*ef5ccd6cSJohn Marino # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
494*ef5ccd6cSJohn Marino # endif
495*ef5ccd6cSJohn Marino # if (defined __cplusplus && ! defined _STDLIB_H \
496*ef5ccd6cSJohn Marino && ! ((defined YYMALLOC || defined xmalloc) \
497*ef5ccd6cSJohn Marino && (defined YYFREE || defined xfree)))
498*ef5ccd6cSJohn Marino # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
499*ef5ccd6cSJohn Marino # ifndef _STDLIB_H
500*ef5ccd6cSJohn Marino # define _STDLIB_H 1
501*ef5ccd6cSJohn Marino # endif
502*ef5ccd6cSJohn Marino # endif
503*ef5ccd6cSJohn Marino # ifndef YYMALLOC
504*ef5ccd6cSJohn Marino # define YYMALLOC xmalloc
505*ef5ccd6cSJohn Marino # if ! defined xmalloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
506*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
507*ef5ccd6cSJohn Marino void *xmalloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
508*ef5ccd6cSJohn Marino # endif
509*ef5ccd6cSJohn Marino # endif
510*ef5ccd6cSJohn Marino # ifndef YYFREE
511*ef5ccd6cSJohn Marino # define YYFREE xfree
512*ef5ccd6cSJohn Marino # if ! defined xfree && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
513*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
514*ef5ccd6cSJohn Marino void xfree (void *); /* INFRINGES ON USER NAME SPACE */
515*ef5ccd6cSJohn Marino # endif
516*ef5ccd6cSJohn Marino # endif
517*ef5ccd6cSJohn Marino # endif
518*ef5ccd6cSJohn Marino #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
519*ef5ccd6cSJohn Marino
520*ef5ccd6cSJohn Marino
521*ef5ccd6cSJohn Marino #if (! defined yyoverflow \
522*ef5ccd6cSJohn Marino && (! defined __cplusplus \
523*ef5ccd6cSJohn Marino || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
524*ef5ccd6cSJohn Marino
525*ef5ccd6cSJohn Marino /* A type that is properly aligned for any stack member. */
526*ef5ccd6cSJohn Marino union yyalloc
527*ef5ccd6cSJohn Marino {
528*ef5ccd6cSJohn Marino yytype_int16 yyss_alloc;
529*ef5ccd6cSJohn Marino YYSTYPE yyvs_alloc;
530*ef5ccd6cSJohn Marino };
531*ef5ccd6cSJohn Marino
532*ef5ccd6cSJohn Marino /* The size of the maximum gap between one aligned stack and the next. */
533*ef5ccd6cSJohn Marino # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
534*ef5ccd6cSJohn Marino
535*ef5ccd6cSJohn Marino /* The size of an array large to enough to hold all stacks, each with
536*ef5ccd6cSJohn Marino N elements. */
537*ef5ccd6cSJohn Marino # define YYSTACK_BYTES(N) \
538*ef5ccd6cSJohn Marino ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
539*ef5ccd6cSJohn Marino + YYSTACK_GAP_MAXIMUM)
540*ef5ccd6cSJohn Marino
541*ef5ccd6cSJohn Marino /* Copy COUNT objects from FROM to TO. The source and destination do
542*ef5ccd6cSJohn Marino not overlap. */
543*ef5ccd6cSJohn Marino # ifndef YYCOPY
544*ef5ccd6cSJohn Marino # if defined __GNUC__ && 1 < __GNUC__
545*ef5ccd6cSJohn Marino # define YYCOPY(To, From, Count) \
546*ef5ccd6cSJohn Marino __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
547*ef5ccd6cSJohn Marino # else
548*ef5ccd6cSJohn Marino # define YYCOPY(To, From, Count) \
549*ef5ccd6cSJohn Marino do \
550*ef5ccd6cSJohn Marino { \
551*ef5ccd6cSJohn Marino YYSIZE_T yyi; \
552*ef5ccd6cSJohn Marino for (yyi = 0; yyi < (Count); yyi++) \
553*ef5ccd6cSJohn Marino (To)[yyi] = (From)[yyi]; \
554*ef5ccd6cSJohn Marino } \
555*ef5ccd6cSJohn Marino while (YYID (0))
556*ef5ccd6cSJohn Marino # endif
557*ef5ccd6cSJohn Marino # endif
558*ef5ccd6cSJohn Marino
559*ef5ccd6cSJohn Marino /* Relocate STACK from its old location to the new one. The
560*ef5ccd6cSJohn Marino local variables YYSIZE and YYSTACKSIZE give the old and new number of
561*ef5ccd6cSJohn Marino elements in the stack, and YYPTR gives the new location of the
562*ef5ccd6cSJohn Marino stack. Advance YYPTR to a properly aligned location for the next
563*ef5ccd6cSJohn Marino stack. */
564*ef5ccd6cSJohn Marino # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
565*ef5ccd6cSJohn Marino do \
566*ef5ccd6cSJohn Marino { \
567*ef5ccd6cSJohn Marino YYSIZE_T yynewbytes; \
568*ef5ccd6cSJohn Marino YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
569*ef5ccd6cSJohn Marino Stack = &yyptr->Stack_alloc; \
570*ef5ccd6cSJohn Marino yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
571*ef5ccd6cSJohn Marino yyptr += yynewbytes / sizeof (*yyptr); \
572*ef5ccd6cSJohn Marino } \
573*ef5ccd6cSJohn Marino while (YYID (0))
574*ef5ccd6cSJohn Marino
575*ef5ccd6cSJohn Marino #endif
576*ef5ccd6cSJohn Marino
577*ef5ccd6cSJohn Marino /* YYFINAL -- State number of the termination state. */
578*ef5ccd6cSJohn Marino #define YYFINAL 57
579*ef5ccd6cSJohn Marino /* YYLAST -- Last index in YYTABLE. */
580*ef5ccd6cSJohn Marino #define YYLAST 770
581*ef5ccd6cSJohn Marino
582*ef5ccd6cSJohn Marino /* YYNTOKENS -- Number of terminals. */
583*ef5ccd6cSJohn Marino #define YYNTOKENS 69
584*ef5ccd6cSJohn Marino /* YYNNTS -- Number of nonterminals. */
585*ef5ccd6cSJohn Marino #define YYNNTS 31
586*ef5ccd6cSJohn Marino /* YYNRULES -- Number of rules. */
587*ef5ccd6cSJohn Marino #define YYNRULES 122
588*ef5ccd6cSJohn Marino /* YYNRULES -- Number of states. */
589*ef5ccd6cSJohn Marino #define YYNSTATES 233
590*ef5ccd6cSJohn Marino
591*ef5ccd6cSJohn Marino /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
592*ef5ccd6cSJohn Marino #define YYUNDEFTOK 2
593*ef5ccd6cSJohn Marino #define YYMAXUTOK 303
594*ef5ccd6cSJohn Marino
595*ef5ccd6cSJohn Marino #define YYTRANSLATE(YYX) \
596*ef5ccd6cSJohn Marino ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
597*ef5ccd6cSJohn Marino
598*ef5ccd6cSJohn Marino /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
599*ef5ccd6cSJohn Marino static const yytype_uint8 yytranslate[] =
600*ef5ccd6cSJohn Marino {
601*ef5ccd6cSJohn Marino 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
602*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
603*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
604*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 32, 64,
605*ef5ccd6cSJohn Marino 58, 63, 34, 30, 65, 31, 57, 35, 2, 2,
606*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 62,
607*ef5ccd6cSJohn Marino 22, 21, 23, 2, 29, 2, 2, 2, 2, 2,
608*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
609*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
610*ef5ccd6cSJohn Marino 2, 59, 2, 68, 2, 2, 2, 2, 2, 2,
611*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
612*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
613*ef5ccd6cSJohn Marino 2, 2, 2, 66, 42, 67, 2, 2, 2, 2,
614*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
615*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
616*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
617*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
618*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
619*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
620*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
621*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
622*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
623*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
624*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
625*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
626*ef5ccd6cSJohn Marino 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
627*ef5ccd6cSJohn Marino 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
628*ef5ccd6cSJohn Marino 15, 16, 17, 18, 19, 20, 24, 25, 26, 27,
629*ef5ccd6cSJohn Marino 28, 33, 36, 37, 38, 39, 40, 41, 43, 44,
630*ef5ccd6cSJohn Marino 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
631*ef5ccd6cSJohn Marino 55, 56, 60, 61
632*ef5ccd6cSJohn Marino };
633*ef5ccd6cSJohn Marino
634*ef5ccd6cSJohn Marino #if YYDEBUG
635*ef5ccd6cSJohn Marino /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
636*ef5ccd6cSJohn Marino YYRHS. */
637*ef5ccd6cSJohn Marino static const yytype_uint16 yyprhs[] =
638*ef5ccd6cSJohn Marino {
639*ef5ccd6cSJohn Marino 0, 0, 3, 5, 7, 11, 15, 18, 21, 26,
640*ef5ccd6cSJohn Marino 31, 32, 40, 41, 48, 55, 59, 61, 63, 65,
641*ef5ccd6cSJohn Marino 67, 70, 73, 76, 79, 80, 82, 86, 90, 96,
642*ef5ccd6cSJohn Marino 101, 105, 109, 113, 117, 121, 125, 129, 133, 137,
643*ef5ccd6cSJohn Marino 139, 143, 147, 151, 157, 163, 167, 174, 181, 186,
644*ef5ccd6cSJohn Marino 190, 194, 198, 200, 202, 204, 206, 208, 210, 214,
645*ef5ccd6cSJohn Marino 218, 223, 228, 232, 236, 241, 246, 250, 254, 257,
646*ef5ccd6cSJohn Marino 260, 264, 268, 272, 275, 278, 286, 294, 300, 306,
647*ef5ccd6cSJohn Marino 309, 310, 314, 316, 318, 319, 321, 323, 325, 327,
648*ef5ccd6cSJohn Marino 329, 331, 333, 336, 338, 341, 344, 348, 351, 355,
649*ef5ccd6cSJohn Marino 359, 361, 364, 367, 370, 374, 376, 378, 382, 386,
650*ef5ccd6cSJohn Marino 388, 389, 394, 398, 399, 406, 407, 412, 416, 417,
651*ef5ccd6cSJohn Marino 424, 427, 430
652*ef5ccd6cSJohn Marino };
653*ef5ccd6cSJohn Marino
654*ef5ccd6cSJohn Marino /* YYRHS -- A `-1'-separated list of the rules' RHS. */
655*ef5ccd6cSJohn Marino static const yytype_int8 yyrhs[] =
656*ef5ccd6cSJohn Marino {
657*ef5ccd6cSJohn Marino 70, 0, -1, 71, -1, 78, -1, 71, 62, 78,
658*ef5ccd6cSJohn Marino -1, 72, 15, 78, -1, 72, 13, -1, 72, 12,
659*ef5ccd6cSJohn Marino -1, 72, 58, 76, 63, -1, 87, 58, 76, 63,
660*ef5ccd6cSJohn Marino -1, -1, 87, 64, 74, 73, 58, 78, 63, -1,
661*ef5ccd6cSJohn Marino -1, 72, 58, 75, 24, 75, 63, -1, 87, 58,
662*ef5ccd6cSJohn Marino 75, 24, 75, 63, -1, 58, 71, 63, -1, 87,
663*ef5ccd6cSJohn Marino -1, 14, -1, 89, -1, 72, -1, 31, 75, -1,
664*ef5ccd6cSJohn Marino 30, 75, -1, 38, 75, -1, 39, 75, -1, -1,
665*ef5ccd6cSJohn Marino 78, -1, 11, 43, 78, -1, 76, 65, 78, -1,
666*ef5ccd6cSJohn Marino 76, 65, 11, 43, 78, -1, 66, 87, 67, 72,
667*ef5ccd6cSJohn Marino -1, 75, 40, 75, -1, 75, 34, 75, -1, 75,
668*ef5ccd6cSJohn Marino 35, 75, -1, 75, 36, 75, -1, 75, 37, 75,
669*ef5ccd6cSJohn Marino -1, 75, 29, 75, -1, 75, 30, 75, -1, 75,
670*ef5ccd6cSJohn Marino 32, 75, -1, 75, 31, 75, -1, 75, -1, 75,
671*ef5ccd6cSJohn Marino 21, 75, -1, 75, 28, 75, -1, 75, 27, 75,
672*ef5ccd6cSJohn Marino -1, 75, 25, 75, 24, 75, -1, 75, 25, 72,
673*ef5ccd6cSJohn Marino 55, 84, -1, 75, 25, 87, -1, 75, 38, 25,
674*ef5ccd6cSJohn Marino 75, 24, 75, -1, 75, 38, 25, 72, 55, 84,
675*ef5ccd6cSJohn Marino -1, 75, 38, 25, 87, -1, 75, 26, 75, -1,
676*ef5ccd6cSJohn Marino 75, 22, 75, -1, 75, 23, 75, -1, 77, -1,
677*ef5ccd6cSJohn Marino 79, -1, 80, -1, 81, -1, 82, -1, 83, -1,
678*ef5ccd6cSJohn Marino 77, 20, 77, -1, 79, 20, 77, -1, 77, 20,
679*ef5ccd6cSJohn Marino 17, 77, -1, 80, 20, 17, 77, -1, 77, 19,
680*ef5ccd6cSJohn Marino 77, -1, 81, 19, 77, -1, 77, 19, 16, 77,
681*ef5ccd6cSJohn Marino -1, 82, 19, 16, 77, -1, 77, 18, 77, -1,
682*ef5ccd6cSJohn Marino 83, 18, 77, -1, 72, 48, -1, 72, 47, -1,
683*ef5ccd6cSJohn Marino 72, 46, 84, -1, 72, 45, 84, -1, 72, 44,
684*ef5ccd6cSJohn Marino 84, -1, 72, 54, -1, 72, 53, -1, 86, 50,
685*ef5ccd6cSJohn Marino 58, 78, 65, 78, 63, -1, 86, 51, 58, 78,
686*ef5ccd6cSJohn Marino 65, 78, 63, -1, 86, 56, 58, 78, 63, -1,
687*ef5ccd6cSJohn Marino 85, 52, 58, 78, 63, -1, 85, 49, -1, -1,
688*ef5ccd6cSJohn Marino 58, 3, 63, -1, 87, -1, 85, -1, -1, 3,
689*ef5ccd6cSJohn Marino -1, 5, -1, 6, -1, 4, -1, 10, -1, 7,
690*ef5ccd6cSJohn Marino -1, 8, -1, 60, 11, -1, 11, -1, 88, 11,
691*ef5ccd6cSJohn Marino -1, 11, 48, -1, 88, 11, 48, -1, 11, 9,
692*ef5ccd6cSJohn Marino -1, 88, 11, 9, -1, 58, 90, 63, -1, 92,
693*ef5ccd6cSJohn Marino -1, 91, 78, -1, 91, 92, -1, 78, 65, -1,
694*ef5ccd6cSJohn Marino 91, 78, 65, -1, 93, -1, 94, -1, 94, 65,
695*ef5ccd6cSJohn Marino 92, -1, 61, 43, 78, -1, 95, -1, -1, 11,
696*ef5ccd6cSJohn Marino 43, 96, 78, -1, 75, 43, 78, -1, -1, 75,
697*ef5ccd6cSJohn Marino 24, 75, 43, 97, 78, -1, -1, 11, 42, 98,
698*ef5ccd6cSJohn Marino 95, -1, 75, 42, 95, -1, -1, 75, 24, 75,
699*ef5ccd6cSJohn Marino 42, 99, 95, -1, 34, 72, -1, 32, 72, -1,
700*ef5ccd6cSJohn Marino 72, 59, 78, 68, -1
701*ef5ccd6cSJohn Marino };
702*ef5ccd6cSJohn Marino
703*ef5ccd6cSJohn Marino /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
704*ef5ccd6cSJohn Marino static const yytype_uint16 yyrline[] =
705*ef5ccd6cSJohn Marino {
706*ef5ccd6cSJohn Marino 0, 233, 233, 237, 238, 240, 245, 249, 253, 259,
707*ef5ccd6cSJohn Marino 278, 278, 290, 294, 296, 304, 315, 325, 329, 332,
708*ef5ccd6cSJohn Marino 335, 339, 343, 347, 351, 354, 356, 358, 360, 364,
709*ef5ccd6cSJohn Marino 377, 381, 385, 389, 393, 397, 401, 405, 409, 413,
710*ef5ccd6cSJohn Marino 416, 420, 424, 428, 430, 435, 443, 447, 453, 464,
711*ef5ccd6cSJohn Marino 468, 472, 476, 477, 478, 479, 480, 481, 485, 487,
712*ef5ccd6cSJohn Marino 492, 494, 499, 501, 506, 508, 512, 514, 526, 528,
713*ef5ccd6cSJohn Marino 534, 537, 540, 543, 545, 547, 549, 551, 553, 555,
714*ef5ccd6cSJohn Marino 559, 561, 566, 576, 578, 584, 588, 595, 603, 607,
715*ef5ccd6cSJohn Marino 613, 615, 619, 623, 625, 627, 635, 646, 648, 653,
716*ef5ccd6cSJohn Marino 662, 663, 669, 674, 680, 689, 690, 691, 695, 700,
717*ef5ccd6cSJohn Marino 715, 714, 717, 720, 719, 725, 724, 727, 730, 729,
718*ef5ccd6cSJohn Marino 737, 739, 741
719*ef5ccd6cSJohn Marino };
720*ef5ccd6cSJohn Marino #endif
721*ef5ccd6cSJohn Marino
722*ef5ccd6cSJohn Marino #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
723*ef5ccd6cSJohn Marino /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
724*ef5ccd6cSJohn Marino First, the terminals, then, starting at YYNTOKENS, nonterminals. */
725*ef5ccd6cSJohn Marino static const char *const yytname[] =
726*ef5ccd6cSJohn Marino {
727*ef5ccd6cSJohn Marino "$end", "error", "$undefined", "INT", "NULL_PTR", "CHARLIT", "FLOAT",
728*ef5ccd6cSJohn Marino "TRUEKEYWORD", "FALSEKEYWORD", "COLONCOLON", "STRING", "NAME", "DOT_ID",
729*ef5ccd6cSJohn Marino "DOT_ALL", "SPECIAL_VARIABLE", "ASSIGN", "ELSE", "THEN", "XOR", "OR",
730*ef5ccd6cSJohn Marino "_AND_", "'='", "'<'", "'>'", "DOTDOT", "IN", "GEQ", "LEQ", "NOTEQUAL",
731*ef5ccd6cSJohn Marino "'@'", "'+'", "'-'", "'&'", "UNARY", "'*'", "'/'", "REM", "MOD", "NOT",
732*ef5ccd6cSJohn Marino "ABS", "STARSTAR", "VAR", "'|'", "ARROW", "TICK_LENGTH", "TICK_LAST",
733*ef5ccd6cSJohn Marino "TICK_FIRST", "TICK_ADDRESS", "TICK_ACCESS", "TICK_MODULUS", "TICK_MIN",
734*ef5ccd6cSJohn Marino "TICK_MAX", "TICK_VAL", "TICK_TAG", "TICK_SIZE", "TICK_RANGE",
735*ef5ccd6cSJohn Marino "TICK_POS", "'.'", "'('", "'['", "NEW", "OTHERS", "';'", "')'", "'\\''",
736*ef5ccd6cSJohn Marino "','", "'{'", "'}'", "']'", "$accept", "start", "exp1", "primary", "$@1",
737*ef5ccd6cSJohn Marino "save_qualifier", "simple_exp", "arglist", "relation", "exp", "and_exp",
738*ef5ccd6cSJohn Marino "and_then_exp", "or_exp", "or_else_exp", "xor_exp", "tick_arglist",
739*ef5ccd6cSJohn Marino "type_prefix", "opt_type_prefix", "var_or_type", "block", "aggregate",
740*ef5ccd6cSJohn Marino "aggregate_component_list", "positional_list", "component_groups",
741*ef5ccd6cSJohn Marino "others", "component_group", "component_associations", "$@2", "$@3",
742*ef5ccd6cSJohn Marino "$@4", "$@5", 0
743*ef5ccd6cSJohn Marino };
744*ef5ccd6cSJohn Marino #endif
745*ef5ccd6cSJohn Marino
746*ef5ccd6cSJohn Marino # ifdef YYPRINT
747*ef5ccd6cSJohn Marino /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
748*ef5ccd6cSJohn Marino token YYLEX-NUM. */
749*ef5ccd6cSJohn Marino static const yytype_uint16 yytoknum[] =
750*ef5ccd6cSJohn Marino {
751*ef5ccd6cSJohn Marino 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
752*ef5ccd6cSJohn Marino 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
753*ef5ccd6cSJohn Marino 275, 61, 60, 62, 276, 277, 278, 279, 280, 64,
754*ef5ccd6cSJohn Marino 43, 45, 38, 281, 42, 47, 282, 283, 284, 285,
755*ef5ccd6cSJohn Marino 286, 287, 124, 288, 289, 290, 291, 292, 293, 294,
756*ef5ccd6cSJohn Marino 295, 296, 297, 298, 299, 300, 301, 46, 40, 91,
757*ef5ccd6cSJohn Marino 302, 303, 59, 41, 39, 44, 123, 125, 93
758*ef5ccd6cSJohn Marino };
759*ef5ccd6cSJohn Marino # endif
760*ef5ccd6cSJohn Marino
761*ef5ccd6cSJohn Marino /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
762*ef5ccd6cSJohn Marino static const yytype_uint8 yyr1[] =
763*ef5ccd6cSJohn Marino {
764*ef5ccd6cSJohn Marino 0, 69, 70, 71, 71, 71, 72, 72, 72, 72,
765*ef5ccd6cSJohn Marino 73, 72, 74, 72, 72, 72, 72, 72, 72, 75,
766*ef5ccd6cSJohn Marino 75, 75, 75, 75, 76, 76, 76, 76, 76, 72,
767*ef5ccd6cSJohn Marino 75, 75, 75, 75, 75, 75, 75, 75, 75, 77,
768*ef5ccd6cSJohn Marino 77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
769*ef5ccd6cSJohn Marino 77, 77, 78, 78, 78, 78, 78, 78, 79, 79,
770*ef5ccd6cSJohn Marino 80, 80, 81, 81, 82, 82, 83, 83, 72, 72,
771*ef5ccd6cSJohn Marino 72, 72, 72, 72, 72, 72, 72, 72, 72, 72,
772*ef5ccd6cSJohn Marino 84, 84, 85, 86, 86, 72, 72, 72, 72, 72,
773*ef5ccd6cSJohn Marino 72, 72, 72, 87, 87, 87, 87, 88, 88, 89,
774*ef5ccd6cSJohn Marino 90, 90, 90, 91, 91, 92, 92, 92, 93, 94,
775*ef5ccd6cSJohn Marino 96, 95, 95, 97, 95, 98, 95, 95, 99, 95,
776*ef5ccd6cSJohn Marino 72, 72, 72
777*ef5ccd6cSJohn Marino };
778*ef5ccd6cSJohn Marino
779*ef5ccd6cSJohn Marino /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
780*ef5ccd6cSJohn Marino static const yytype_uint8 yyr2[] =
781*ef5ccd6cSJohn Marino {
782*ef5ccd6cSJohn Marino 0, 2, 1, 1, 3, 3, 2, 2, 4, 4,
783*ef5ccd6cSJohn Marino 0, 7, 0, 6, 6, 3, 1, 1, 1, 1,
784*ef5ccd6cSJohn Marino 2, 2, 2, 2, 0, 1, 3, 3, 5, 4,
785*ef5ccd6cSJohn Marino 3, 3, 3, 3, 3, 3, 3, 3, 3, 1,
786*ef5ccd6cSJohn Marino 3, 3, 3, 5, 5, 3, 6, 6, 4, 3,
787*ef5ccd6cSJohn Marino 3, 3, 1, 1, 1, 1, 1, 1, 3, 3,
788*ef5ccd6cSJohn Marino 4, 4, 3, 3, 4, 4, 3, 3, 2, 2,
789*ef5ccd6cSJohn Marino 3, 3, 3, 2, 2, 7, 7, 5, 5, 2,
790*ef5ccd6cSJohn Marino 0, 3, 1, 1, 0, 1, 1, 1, 1, 1,
791*ef5ccd6cSJohn Marino 1, 1, 2, 1, 2, 2, 3, 2, 3, 3,
792*ef5ccd6cSJohn Marino 1, 2, 2, 2, 3, 1, 1, 3, 3, 1,
793*ef5ccd6cSJohn Marino 0, 4, 3, 0, 6, 0, 4, 3, 0, 6,
794*ef5ccd6cSJohn Marino 2, 2, 4
795*ef5ccd6cSJohn Marino };
796*ef5ccd6cSJohn Marino
797*ef5ccd6cSJohn Marino /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
798*ef5ccd6cSJohn Marino STATE-NUM when YYTABLE doesn't specify something else to do. Zero
799*ef5ccd6cSJohn Marino means the default is an error. */
800*ef5ccd6cSJohn Marino static const yytype_uint8 yydefact[] =
801*ef5ccd6cSJohn Marino {
802*ef5ccd6cSJohn Marino 84, 85, 88, 86, 87, 90, 91, 89, 93, 17,
803*ef5ccd6cSJohn Marino 84, 84, 84, 84, 84, 84, 84, 0, 0, 0,
804*ef5ccd6cSJohn Marino 2, 19, 39, 52, 3, 53, 54, 55, 56, 57,
805*ef5ccd6cSJohn Marino 83, 0, 16, 0, 18, 97, 95, 19, 21, 20,
806*ef5ccd6cSJohn Marino 121, 120, 22, 23, 93, 0, 0, 39, 3, 0,
807*ef5ccd6cSJohn Marino 84, 100, 105, 106, 109, 92, 0, 1, 84, 7,
808*ef5ccd6cSJohn Marino 6, 84, 80, 80, 80, 69, 68, 74, 73, 84,
809*ef5ccd6cSJohn Marino 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,
810*ef5ccd6cSJohn Marino 84, 84, 84, 84, 84, 84, 0, 84, 84, 84,
811*ef5ccd6cSJohn Marino 84, 84, 0, 84, 0, 84, 79, 0, 0, 0,
812*ef5ccd6cSJohn Marino 0, 84, 12, 94, 115, 110, 84, 15, 84, 84,
813*ef5ccd6cSJohn Marino 84, 103, 99, 101, 102, 84, 84, 4, 5, 0,
814*ef5ccd6cSJohn Marino 72, 71, 70, 93, 39, 0, 25, 0, 40, 50,
815*ef5ccd6cSJohn Marino 51, 19, 0, 16, 49, 42, 41, 35, 36, 38,
816*ef5ccd6cSJohn Marino 37, 31, 32, 33, 34, 84, 30, 66, 84, 62,
817*ef5ccd6cSJohn Marino 84, 58, 59, 84, 63, 84, 67, 84, 84, 84,
818*ef5ccd6cSJohn Marino 84, 39, 0, 10, 98, 96, 84, 84, 108, 0,
819*ef5ccd6cSJohn Marino 0, 117, 112, 104, 107, 29, 0, 84, 84, 8,
820*ef5ccd6cSJohn Marino 84, 122, 80, 84, 19, 0, 16, 64, 60, 61,
821*ef5ccd6cSJohn Marino 65, 0, 0, 0, 0, 84, 9, 0, 116, 111,
822*ef5ccd6cSJohn Marino 118, 113, 81, 26, 0, 93, 27, 44, 43, 80,
823*ef5ccd6cSJohn Marino 84, 78, 84, 84, 77, 0, 84, 84, 84, 13,
824*ef5ccd6cSJohn Marino 84, 47, 46, 0, 0, 14, 0, 119, 114, 28,
825*ef5ccd6cSJohn Marino 75, 76, 11
826*ef5ccd6cSJohn Marino };
827*ef5ccd6cSJohn Marino
828*ef5ccd6cSJohn Marino /* YYDEFGOTO[NTERM-NUM]. */
829*ef5ccd6cSJohn Marino static const yytype_int16 yydefgoto[] =
830*ef5ccd6cSJohn Marino {
831*ef5ccd6cSJohn Marino -1, 19, 20, 37, 197, 163, 22, 125, 23, 126,
832*ef5ccd6cSJohn Marino 25, 26, 27, 28, 29, 120, 30, 31, 32, 33,
833*ef5ccd6cSJohn Marino 34, 49, 50, 51, 52, 53, 54, 167, 218, 166,
834*ef5ccd6cSJohn Marino 217
835*ef5ccd6cSJohn Marino };
836*ef5ccd6cSJohn Marino
837*ef5ccd6cSJohn Marino /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
838*ef5ccd6cSJohn Marino STATE-NUM. */
839*ef5ccd6cSJohn Marino #define YYPACT_NINF -104
840*ef5ccd6cSJohn Marino static const yytype_int16 yypact[] =
841*ef5ccd6cSJohn Marino {
842*ef5ccd6cSJohn Marino 424, -104, -104, -104, -104, -104, -104, -104, 16, -104,
843*ef5ccd6cSJohn Marino 424, 424, 118, 118, 424, 424, 286, -7, 6, 31,
844*ef5ccd6cSJohn Marino -26, 501, 674, 20, -104, 28, 32, 22, 34, 42,
845*ef5ccd6cSJohn Marino -44, -21, 84, 57, -104, -104, -104, 558, 63, 63,
846*ef5ccd6cSJohn Marino -3, -3, 63, 63, 23, 26, -36, 611, 9, 27,
847*ef5ccd6cSJohn Marino 286, -104, -104, 29, -104, -104, 25, -104, 424, -104,
848*ef5ccd6cSJohn Marino -104, 424, 35, 35, 35, -104, -104, -104, -104, 274,
849*ef5ccd6cSJohn Marino 424, 424, 424, 424, 424, 424, 424, 424, 424, 424,
850*ef5ccd6cSJohn Marino 424, 424, 424, 424, 424, 424, 71, 424, 424, 350,
851*ef5ccd6cSJohn Marino 387, 424, 91, 424, 85, 424, -104, 53, 58, 59,
852*ef5ccd6cSJohn Marino 60, 274, -104, 19, -104, -104, 424, -104, 424, 461,
853*ef5ccd6cSJohn Marino 424, -104, -104, 50, -104, 286, 118, -104, -104, 124,
854*ef5ccd6cSJohn Marino -104, -104, -104, 3, 634, -52, -104, 70, 719, 719,
855*ef5ccd6cSJohn Marino 719, 521, 166, 173, 719, 719, 719, 730, 63, 63,
856*ef5ccd6cSJohn Marino 63, 99, 99, 99, 99, 424, 99, -104, 424, -104,
857*ef5ccd6cSJohn Marino 424, -104, -104, 424, -104, 424, -104, 424, 424, 424,
858*ef5ccd6cSJohn Marino 424, 654, -41, -104, -104, -104, 461, 424, -104, 704,
859*ef5ccd6cSJohn Marino 689, -104, -104, -104, -104, -3, 68, 424, 424, -104,
860*ef5ccd6cSJohn Marino 498, -104, 35, 424, 538, 215, 208, -104, -104, -104,
861*ef5ccd6cSJohn Marino -104, 78, 79, 80, 83, 424, -104, 93, -104, -104,
862*ef5ccd6cSJohn Marino -104, -104, -104, -104, 339, 14, -104, -104, 719, 35,
863*ef5ccd6cSJohn Marino 424, -104, 424, 424, -104, 589, 424, 461, 424, -104,
864*ef5ccd6cSJohn Marino 424, -104, 719, 90, 92, -104, 98, -104, -104, -104,
865*ef5ccd6cSJohn Marino -104, -104, -104
866*ef5ccd6cSJohn Marino };
867*ef5ccd6cSJohn Marino
868*ef5ccd6cSJohn Marino /* YYPGOTO[NTERM-NUM]. */
869*ef5ccd6cSJohn Marino static const yytype_int8 yypgoto[] =
870*ef5ccd6cSJohn Marino {
871*ef5ccd6cSJohn Marino -104, -104, 127, 21, -104, -104, 4, 55, -46, 0,
872*ef5ccd6cSJohn Marino -104, -104, -104, -104, -104, -62, -104, -104, -15, -104,
873*ef5ccd6cSJohn Marino -104, -104, -104, -43, -104, -104, -103, -104, -104, -104,
874*ef5ccd6cSJohn Marino -104
875*ef5ccd6cSJohn Marino };
876*ef5ccd6cSJohn Marino
877*ef5ccd6cSJohn Marino /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
878*ef5ccd6cSJohn Marino positive, shift that token. If negative, reduce the rule which
879*ef5ccd6cSJohn Marino number is the opposite. If zero, do what YYDEFACT says.
880*ef5ccd6cSJohn Marino If YYTABLE_NINF, syntax error. */
881*ef5ccd6cSJohn Marino #define YYTABLE_NINF -83
882*ef5ccd6cSJohn Marino static const yytype_int16 yytable[] =
883*ef5ccd6cSJohn Marino {
884*ef5ccd6cSJohn Marino 24, 121, 122, 56, 55, 96, 171, 114, 97, 59,
885*ef5ccd6cSJohn Marino 60, 179, 35, 180, 38, 39, 48, 8, 42, 43,
886*ef5ccd6cSJohn Marino 47, 21, 196, 35, 180, 35, 58, 107, 164, 98,
887*ef5ccd6cSJohn Marino 99, 57, 35, 40, 41, 100, 58, 21, 88, 89,
888*ef5ccd6cSJohn Marino 90, 93, 147, 149, 151, 152, 177, 154, 91, 156,
889*ef5ccd6cSJohn Marino 113, 36, 92, 94, 47, 69, 70, 220, 117, 133,
890*ef5ccd6cSJohn Marino 95, 118, 36, 198, 36, 104, 105, 165, 103, 106,
891*ef5ccd6cSJohn Marino 127, 36, 174, 124, 111, 128, 129, 130, 132, 134,
892*ef5ccd6cSJohn Marino 135, 136, 137, 138, 139, 140, 141, 142, 143, 144,
893*ef5ccd6cSJohn Marino 112, 146, 116, 119, 115, 131, 145, 82, 83, 84,
894*ef5ccd6cSJohn Marino 85, 155, 187, 87, 188, 161, 168, 189, 153, 190,
895*ef5ccd6cSJohn Marino 172, 157, 169, 170, 227, 173, 158, 159, 160, 170,
896*ef5ccd6cSJohn Marino 207, 1, 2, 3, 4, 5, 6, 176, 7, 8,
897*ef5ccd6cSJohn Marino 186, 202, 9, -82, -82, -82, -82, 175, 181, 87,
898*ef5ccd6cSJohn Marino -82, 211, 101, 46, 212, 213, 214, 221, 102, 185,
899*ef5ccd6cSJohn Marino 12, 216, 13, 230, 0, 231, 162, 191, 192, 193,
900*ef5ccd6cSJohn Marino 194, 232, 0, 0, 0, 0, 184, 199, 0, 0,
901*ef5ccd6cSJohn Marino 170, 0, 0, -45, 0, 0, 16, 203, 17, 0,
902*ef5ccd6cSJohn Marino 206, 0, 204, 0, 18, 0, 0, 208, 0, 0,
903*ef5ccd6cSJohn Marino 183, -45, -45, -45, 0, 78, 79, 80, 81, 215,
904*ef5ccd6cSJohn Marino 82, 83, 84, 85, 0, 0, 87, 0, -48, 0,
905*ef5ccd6cSJohn Marino 0, 0, 223, 224, 222, 0, 226, 0, 228, 0,
906*ef5ccd6cSJohn Marino 229, 170, -82, -82, -82, -82, -48, -48, -48, -82,
907*ef5ccd6cSJohn Marino 0, 101, 0, 0, 0, -45, -45, 102, -45, 210,
908*ef5ccd6cSJohn Marino 0, -45, 0, 0, 78, 79, 80, 81, 0, 82,
909*ef5ccd6cSJohn Marino 83, 84, 85, 0, 0, 87, 0, -82, -82, -82,
910*ef5ccd6cSJohn Marino -82, 0, 0, 0, -82, 0, 101, 0, 0, 0,
911*ef5ccd6cSJohn Marino -48, -48, 102, -48, 0, 0, -48, 1, 2, 3,
912*ef5ccd6cSJohn Marino 4, 5, 6, 0, 7, 123, 0, 0, 9, 1,
913*ef5ccd6cSJohn Marino 2, 3, 4, 5, 6, 0, 7, 44, 0, 0,
914*ef5ccd6cSJohn Marino 9, 0, 0, 0, 10, 11, 12, 0, 13, 0,
915*ef5ccd6cSJohn Marino 0, 0, 14, 15, 0, 0, 10, 11, 12, 0,
916*ef5ccd6cSJohn Marino 13, 0, 0, 0, 14, 15, 0, 0, 0, 0,
917*ef5ccd6cSJohn Marino 0, 0, 16, 0, 17, 0, 0, -24, 0, -24,
918*ef5ccd6cSJohn Marino 18, 0, 0, 0, 16, 0, 17, 45, 0, 0,
919*ef5ccd6cSJohn Marino 0, 0, 18, 1, 2, 3, 4, 5, 6, 0,
920*ef5ccd6cSJohn Marino 7, 8, 0, 0, 9, 0, 148, 0, 78, 79,
921*ef5ccd6cSJohn Marino 80, 81, 0, 82, 83, 84, 85, 0, 0, 87,
922*ef5ccd6cSJohn Marino 10, 11, 12, 0, 13, 0, 0, 0, 14, 15,
923*ef5ccd6cSJohn Marino 1, 2, 3, 4, 5, 6, 0, 7, 8, 0,
924*ef5ccd6cSJohn Marino 0, 9, 219, 0, 150, 0, 0, 0, 16, 0,
925*ef5ccd6cSJohn Marino 17, 0, 0, 0, 0, 0, 18, 10, 11, 12,
926*ef5ccd6cSJohn Marino 0, 13, 0, 0, 0, 14, 15, 1, 2, 3,
927*ef5ccd6cSJohn Marino 4, 5, 6, 0, 7, 8, 0, 0, 9, 0,
928*ef5ccd6cSJohn Marino 0, 0, 0, 0, 0, 16, 0, 17, 0, 0,
929*ef5ccd6cSJohn Marino 0, 0, 0, 18, 10, 11, 12, 0, 13, 0,
930*ef5ccd6cSJohn Marino 0, 0, 14, 15, 1, 2, 3, 4, 5, 6,
931*ef5ccd6cSJohn Marino 0, 7, 44, 0, 0, 9, 0, 0, 0, 0,
932*ef5ccd6cSJohn Marino 0, 0, 16, 0, 17, 0, 0, 0, 0, 0,
933*ef5ccd6cSJohn Marino 18, 10, 11, 12, 0, 13, 0, 0, 0, 14,
934*ef5ccd6cSJohn Marino 15, 1, 2, 3, 4, 5, 6, 0, 7, 205,
935*ef5ccd6cSJohn Marino 0, 0, 9, 59, 60, 0, 61, 0, 0, 16,
936*ef5ccd6cSJohn Marino 0, 17, 0, 0, 0, 0, 0, 18, 10, 11,
937*ef5ccd6cSJohn Marino 12, 0, 13, 59, 60, 0, 14, 15, 0, 0,
938*ef5ccd6cSJohn Marino 0, 0, 0, 0, 0, 62, 63, 64, 65, 66,
939*ef5ccd6cSJohn Marino 59, 60, 0, 0, 67, 68, 16, 0, 17, 69,
940*ef5ccd6cSJohn Marino 70, 0, 0, 0, 18, 62, 63, 64, 65, 66,
941*ef5ccd6cSJohn Marino 59, 60, 0, 0, 67, 68, 182, 0, 0, 69,
942*ef5ccd6cSJohn Marino 70, 0, 62, 63, 64, 65, 66, 0, 0, 0,
943*ef5ccd6cSJohn Marino 0, 67, 68, 209, 0, 0, 69, 70, 0, 0,
944*ef5ccd6cSJohn Marino 0, 0, 62, 63, 64, 65, 66, 0, 0, 0,
945*ef5ccd6cSJohn Marino 0, 67, 68, 0, 0, 0, 69, 70, 78, 79,
946*ef5ccd6cSJohn Marino 80, 81, 0, 82, 83, 84, 85, 0, 0, 87,
947*ef5ccd6cSJohn Marino 0, 0, 71, 72, 73, 108, 74, 75, 76, 77,
948*ef5ccd6cSJohn Marino 78, 79, 80, 81, 0, 82, 83, 84, 85, 86,
949*ef5ccd6cSJohn Marino 0, 87, 225, 109, 110, 71, 72, 73, 178, 74,
950*ef5ccd6cSJohn Marino 75, 76, 77, 78, 79, 80, 81, 0, 82, 83,
951*ef5ccd6cSJohn Marino 84, 85, 86, 0, 87, 71, 72, 73, 195, 74,
952*ef5ccd6cSJohn Marino 75, 76, 77, 78, 79, 80, 81, 0, 82, 83,
953*ef5ccd6cSJohn Marino 84, 85, 86, 0, 87, 71, 72, 73, 0, 74,
954*ef5ccd6cSJohn Marino 75, 76, 77, 78, 79, 80, 81, 0, 82, 83,
955*ef5ccd6cSJohn Marino 84, 85, 86, 108, 87, 0, 0, 0, 78, 79,
956*ef5ccd6cSJohn Marino 80, 81, 0, 82, 83, 84, 85, 0, 0, 87,
957*ef5ccd6cSJohn Marino 0, 109, 110, 78, 79, 80, 81, 0, 82, 83,
958*ef5ccd6cSJohn Marino 84, 85, 0, 0, 87, 0, 200, 201, 78, 79,
959*ef5ccd6cSJohn Marino 80, 81, 0, 82, 83, 84, 85, 0, 0, 87,
960*ef5ccd6cSJohn Marino 79, 80, 81, 0, 82, 83, 84, 85, 0, 0,
961*ef5ccd6cSJohn Marino 87
962*ef5ccd6cSJohn Marino };
963*ef5ccd6cSJohn Marino
964*ef5ccd6cSJohn Marino static const yytype_int16 yycheck[] =
965*ef5ccd6cSJohn Marino {
966*ef5ccd6cSJohn Marino 0, 63, 64, 18, 11, 49, 109, 50, 52, 12,
967*ef5ccd6cSJohn Marino 13, 63, 9, 65, 10, 11, 16, 11, 14, 15,
968*ef5ccd6cSJohn Marino 16, 0, 63, 9, 65, 9, 62, 63, 9, 50,
969*ef5ccd6cSJohn Marino 51, 0, 9, 12, 13, 56, 62, 16, 18, 19,
970*ef5ccd6cSJohn Marino 20, 19, 88, 89, 90, 91, 43, 93, 20, 95,
971*ef5ccd6cSJohn Marino 50, 48, 20, 19, 50, 58, 59, 43, 58, 74,
972*ef5ccd6cSJohn Marino 18, 61, 48, 166, 48, 42, 43, 48, 11, 43,
973*ef5ccd6cSJohn Marino 70, 48, 115, 69, 65, 71, 72, 73, 74, 75,
974*ef5ccd6cSJohn Marino 76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
975*ef5ccd6cSJohn Marino 63, 87, 67, 58, 65, 74, 25, 34, 35, 36,
976*ef5ccd6cSJohn Marino 37, 16, 148, 40, 150, 101, 106, 153, 17, 155,
977*ef5ccd6cSJohn Marino 110, 58, 108, 109, 217, 65, 58, 58, 58, 115,
978*ef5ccd6cSJohn Marino 182, 3, 4, 5, 6, 7, 8, 3, 10, 11,
979*ef5ccd6cSJohn Marino 145, 63, 14, 49, 50, 51, 52, 116, 68, 40,
980*ef5ccd6cSJohn Marino 56, 63, 58, 16, 65, 65, 63, 209, 64, 145,
981*ef5ccd6cSJohn Marino 32, 58, 34, 63, -1, 63, 101, 157, 158, 159,
982*ef5ccd6cSJohn Marino 160, 63, -1, -1, -1, -1, 145, 167, -1, -1,
983*ef5ccd6cSJohn Marino 166, -1, -1, 0, -1, -1, 58, 177, 60, -1,
984*ef5ccd6cSJohn Marino 180, -1, 178, -1, 66, -1, -1, 183, -1, -1,
985*ef5ccd6cSJohn Marino 24, 18, 19, 20, -1, 29, 30, 31, 32, 195,
986*ef5ccd6cSJohn Marino 34, 35, 36, 37, -1, -1, 40, -1, 0, -1,
987*ef5ccd6cSJohn Marino -1, -1, 212, 213, 210, -1, 216, -1, 218, -1,
988*ef5ccd6cSJohn Marino 220, 217, 49, 50, 51, 52, 18, 19, 20, 56,
989*ef5ccd6cSJohn Marino -1, 58, -1, -1, -1, 62, 63, 64, 65, 24,
990*ef5ccd6cSJohn Marino -1, 68, -1, -1, 29, 30, 31, 32, -1, 34,
991*ef5ccd6cSJohn Marino 35, 36, 37, -1, -1, 40, -1, 49, 50, 51,
992*ef5ccd6cSJohn Marino 52, -1, -1, -1, 56, -1, 58, -1, -1, -1,
993*ef5ccd6cSJohn Marino 62, 63, 64, 65, -1, -1, 68, 3, 4, 5,
994*ef5ccd6cSJohn Marino 6, 7, 8, -1, 10, 11, -1, -1, 14, 3,
995*ef5ccd6cSJohn Marino 4, 5, 6, 7, 8, -1, 10, 11, -1, -1,
996*ef5ccd6cSJohn Marino 14, -1, -1, -1, 30, 31, 32, -1, 34, -1,
997*ef5ccd6cSJohn Marino -1, -1, 38, 39, -1, -1, 30, 31, 32, -1,
998*ef5ccd6cSJohn Marino 34, -1, -1, -1, 38, 39, -1, -1, -1, -1,
999*ef5ccd6cSJohn Marino -1, -1, 58, -1, 60, -1, -1, 63, -1, 65,
1000*ef5ccd6cSJohn Marino 66, -1, -1, -1, 58, -1, 60, 61, -1, -1,
1001*ef5ccd6cSJohn Marino -1, -1, 66, 3, 4, 5, 6, 7, 8, -1,
1002*ef5ccd6cSJohn Marino 10, 11, -1, -1, 14, -1, 16, -1, 29, 30,
1003*ef5ccd6cSJohn Marino 31, 32, -1, 34, 35, 36, 37, -1, -1, 40,
1004*ef5ccd6cSJohn Marino 30, 31, 32, -1, 34, -1, -1, -1, 38, 39,
1005*ef5ccd6cSJohn Marino 3, 4, 5, 6, 7, 8, -1, 10, 11, -1,
1006*ef5ccd6cSJohn Marino -1, 14, 63, -1, 17, -1, -1, -1, 58, -1,
1007*ef5ccd6cSJohn Marino 60, -1, -1, -1, -1, -1, 66, 30, 31, 32,
1008*ef5ccd6cSJohn Marino -1, 34, -1, -1, -1, 38, 39, 3, 4, 5,
1009*ef5ccd6cSJohn Marino 6, 7, 8, -1, 10, 11, -1, -1, 14, -1,
1010*ef5ccd6cSJohn Marino -1, -1, -1, -1, -1, 58, -1, 60, -1, -1,
1011*ef5ccd6cSJohn Marino -1, -1, -1, 66, 30, 31, 32, -1, 34, -1,
1012*ef5ccd6cSJohn Marino -1, -1, 38, 39, 3, 4, 5, 6, 7, 8,
1013*ef5ccd6cSJohn Marino -1, 10, 11, -1, -1, 14, -1, -1, -1, -1,
1014*ef5ccd6cSJohn Marino -1, -1, 58, -1, 60, -1, -1, -1, -1, -1,
1015*ef5ccd6cSJohn Marino 66, 30, 31, 32, -1, 34, -1, -1, -1, 38,
1016*ef5ccd6cSJohn Marino 39, 3, 4, 5, 6, 7, 8, -1, 10, 11,
1017*ef5ccd6cSJohn Marino -1, -1, 14, 12, 13, -1, 15, -1, -1, 58,
1018*ef5ccd6cSJohn Marino -1, 60, -1, -1, -1, -1, -1, 66, 30, 31,
1019*ef5ccd6cSJohn Marino 32, -1, 34, 12, 13, -1, 38, 39, -1, -1,
1020*ef5ccd6cSJohn Marino -1, -1, -1, -1, -1, 44, 45, 46, 47, 48,
1021*ef5ccd6cSJohn Marino 12, 13, -1, -1, 53, 54, 58, -1, 60, 58,
1022*ef5ccd6cSJohn Marino 59, -1, -1, -1, 66, 44, 45, 46, 47, 48,
1023*ef5ccd6cSJohn Marino 12, 13, -1, -1, 53, 54, 55, -1, -1, 58,
1024*ef5ccd6cSJohn Marino 59, -1, 44, 45, 46, 47, 48, -1, -1, -1,
1025*ef5ccd6cSJohn Marino -1, 53, 54, 55, -1, -1, 58, 59, -1, -1,
1026*ef5ccd6cSJohn Marino -1, -1, 44, 45, 46, 47, 48, -1, -1, -1,
1027*ef5ccd6cSJohn Marino -1, 53, 54, -1, -1, -1, 58, 59, 29, 30,
1028*ef5ccd6cSJohn Marino 31, 32, -1, 34, 35, 36, 37, -1, -1, 40,
1029*ef5ccd6cSJohn Marino -1, -1, 21, 22, 23, 24, 25, 26, 27, 28,
1030*ef5ccd6cSJohn Marino 29, 30, 31, 32, -1, 34, 35, 36, 37, 38,
1031*ef5ccd6cSJohn Marino -1, 40, 63, 42, 43, 21, 22, 23, 24, 25,
1032*ef5ccd6cSJohn Marino 26, 27, 28, 29, 30, 31, 32, -1, 34, 35,
1033*ef5ccd6cSJohn Marino 36, 37, 38, -1, 40, 21, 22, 23, 24, 25,
1034*ef5ccd6cSJohn Marino 26, 27, 28, 29, 30, 31, 32, -1, 34, 35,
1035*ef5ccd6cSJohn Marino 36, 37, 38, -1, 40, 21, 22, 23, -1, 25,
1036*ef5ccd6cSJohn Marino 26, 27, 28, 29, 30, 31, 32, -1, 34, 35,
1037*ef5ccd6cSJohn Marino 36, 37, 38, 24, 40, -1, -1, -1, 29, 30,
1038*ef5ccd6cSJohn Marino 31, 32, -1, 34, 35, 36, 37, -1, -1, 40,
1039*ef5ccd6cSJohn Marino -1, 42, 43, 29, 30, 31, 32, -1, 34, 35,
1040*ef5ccd6cSJohn Marino 36, 37, -1, -1, 40, -1, 42, 43, 29, 30,
1041*ef5ccd6cSJohn Marino 31, 32, -1, 34, 35, 36, 37, -1, -1, 40,
1042*ef5ccd6cSJohn Marino 30, 31, 32, -1, 34, 35, 36, 37, -1, -1,
1043*ef5ccd6cSJohn Marino 40
1044*ef5ccd6cSJohn Marino };
1045*ef5ccd6cSJohn Marino
1046*ef5ccd6cSJohn Marino /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1047*ef5ccd6cSJohn Marino symbol of state STATE-NUM. */
1048*ef5ccd6cSJohn Marino static const yytype_uint8 yystos[] =
1049*ef5ccd6cSJohn Marino {
1050*ef5ccd6cSJohn Marino 0, 3, 4, 5, 6, 7, 8, 10, 11, 14,
1051*ef5ccd6cSJohn Marino 30, 31, 32, 34, 38, 39, 58, 60, 66, 70,
1052*ef5ccd6cSJohn Marino 71, 72, 75, 77, 78, 79, 80, 81, 82, 83,
1053*ef5ccd6cSJohn Marino 85, 86, 87, 88, 89, 9, 48, 72, 75, 75,
1054*ef5ccd6cSJohn Marino 72, 72, 75, 75, 11, 61, 71, 75, 78, 90,
1055*ef5ccd6cSJohn Marino 91, 92, 93, 94, 95, 11, 87, 0, 62, 12,
1056*ef5ccd6cSJohn Marino 13, 15, 44, 45, 46, 47, 48, 53, 54, 58,
1057*ef5ccd6cSJohn Marino 59, 21, 22, 23, 25, 26, 27, 28, 29, 30,
1058*ef5ccd6cSJohn Marino 31, 32, 34, 35, 36, 37, 38, 40, 18, 19,
1059*ef5ccd6cSJohn Marino 20, 20, 20, 19, 19, 18, 49, 52, 50, 51,
1060*ef5ccd6cSJohn Marino 56, 58, 64, 11, 42, 43, 43, 63, 24, 42,
1061*ef5ccd6cSJohn Marino 43, 65, 63, 78, 92, 65, 67, 78, 78, 58,
1062*ef5ccd6cSJohn Marino 84, 84, 84, 11, 75, 76, 78, 78, 75, 75,
1063*ef5ccd6cSJohn Marino 75, 72, 75, 87, 75, 75, 75, 75, 75, 75,
1064*ef5ccd6cSJohn Marino 75, 75, 75, 75, 75, 25, 75, 77, 16, 77,
1065*ef5ccd6cSJohn Marino 17, 77, 77, 17, 77, 16, 77, 58, 58, 58,
1066*ef5ccd6cSJohn Marino 58, 75, 76, 74, 9, 48, 98, 96, 78, 75,
1067*ef5ccd6cSJohn Marino 75, 95, 78, 65, 92, 72, 3, 43, 24, 63,
1068*ef5ccd6cSJohn Marino 65, 68, 55, 24, 72, 75, 87, 77, 77, 77,
1069*ef5ccd6cSJohn Marino 77, 78, 78, 78, 78, 24, 63, 73, 95, 78,
1070*ef5ccd6cSJohn Marino 42, 43, 63, 78, 75, 11, 78, 84, 75, 55,
1071*ef5ccd6cSJohn Marino 24, 63, 65, 65, 63, 75, 58, 99, 97, 63,
1072*ef5ccd6cSJohn Marino 43, 84, 75, 78, 78, 63, 78, 95, 78, 78,
1073*ef5ccd6cSJohn Marino 63, 63, 63
1074*ef5ccd6cSJohn Marino };
1075*ef5ccd6cSJohn Marino
1076*ef5ccd6cSJohn Marino #define yyerrok (yyerrstatus = 0)
1077*ef5ccd6cSJohn Marino #define yyclearin (yychar = YYEMPTY)
1078*ef5ccd6cSJohn Marino #define YYEMPTY (-2)
1079*ef5ccd6cSJohn Marino #define YYEOF 0
1080*ef5ccd6cSJohn Marino
1081*ef5ccd6cSJohn Marino #define YYACCEPT goto yyacceptlab
1082*ef5ccd6cSJohn Marino #define YYABORT goto yyabortlab
1083*ef5ccd6cSJohn Marino #define YYERROR goto yyerrorlab
1084*ef5ccd6cSJohn Marino
1085*ef5ccd6cSJohn Marino
1086*ef5ccd6cSJohn Marino /* Like YYERROR except do call yyerror. This remains here temporarily
1087*ef5ccd6cSJohn Marino to ease the transition to the new meaning of YYERROR, for GCC.
1088*ef5ccd6cSJohn Marino Once GCC version 2 has supplanted version 1, this can go. */
1089*ef5ccd6cSJohn Marino
1090*ef5ccd6cSJohn Marino #define YYFAIL goto yyerrlab
1091*ef5ccd6cSJohn Marino
1092*ef5ccd6cSJohn Marino #define YYRECOVERING() (!!yyerrstatus)
1093*ef5ccd6cSJohn Marino
1094*ef5ccd6cSJohn Marino #define YYBACKUP(Token, Value) \
1095*ef5ccd6cSJohn Marino do \
1096*ef5ccd6cSJohn Marino if (yychar == YYEMPTY && yylen == 1) \
1097*ef5ccd6cSJohn Marino { \
1098*ef5ccd6cSJohn Marino yychar = (Token); \
1099*ef5ccd6cSJohn Marino yylval = (Value); \
1100*ef5ccd6cSJohn Marino yytoken = YYTRANSLATE (yychar); \
1101*ef5ccd6cSJohn Marino YYPOPSTACK (1); \
1102*ef5ccd6cSJohn Marino goto yybackup; \
1103*ef5ccd6cSJohn Marino } \
1104*ef5ccd6cSJohn Marino else \
1105*ef5ccd6cSJohn Marino { \
1106*ef5ccd6cSJohn Marino yyerror (YY_("syntax error: cannot back up")); \
1107*ef5ccd6cSJohn Marino YYERROR; \
1108*ef5ccd6cSJohn Marino } \
1109*ef5ccd6cSJohn Marino while (YYID (0))
1110*ef5ccd6cSJohn Marino
1111*ef5ccd6cSJohn Marino
1112*ef5ccd6cSJohn Marino #define YYTERROR 1
1113*ef5ccd6cSJohn Marino #define YYERRCODE 256
1114*ef5ccd6cSJohn Marino
1115*ef5ccd6cSJohn Marino
1116*ef5ccd6cSJohn Marino /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1117*ef5ccd6cSJohn Marino If N is 0, then set CURRENT to the empty location which ends
1118*ef5ccd6cSJohn Marino the previous symbol: RHS[0] (always defined). */
1119*ef5ccd6cSJohn Marino
1120*ef5ccd6cSJohn Marino #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1121*ef5ccd6cSJohn Marino #ifndef YYLLOC_DEFAULT
1122*ef5ccd6cSJohn Marino # define YYLLOC_DEFAULT(Current, Rhs, N) \
1123*ef5ccd6cSJohn Marino do \
1124*ef5ccd6cSJohn Marino if (YYID (N)) \
1125*ef5ccd6cSJohn Marino { \
1126*ef5ccd6cSJohn Marino (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
1127*ef5ccd6cSJohn Marino (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
1128*ef5ccd6cSJohn Marino (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
1129*ef5ccd6cSJohn Marino (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
1130*ef5ccd6cSJohn Marino } \
1131*ef5ccd6cSJohn Marino else \
1132*ef5ccd6cSJohn Marino { \
1133*ef5ccd6cSJohn Marino (Current).first_line = (Current).last_line = \
1134*ef5ccd6cSJohn Marino YYRHSLOC (Rhs, 0).last_line; \
1135*ef5ccd6cSJohn Marino (Current).first_column = (Current).last_column = \
1136*ef5ccd6cSJohn Marino YYRHSLOC (Rhs, 0).last_column; \
1137*ef5ccd6cSJohn Marino } \
1138*ef5ccd6cSJohn Marino while (YYID (0))
1139*ef5ccd6cSJohn Marino #endif
1140*ef5ccd6cSJohn Marino
1141*ef5ccd6cSJohn Marino
1142*ef5ccd6cSJohn Marino /* YY_LOCATION_PRINT -- Print the location on the stream.
1143*ef5ccd6cSJohn Marino This macro was not mandated originally: define only if we know
1144*ef5ccd6cSJohn Marino we won't break user code: when these are the locations we know. */
1145*ef5ccd6cSJohn Marino
1146*ef5ccd6cSJohn Marino #ifndef YY_LOCATION_PRINT
1147*ef5ccd6cSJohn Marino # if YYLTYPE_IS_TRIVIAL
1148*ef5ccd6cSJohn Marino # define YY_LOCATION_PRINT(File, Loc) \
1149*ef5ccd6cSJohn Marino fprintf (File, "%d.%d-%d.%d", \
1150*ef5ccd6cSJohn Marino (Loc).first_line, (Loc).first_column, \
1151*ef5ccd6cSJohn Marino (Loc).last_line, (Loc).last_column)
1152*ef5ccd6cSJohn Marino # else
1153*ef5ccd6cSJohn Marino # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1154*ef5ccd6cSJohn Marino # endif
1155*ef5ccd6cSJohn Marino #endif
1156*ef5ccd6cSJohn Marino
1157*ef5ccd6cSJohn Marino
1158*ef5ccd6cSJohn Marino /* YYLEX -- calling `yylex' with the right arguments. */
1159*ef5ccd6cSJohn Marino
1160*ef5ccd6cSJohn Marino #ifdef YYLEX_PARAM
1161*ef5ccd6cSJohn Marino # define YYLEX yylex (YYLEX_PARAM)
1162*ef5ccd6cSJohn Marino #else
1163*ef5ccd6cSJohn Marino # define YYLEX yylex ()
1164*ef5ccd6cSJohn Marino #endif
1165*ef5ccd6cSJohn Marino
1166*ef5ccd6cSJohn Marino /* Enable debugging if requested. */
1167*ef5ccd6cSJohn Marino #if YYDEBUG
1168*ef5ccd6cSJohn Marino
1169*ef5ccd6cSJohn Marino # ifndef YYFPRINTF
1170*ef5ccd6cSJohn Marino # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1171*ef5ccd6cSJohn Marino # define YYFPRINTF fprintf
1172*ef5ccd6cSJohn Marino # endif
1173*ef5ccd6cSJohn Marino
1174*ef5ccd6cSJohn Marino # define YYDPRINTF(Args) \
1175*ef5ccd6cSJohn Marino do { \
1176*ef5ccd6cSJohn Marino if (yydebug) \
1177*ef5ccd6cSJohn Marino YYFPRINTF Args; \
1178*ef5ccd6cSJohn Marino } while (YYID (0))
1179*ef5ccd6cSJohn Marino
1180*ef5ccd6cSJohn Marino # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1181*ef5ccd6cSJohn Marino do { \
1182*ef5ccd6cSJohn Marino if (yydebug) \
1183*ef5ccd6cSJohn Marino { \
1184*ef5ccd6cSJohn Marino YYFPRINTF (stderr, "%s ", Title); \
1185*ef5ccd6cSJohn Marino yy_symbol_print (stderr, \
1186*ef5ccd6cSJohn Marino Type, Value); \
1187*ef5ccd6cSJohn Marino YYFPRINTF (stderr, "\n"); \
1188*ef5ccd6cSJohn Marino } \
1189*ef5ccd6cSJohn Marino } while (YYID (0))
1190*ef5ccd6cSJohn Marino
1191*ef5ccd6cSJohn Marino
1192*ef5ccd6cSJohn Marino /*--------------------------------.
1193*ef5ccd6cSJohn Marino | Print this symbol on YYOUTPUT. |
1194*ef5ccd6cSJohn Marino `--------------------------------*/
1195*ef5ccd6cSJohn Marino
1196*ef5ccd6cSJohn Marino /*ARGSUSED*/
1197*ef5ccd6cSJohn Marino #if (defined __STDC__ || defined __C99__FUNC__ \
1198*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
1199*ef5ccd6cSJohn Marino static void
yy_symbol_value_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)1200*ef5ccd6cSJohn Marino yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1201*ef5ccd6cSJohn Marino #else
1202*ef5ccd6cSJohn Marino static void
1203*ef5ccd6cSJohn Marino yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1204*ef5ccd6cSJohn Marino FILE *yyoutput;
1205*ef5ccd6cSJohn Marino int yytype;
1206*ef5ccd6cSJohn Marino YYSTYPE const * const yyvaluep;
1207*ef5ccd6cSJohn Marino #endif
1208*ef5ccd6cSJohn Marino {
1209*ef5ccd6cSJohn Marino if (!yyvaluep)
1210*ef5ccd6cSJohn Marino return;
1211*ef5ccd6cSJohn Marino # ifdef YYPRINT
1212*ef5ccd6cSJohn Marino if (yytype < YYNTOKENS)
1213*ef5ccd6cSJohn Marino YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1214*ef5ccd6cSJohn Marino # else
1215*ef5ccd6cSJohn Marino YYUSE (yyoutput);
1216*ef5ccd6cSJohn Marino # endif
1217*ef5ccd6cSJohn Marino switch (yytype)
1218*ef5ccd6cSJohn Marino {
1219*ef5ccd6cSJohn Marino default:
1220*ef5ccd6cSJohn Marino break;
1221*ef5ccd6cSJohn Marino }
1222*ef5ccd6cSJohn Marino }
1223*ef5ccd6cSJohn Marino
1224*ef5ccd6cSJohn Marino
1225*ef5ccd6cSJohn Marino /*--------------------------------.
1226*ef5ccd6cSJohn Marino | Print this symbol on YYOUTPUT. |
1227*ef5ccd6cSJohn Marino `--------------------------------*/
1228*ef5ccd6cSJohn Marino
1229*ef5ccd6cSJohn Marino #if (defined __STDC__ || defined __C99__FUNC__ \
1230*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
1231*ef5ccd6cSJohn Marino static void
yy_symbol_print(FILE * yyoutput,int yytype,YYSTYPE const * const yyvaluep)1232*ef5ccd6cSJohn Marino yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1233*ef5ccd6cSJohn Marino #else
1234*ef5ccd6cSJohn Marino static void
1235*ef5ccd6cSJohn Marino yy_symbol_print (yyoutput, yytype, yyvaluep)
1236*ef5ccd6cSJohn Marino FILE *yyoutput;
1237*ef5ccd6cSJohn Marino int yytype;
1238*ef5ccd6cSJohn Marino YYSTYPE const * const yyvaluep;
1239*ef5ccd6cSJohn Marino #endif
1240*ef5ccd6cSJohn Marino {
1241*ef5ccd6cSJohn Marino if (yytype < YYNTOKENS)
1242*ef5ccd6cSJohn Marino YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1243*ef5ccd6cSJohn Marino else
1244*ef5ccd6cSJohn Marino YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1245*ef5ccd6cSJohn Marino
1246*ef5ccd6cSJohn Marino yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1247*ef5ccd6cSJohn Marino YYFPRINTF (yyoutput, ")");
1248*ef5ccd6cSJohn Marino }
1249*ef5ccd6cSJohn Marino
1250*ef5ccd6cSJohn Marino /*------------------------------------------------------------------.
1251*ef5ccd6cSJohn Marino | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1252*ef5ccd6cSJohn Marino | TOP (included). |
1253*ef5ccd6cSJohn Marino `------------------------------------------------------------------*/
1254*ef5ccd6cSJohn Marino
1255*ef5ccd6cSJohn Marino #if (defined __STDC__ || defined __C99__FUNC__ \
1256*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
1257*ef5ccd6cSJohn Marino static void
yy_stack_print(yytype_int16 * yybottom,yytype_int16 * yytop)1258*ef5ccd6cSJohn Marino yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1259*ef5ccd6cSJohn Marino #else
1260*ef5ccd6cSJohn Marino static void
1261*ef5ccd6cSJohn Marino yy_stack_print (yybottom, yytop)
1262*ef5ccd6cSJohn Marino yytype_int16 *yybottom;
1263*ef5ccd6cSJohn Marino yytype_int16 *yytop;
1264*ef5ccd6cSJohn Marino #endif
1265*ef5ccd6cSJohn Marino {
1266*ef5ccd6cSJohn Marino YYFPRINTF (stderr, "Stack now");
1267*ef5ccd6cSJohn Marino for (; yybottom <= yytop; yybottom++)
1268*ef5ccd6cSJohn Marino {
1269*ef5ccd6cSJohn Marino int yybot = *yybottom;
1270*ef5ccd6cSJohn Marino YYFPRINTF (stderr, " %d", yybot);
1271*ef5ccd6cSJohn Marino }
1272*ef5ccd6cSJohn Marino YYFPRINTF (stderr, "\n");
1273*ef5ccd6cSJohn Marino }
1274*ef5ccd6cSJohn Marino
1275*ef5ccd6cSJohn Marino # define YY_STACK_PRINT(Bottom, Top) \
1276*ef5ccd6cSJohn Marino do { \
1277*ef5ccd6cSJohn Marino if (yydebug) \
1278*ef5ccd6cSJohn Marino yy_stack_print ((Bottom), (Top)); \
1279*ef5ccd6cSJohn Marino } while (YYID (0))
1280*ef5ccd6cSJohn Marino
1281*ef5ccd6cSJohn Marino
1282*ef5ccd6cSJohn Marino /*------------------------------------------------.
1283*ef5ccd6cSJohn Marino | Report that the YYRULE is going to be reduced. |
1284*ef5ccd6cSJohn Marino `------------------------------------------------*/
1285*ef5ccd6cSJohn Marino
1286*ef5ccd6cSJohn Marino #if (defined __STDC__ || defined __C99__FUNC__ \
1287*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
1288*ef5ccd6cSJohn Marino static void
yy_reduce_print(YYSTYPE * yyvsp,int yyrule)1289*ef5ccd6cSJohn Marino yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1290*ef5ccd6cSJohn Marino #else
1291*ef5ccd6cSJohn Marino static void
1292*ef5ccd6cSJohn Marino yy_reduce_print (yyvsp, yyrule)
1293*ef5ccd6cSJohn Marino YYSTYPE *yyvsp;
1294*ef5ccd6cSJohn Marino int yyrule;
1295*ef5ccd6cSJohn Marino #endif
1296*ef5ccd6cSJohn Marino {
1297*ef5ccd6cSJohn Marino int yynrhs = yyr2[yyrule];
1298*ef5ccd6cSJohn Marino int yyi;
1299*ef5ccd6cSJohn Marino unsigned long int yylno = yyrline[yyrule];
1300*ef5ccd6cSJohn Marino YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1301*ef5ccd6cSJohn Marino yyrule - 1, yylno);
1302*ef5ccd6cSJohn Marino /* The symbols being reduced. */
1303*ef5ccd6cSJohn Marino for (yyi = 0; yyi < yynrhs; yyi++)
1304*ef5ccd6cSJohn Marino {
1305*ef5ccd6cSJohn Marino YYFPRINTF (stderr, " $%d = ", yyi + 1);
1306*ef5ccd6cSJohn Marino yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1307*ef5ccd6cSJohn Marino &(yyvsp[(yyi + 1) - (yynrhs)])
1308*ef5ccd6cSJohn Marino );
1309*ef5ccd6cSJohn Marino YYFPRINTF (stderr, "\n");
1310*ef5ccd6cSJohn Marino }
1311*ef5ccd6cSJohn Marino }
1312*ef5ccd6cSJohn Marino
1313*ef5ccd6cSJohn Marino # define YY_REDUCE_PRINT(Rule) \
1314*ef5ccd6cSJohn Marino do { \
1315*ef5ccd6cSJohn Marino if (yydebug) \
1316*ef5ccd6cSJohn Marino yy_reduce_print (yyvsp, Rule); \
1317*ef5ccd6cSJohn Marino } while (YYID (0))
1318*ef5ccd6cSJohn Marino
1319*ef5ccd6cSJohn Marino /* Nonzero means print parse trace. It is left uninitialized so that
1320*ef5ccd6cSJohn Marino multiple parsers can coexist. */
1321*ef5ccd6cSJohn Marino int yydebug;
1322*ef5ccd6cSJohn Marino #else /* !YYDEBUG */
1323*ef5ccd6cSJohn Marino # define YYDPRINTF(Args)
1324*ef5ccd6cSJohn Marino # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1325*ef5ccd6cSJohn Marino # define YY_STACK_PRINT(Bottom, Top)
1326*ef5ccd6cSJohn Marino # define YY_REDUCE_PRINT(Rule)
1327*ef5ccd6cSJohn Marino #endif /* !YYDEBUG */
1328*ef5ccd6cSJohn Marino
1329*ef5ccd6cSJohn Marino
1330*ef5ccd6cSJohn Marino /* YYINITDEPTH -- initial size of the parser's stacks. */
1331*ef5ccd6cSJohn Marino #ifndef YYINITDEPTH
1332*ef5ccd6cSJohn Marino # define YYINITDEPTH 200
1333*ef5ccd6cSJohn Marino #endif
1334*ef5ccd6cSJohn Marino
1335*ef5ccd6cSJohn Marino /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1336*ef5ccd6cSJohn Marino if the built-in stack extension method is used).
1337*ef5ccd6cSJohn Marino
1338*ef5ccd6cSJohn Marino Do not make this value too large; the results are undefined if
1339*ef5ccd6cSJohn Marino YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1340*ef5ccd6cSJohn Marino evaluated with infinite-precision integer arithmetic. */
1341*ef5ccd6cSJohn Marino
1342*ef5ccd6cSJohn Marino #ifndef YYMAXDEPTH
1343*ef5ccd6cSJohn Marino # define YYMAXDEPTH 10000
1344*ef5ccd6cSJohn Marino #endif
1345*ef5ccd6cSJohn Marino
1346*ef5ccd6cSJohn Marino
1347*ef5ccd6cSJohn Marino
1348*ef5ccd6cSJohn Marino #if YYERROR_VERBOSE
1349*ef5ccd6cSJohn Marino
1350*ef5ccd6cSJohn Marino # ifndef yystrlen
1351*ef5ccd6cSJohn Marino # if defined __GLIBC__ && defined _STRING_H
1352*ef5ccd6cSJohn Marino # define yystrlen strlen
1353*ef5ccd6cSJohn Marino # else
1354*ef5ccd6cSJohn Marino /* Return the length of YYSTR. */
1355*ef5ccd6cSJohn Marino #if (defined __STDC__ || defined __C99__FUNC__ \
1356*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
1357*ef5ccd6cSJohn Marino static YYSIZE_T
yystrlen(const char * yystr)1358*ef5ccd6cSJohn Marino yystrlen (const char *yystr)
1359*ef5ccd6cSJohn Marino #else
1360*ef5ccd6cSJohn Marino static YYSIZE_T
1361*ef5ccd6cSJohn Marino yystrlen (yystr)
1362*ef5ccd6cSJohn Marino const char *yystr;
1363*ef5ccd6cSJohn Marino #endif
1364*ef5ccd6cSJohn Marino {
1365*ef5ccd6cSJohn Marino YYSIZE_T yylen;
1366*ef5ccd6cSJohn Marino for (yylen = 0; yystr[yylen]; yylen++)
1367*ef5ccd6cSJohn Marino continue;
1368*ef5ccd6cSJohn Marino return yylen;
1369*ef5ccd6cSJohn Marino }
1370*ef5ccd6cSJohn Marino # endif
1371*ef5ccd6cSJohn Marino # endif
1372*ef5ccd6cSJohn Marino
1373*ef5ccd6cSJohn Marino # ifndef yystpcpy
1374*ef5ccd6cSJohn Marino # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1375*ef5ccd6cSJohn Marino # define yystpcpy stpcpy
1376*ef5ccd6cSJohn Marino # else
1377*ef5ccd6cSJohn Marino /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1378*ef5ccd6cSJohn Marino YYDEST. */
1379*ef5ccd6cSJohn Marino #if (defined __STDC__ || defined __C99__FUNC__ \
1380*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
1381*ef5ccd6cSJohn Marino static char *
yystpcpy(char * yydest,const char * yysrc)1382*ef5ccd6cSJohn Marino yystpcpy (char *yydest, const char *yysrc)
1383*ef5ccd6cSJohn Marino #else
1384*ef5ccd6cSJohn Marino static char *
1385*ef5ccd6cSJohn Marino yystpcpy (yydest, yysrc)
1386*ef5ccd6cSJohn Marino char *yydest;
1387*ef5ccd6cSJohn Marino const char *yysrc;
1388*ef5ccd6cSJohn Marino #endif
1389*ef5ccd6cSJohn Marino {
1390*ef5ccd6cSJohn Marino char *yyd = yydest;
1391*ef5ccd6cSJohn Marino const char *yys = yysrc;
1392*ef5ccd6cSJohn Marino
1393*ef5ccd6cSJohn Marino while ((*yyd++ = *yys++) != '\0')
1394*ef5ccd6cSJohn Marino continue;
1395*ef5ccd6cSJohn Marino
1396*ef5ccd6cSJohn Marino return yyd - 1;
1397*ef5ccd6cSJohn Marino }
1398*ef5ccd6cSJohn Marino # endif
1399*ef5ccd6cSJohn Marino # endif
1400*ef5ccd6cSJohn Marino
1401*ef5ccd6cSJohn Marino # ifndef yytnamerr
1402*ef5ccd6cSJohn Marino /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1403*ef5ccd6cSJohn Marino quotes and backslashes, so that it's suitable for yyerror. The
1404*ef5ccd6cSJohn Marino heuristic is that double-quoting is unnecessary unless the string
1405*ef5ccd6cSJohn Marino contains an apostrophe, a comma, or backslash (other than
1406*ef5ccd6cSJohn Marino backslash-backslash). YYSTR is taken from yytname. If YYRES is
1407*ef5ccd6cSJohn Marino null, do not copy; instead, return the length of what the result
1408*ef5ccd6cSJohn Marino would have been. */
1409*ef5ccd6cSJohn Marino static YYSIZE_T
yytnamerr(char * yyres,const char * yystr)1410*ef5ccd6cSJohn Marino yytnamerr (char *yyres, const char *yystr)
1411*ef5ccd6cSJohn Marino {
1412*ef5ccd6cSJohn Marino if (*yystr == '"')
1413*ef5ccd6cSJohn Marino {
1414*ef5ccd6cSJohn Marino YYSIZE_T yyn = 0;
1415*ef5ccd6cSJohn Marino char const *yyp = yystr;
1416*ef5ccd6cSJohn Marino
1417*ef5ccd6cSJohn Marino for (;;)
1418*ef5ccd6cSJohn Marino switch (*++yyp)
1419*ef5ccd6cSJohn Marino {
1420*ef5ccd6cSJohn Marino case '\'':
1421*ef5ccd6cSJohn Marino case ',':
1422*ef5ccd6cSJohn Marino goto do_not_strip_quotes;
1423*ef5ccd6cSJohn Marino
1424*ef5ccd6cSJohn Marino case '\\':
1425*ef5ccd6cSJohn Marino if (*++yyp != '\\')
1426*ef5ccd6cSJohn Marino goto do_not_strip_quotes;
1427*ef5ccd6cSJohn Marino /* Fall through. */
1428*ef5ccd6cSJohn Marino default:
1429*ef5ccd6cSJohn Marino if (yyres)
1430*ef5ccd6cSJohn Marino yyres[yyn] = *yyp;
1431*ef5ccd6cSJohn Marino yyn++;
1432*ef5ccd6cSJohn Marino break;
1433*ef5ccd6cSJohn Marino
1434*ef5ccd6cSJohn Marino case '"':
1435*ef5ccd6cSJohn Marino if (yyres)
1436*ef5ccd6cSJohn Marino yyres[yyn] = '\0';
1437*ef5ccd6cSJohn Marino return yyn;
1438*ef5ccd6cSJohn Marino }
1439*ef5ccd6cSJohn Marino do_not_strip_quotes: ;
1440*ef5ccd6cSJohn Marino }
1441*ef5ccd6cSJohn Marino
1442*ef5ccd6cSJohn Marino if (! yyres)
1443*ef5ccd6cSJohn Marino return yystrlen (yystr);
1444*ef5ccd6cSJohn Marino
1445*ef5ccd6cSJohn Marino return yystpcpy (yyres, yystr) - yyres;
1446*ef5ccd6cSJohn Marino }
1447*ef5ccd6cSJohn Marino # endif
1448*ef5ccd6cSJohn Marino
1449*ef5ccd6cSJohn Marino /* Copy into YYRESULT an error message about the unexpected token
1450*ef5ccd6cSJohn Marino YYCHAR while in state YYSTATE. Return the number of bytes copied,
1451*ef5ccd6cSJohn Marino including the terminating null byte. If YYRESULT is null, do not
1452*ef5ccd6cSJohn Marino copy anything; just return the number of bytes that would be
1453*ef5ccd6cSJohn Marino copied. As a special case, return 0 if an ordinary "syntax error"
1454*ef5ccd6cSJohn Marino message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1455*ef5ccd6cSJohn Marino size calculation. */
1456*ef5ccd6cSJohn Marino static YYSIZE_T
yysyntax_error(char * yyresult,int yystate,int yychar)1457*ef5ccd6cSJohn Marino yysyntax_error (char *yyresult, int yystate, int yychar)
1458*ef5ccd6cSJohn Marino {
1459*ef5ccd6cSJohn Marino int yyn = yypact[yystate];
1460*ef5ccd6cSJohn Marino
1461*ef5ccd6cSJohn Marino if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1462*ef5ccd6cSJohn Marino return 0;
1463*ef5ccd6cSJohn Marino else
1464*ef5ccd6cSJohn Marino {
1465*ef5ccd6cSJohn Marino int yytype = YYTRANSLATE (yychar);
1466*ef5ccd6cSJohn Marino YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1467*ef5ccd6cSJohn Marino YYSIZE_T yysize = yysize0;
1468*ef5ccd6cSJohn Marino YYSIZE_T yysize1;
1469*ef5ccd6cSJohn Marino int yysize_overflow = 0;
1470*ef5ccd6cSJohn Marino enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1471*ef5ccd6cSJohn Marino char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1472*ef5ccd6cSJohn Marino int yyx;
1473*ef5ccd6cSJohn Marino
1474*ef5ccd6cSJohn Marino # if 0
1475*ef5ccd6cSJohn Marino /* This is so xgettext sees the translatable formats that are
1476*ef5ccd6cSJohn Marino constructed on the fly. */
1477*ef5ccd6cSJohn Marino YY_("syntax error, unexpected %s");
1478*ef5ccd6cSJohn Marino YY_("syntax error, unexpected %s, expecting %s");
1479*ef5ccd6cSJohn Marino YY_("syntax error, unexpected %s, expecting %s or %s");
1480*ef5ccd6cSJohn Marino YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1481*ef5ccd6cSJohn Marino YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1482*ef5ccd6cSJohn Marino # endif
1483*ef5ccd6cSJohn Marino char *yyfmt;
1484*ef5ccd6cSJohn Marino char const *yyf;
1485*ef5ccd6cSJohn Marino static char const yyunexpected[] = "syntax error, unexpected %s";
1486*ef5ccd6cSJohn Marino static char const yyexpecting[] = ", expecting %s";
1487*ef5ccd6cSJohn Marino static char const yyor[] = " or %s";
1488*ef5ccd6cSJohn Marino char yyformat[sizeof yyunexpected
1489*ef5ccd6cSJohn Marino + sizeof yyexpecting - 1
1490*ef5ccd6cSJohn Marino + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1491*ef5ccd6cSJohn Marino * (sizeof yyor - 1))];
1492*ef5ccd6cSJohn Marino char const *yyprefix = yyexpecting;
1493*ef5ccd6cSJohn Marino
1494*ef5ccd6cSJohn Marino /* Start YYX at -YYN if negative to avoid negative indexes in
1495*ef5ccd6cSJohn Marino YYCHECK. */
1496*ef5ccd6cSJohn Marino int yyxbegin = yyn < 0 ? -yyn : 0;
1497*ef5ccd6cSJohn Marino
1498*ef5ccd6cSJohn Marino /* Stay within bounds of both yycheck and yytname. */
1499*ef5ccd6cSJohn Marino int yychecklim = YYLAST - yyn + 1;
1500*ef5ccd6cSJohn Marino int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1501*ef5ccd6cSJohn Marino int yycount = 1;
1502*ef5ccd6cSJohn Marino
1503*ef5ccd6cSJohn Marino yyarg[0] = yytname[yytype];
1504*ef5ccd6cSJohn Marino yyfmt = yystpcpy (yyformat, yyunexpected);
1505*ef5ccd6cSJohn Marino
1506*ef5ccd6cSJohn Marino for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1507*ef5ccd6cSJohn Marino if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1508*ef5ccd6cSJohn Marino {
1509*ef5ccd6cSJohn Marino if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1510*ef5ccd6cSJohn Marino {
1511*ef5ccd6cSJohn Marino yycount = 1;
1512*ef5ccd6cSJohn Marino yysize = yysize0;
1513*ef5ccd6cSJohn Marino yyformat[sizeof yyunexpected - 1] = '\0';
1514*ef5ccd6cSJohn Marino break;
1515*ef5ccd6cSJohn Marino }
1516*ef5ccd6cSJohn Marino yyarg[yycount++] = yytname[yyx];
1517*ef5ccd6cSJohn Marino yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1518*ef5ccd6cSJohn Marino yysize_overflow |= (yysize1 < yysize);
1519*ef5ccd6cSJohn Marino yysize = yysize1;
1520*ef5ccd6cSJohn Marino yyfmt = yystpcpy (yyfmt, yyprefix);
1521*ef5ccd6cSJohn Marino yyprefix = yyor;
1522*ef5ccd6cSJohn Marino }
1523*ef5ccd6cSJohn Marino
1524*ef5ccd6cSJohn Marino yyf = YY_(yyformat);
1525*ef5ccd6cSJohn Marino yysize1 = yysize + yystrlen (yyf);
1526*ef5ccd6cSJohn Marino yysize_overflow |= (yysize1 < yysize);
1527*ef5ccd6cSJohn Marino yysize = yysize1;
1528*ef5ccd6cSJohn Marino
1529*ef5ccd6cSJohn Marino if (yysize_overflow)
1530*ef5ccd6cSJohn Marino return YYSIZE_MAXIMUM;
1531*ef5ccd6cSJohn Marino
1532*ef5ccd6cSJohn Marino if (yyresult)
1533*ef5ccd6cSJohn Marino {
1534*ef5ccd6cSJohn Marino /* Avoid sprintf, as that infringes on the user's name space.
1535*ef5ccd6cSJohn Marino Don't have undefined behavior even if the translation
1536*ef5ccd6cSJohn Marino produced a string with the wrong number of "%s"s. */
1537*ef5ccd6cSJohn Marino char *yyp = yyresult;
1538*ef5ccd6cSJohn Marino int yyi = 0;
1539*ef5ccd6cSJohn Marino while ((*yyp = *yyf) != '\0')
1540*ef5ccd6cSJohn Marino {
1541*ef5ccd6cSJohn Marino if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1542*ef5ccd6cSJohn Marino {
1543*ef5ccd6cSJohn Marino yyp += yytnamerr (yyp, yyarg[yyi++]);
1544*ef5ccd6cSJohn Marino yyf += 2;
1545*ef5ccd6cSJohn Marino }
1546*ef5ccd6cSJohn Marino else
1547*ef5ccd6cSJohn Marino {
1548*ef5ccd6cSJohn Marino yyp++;
1549*ef5ccd6cSJohn Marino yyf++;
1550*ef5ccd6cSJohn Marino }
1551*ef5ccd6cSJohn Marino }
1552*ef5ccd6cSJohn Marino }
1553*ef5ccd6cSJohn Marino return yysize;
1554*ef5ccd6cSJohn Marino }
1555*ef5ccd6cSJohn Marino }
1556*ef5ccd6cSJohn Marino #endif /* YYERROR_VERBOSE */
1557*ef5ccd6cSJohn Marino
1558*ef5ccd6cSJohn Marino
1559*ef5ccd6cSJohn Marino /*-----------------------------------------------.
1560*ef5ccd6cSJohn Marino | Release the memory associated to this symbol. |
1561*ef5ccd6cSJohn Marino `-----------------------------------------------*/
1562*ef5ccd6cSJohn Marino
1563*ef5ccd6cSJohn Marino /*ARGSUSED*/
1564*ef5ccd6cSJohn Marino #if (defined __STDC__ || defined __C99__FUNC__ \
1565*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
1566*ef5ccd6cSJohn Marino static void
yydestruct(const char * yymsg,int yytype,YYSTYPE * yyvaluep)1567*ef5ccd6cSJohn Marino yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1568*ef5ccd6cSJohn Marino #else
1569*ef5ccd6cSJohn Marino static void
1570*ef5ccd6cSJohn Marino yydestruct (yymsg, yytype, yyvaluep)
1571*ef5ccd6cSJohn Marino const char *yymsg;
1572*ef5ccd6cSJohn Marino int yytype;
1573*ef5ccd6cSJohn Marino YYSTYPE *yyvaluep;
1574*ef5ccd6cSJohn Marino #endif
1575*ef5ccd6cSJohn Marino {
1576*ef5ccd6cSJohn Marino YYUSE (yyvaluep);
1577*ef5ccd6cSJohn Marino
1578*ef5ccd6cSJohn Marino if (!yymsg)
1579*ef5ccd6cSJohn Marino yymsg = "Deleting";
1580*ef5ccd6cSJohn Marino YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1581*ef5ccd6cSJohn Marino
1582*ef5ccd6cSJohn Marino switch (yytype)
1583*ef5ccd6cSJohn Marino {
1584*ef5ccd6cSJohn Marino
1585*ef5ccd6cSJohn Marino default:
1586*ef5ccd6cSJohn Marino break;
1587*ef5ccd6cSJohn Marino }
1588*ef5ccd6cSJohn Marino }
1589*ef5ccd6cSJohn Marino
1590*ef5ccd6cSJohn Marino /* Prevent warnings from -Wmissing-prototypes. */
1591*ef5ccd6cSJohn Marino #ifdef YYPARSE_PARAM
1592*ef5ccd6cSJohn Marino #if defined __STDC__ || defined __cplusplus
1593*ef5ccd6cSJohn Marino int yyparse (void *YYPARSE_PARAM);
1594*ef5ccd6cSJohn Marino #else
1595*ef5ccd6cSJohn Marino int yyparse ();
1596*ef5ccd6cSJohn Marino #endif
1597*ef5ccd6cSJohn Marino #else /* ! YYPARSE_PARAM */
1598*ef5ccd6cSJohn Marino #if defined __STDC__ || defined __cplusplus
1599*ef5ccd6cSJohn Marino int yyparse (void);
1600*ef5ccd6cSJohn Marino #else
1601*ef5ccd6cSJohn Marino int yyparse ();
1602*ef5ccd6cSJohn Marino #endif
1603*ef5ccd6cSJohn Marino #endif /* ! YYPARSE_PARAM */
1604*ef5ccd6cSJohn Marino
1605*ef5ccd6cSJohn Marino
1606*ef5ccd6cSJohn Marino /* The lookahead symbol. */
1607*ef5ccd6cSJohn Marino int yychar;
1608*ef5ccd6cSJohn Marino
1609*ef5ccd6cSJohn Marino /* The semantic value of the lookahead symbol. */
1610*ef5ccd6cSJohn Marino YYSTYPE yylval;
1611*ef5ccd6cSJohn Marino
1612*ef5ccd6cSJohn Marino /* Number of syntax errors so far. */
1613*ef5ccd6cSJohn Marino int yynerrs;
1614*ef5ccd6cSJohn Marino
1615*ef5ccd6cSJohn Marino
1616*ef5ccd6cSJohn Marino
1617*ef5ccd6cSJohn Marino /*-------------------------.
1618*ef5ccd6cSJohn Marino | yyparse or yypush_parse. |
1619*ef5ccd6cSJohn Marino `-------------------------*/
1620*ef5ccd6cSJohn Marino
1621*ef5ccd6cSJohn Marino #ifdef YYPARSE_PARAM
1622*ef5ccd6cSJohn Marino #if (defined __STDC__ || defined __C99__FUNC__ \
1623*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
1624*ef5ccd6cSJohn Marino int
yyparse(void * YYPARSE_PARAM)1625*ef5ccd6cSJohn Marino yyparse (void *YYPARSE_PARAM)
1626*ef5ccd6cSJohn Marino #else
1627*ef5ccd6cSJohn Marino int
1628*ef5ccd6cSJohn Marino yyparse (YYPARSE_PARAM)
1629*ef5ccd6cSJohn Marino void *YYPARSE_PARAM;
1630*ef5ccd6cSJohn Marino #endif
1631*ef5ccd6cSJohn Marino #else /* ! YYPARSE_PARAM */
1632*ef5ccd6cSJohn Marino #if (defined __STDC__ || defined __C99__FUNC__ \
1633*ef5ccd6cSJohn Marino || defined __cplusplus || defined _MSC_VER)
1634*ef5ccd6cSJohn Marino int
1635*ef5ccd6cSJohn Marino yyparse (void)
1636*ef5ccd6cSJohn Marino #else
1637*ef5ccd6cSJohn Marino int
1638*ef5ccd6cSJohn Marino yyparse ()
1639*ef5ccd6cSJohn Marino
1640*ef5ccd6cSJohn Marino #endif
1641*ef5ccd6cSJohn Marino #endif
1642*ef5ccd6cSJohn Marino {
1643*ef5ccd6cSJohn Marino
1644*ef5ccd6cSJohn Marino
1645*ef5ccd6cSJohn Marino int yystate;
1646*ef5ccd6cSJohn Marino /* Number of tokens to shift before error messages enabled. */
1647*ef5ccd6cSJohn Marino int yyerrstatus;
1648*ef5ccd6cSJohn Marino
1649*ef5ccd6cSJohn Marino /* The stacks and their tools:
1650*ef5ccd6cSJohn Marino `yyss': related to states.
1651*ef5ccd6cSJohn Marino `yyvs': related to semantic values.
1652*ef5ccd6cSJohn Marino
1653*ef5ccd6cSJohn Marino Refer to the stacks thru separate pointers, to allow yyoverflow
1654*ef5ccd6cSJohn Marino to xreallocate them elsewhere. */
1655*ef5ccd6cSJohn Marino
1656*ef5ccd6cSJohn Marino /* The state stack. */
1657*ef5ccd6cSJohn Marino yytype_int16 yyssa[YYINITDEPTH];
1658*ef5ccd6cSJohn Marino yytype_int16 *yyss;
1659*ef5ccd6cSJohn Marino yytype_int16 *yyssp;
1660*ef5ccd6cSJohn Marino
1661*ef5ccd6cSJohn Marino /* The semantic value stack. */
1662*ef5ccd6cSJohn Marino YYSTYPE yyvsa[YYINITDEPTH];
1663*ef5ccd6cSJohn Marino YYSTYPE *yyvs;
1664*ef5ccd6cSJohn Marino YYSTYPE *yyvsp;
1665*ef5ccd6cSJohn Marino
1666*ef5ccd6cSJohn Marino YYSIZE_T yystacksize;
1667*ef5ccd6cSJohn Marino
1668*ef5ccd6cSJohn Marino int yyn;
1669*ef5ccd6cSJohn Marino int yyresult;
1670*ef5ccd6cSJohn Marino /* Lookahead token as an internal (translated) token number. */
1671*ef5ccd6cSJohn Marino int yytoken;
1672*ef5ccd6cSJohn Marino /* The variables used to return semantic value and location from the
1673*ef5ccd6cSJohn Marino action routines. */
1674*ef5ccd6cSJohn Marino YYSTYPE yyval;
1675*ef5ccd6cSJohn Marino
1676*ef5ccd6cSJohn Marino #if YYERROR_VERBOSE
1677*ef5ccd6cSJohn Marino /* Buffer for error messages, and its allocated size. */
1678*ef5ccd6cSJohn Marino char yymsgbuf[128];
1679*ef5ccd6cSJohn Marino char *yymsg = yymsgbuf;
1680*ef5ccd6cSJohn Marino YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1681*ef5ccd6cSJohn Marino #endif
1682*ef5ccd6cSJohn Marino
1683*ef5ccd6cSJohn Marino #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1684*ef5ccd6cSJohn Marino
1685*ef5ccd6cSJohn Marino /* The number of symbols on the RHS of the reduced rule.
1686*ef5ccd6cSJohn Marino Keep to zero when no symbol should be popped. */
1687*ef5ccd6cSJohn Marino int yylen = 0;
1688*ef5ccd6cSJohn Marino
1689*ef5ccd6cSJohn Marino yytoken = 0;
1690*ef5ccd6cSJohn Marino yyss = yyssa;
1691*ef5ccd6cSJohn Marino yyvs = yyvsa;
1692*ef5ccd6cSJohn Marino yystacksize = YYINITDEPTH;
1693*ef5ccd6cSJohn Marino
1694*ef5ccd6cSJohn Marino YYDPRINTF ((stderr, "Starting parse\n"));
1695*ef5ccd6cSJohn Marino
1696*ef5ccd6cSJohn Marino yystate = 0;
1697*ef5ccd6cSJohn Marino yyerrstatus = 0;
1698*ef5ccd6cSJohn Marino yynerrs = 0;
1699*ef5ccd6cSJohn Marino yychar = YYEMPTY; /* Cause a token to be read. */
1700*ef5ccd6cSJohn Marino
1701*ef5ccd6cSJohn Marino /* Initialize stack pointers.
1702*ef5ccd6cSJohn Marino Waste one element of value and location stack
1703*ef5ccd6cSJohn Marino so that they stay on the same level as the state stack.
1704*ef5ccd6cSJohn Marino The wasted elements are never initialized. */
1705*ef5ccd6cSJohn Marino yyssp = yyss;
1706*ef5ccd6cSJohn Marino yyvsp = yyvs;
1707*ef5ccd6cSJohn Marino
1708*ef5ccd6cSJohn Marino goto yysetstate;
1709*ef5ccd6cSJohn Marino
1710*ef5ccd6cSJohn Marino /*------------------------------------------------------------.
1711*ef5ccd6cSJohn Marino | yynewstate -- Push a new state, which is found in yystate. |
1712*ef5ccd6cSJohn Marino `------------------------------------------------------------*/
1713*ef5ccd6cSJohn Marino yynewstate:
1714*ef5ccd6cSJohn Marino /* In all cases, when you get here, the value and location stacks
1715*ef5ccd6cSJohn Marino have just been pushed. So pushing a state here evens the stacks. */
1716*ef5ccd6cSJohn Marino yyssp++;
1717*ef5ccd6cSJohn Marino
1718*ef5ccd6cSJohn Marino yysetstate:
1719*ef5ccd6cSJohn Marino *yyssp = yystate;
1720*ef5ccd6cSJohn Marino
1721*ef5ccd6cSJohn Marino if (yyss + yystacksize - 1 <= yyssp)
1722*ef5ccd6cSJohn Marino {
1723*ef5ccd6cSJohn Marino /* Get the current used size of the three stacks, in elements. */
1724*ef5ccd6cSJohn Marino YYSIZE_T yysize = yyssp - yyss + 1;
1725*ef5ccd6cSJohn Marino
1726*ef5ccd6cSJohn Marino #ifdef yyoverflow
1727*ef5ccd6cSJohn Marino {
1728*ef5ccd6cSJohn Marino /* Give user a chance to xreallocate the stack. Use copies of
1729*ef5ccd6cSJohn Marino these so that the &'s don't force the real ones into
1730*ef5ccd6cSJohn Marino memory. */
1731*ef5ccd6cSJohn Marino YYSTYPE *yyvs1 = yyvs;
1732*ef5ccd6cSJohn Marino yytype_int16 *yyss1 = yyss;
1733*ef5ccd6cSJohn Marino
1734*ef5ccd6cSJohn Marino /* Each stack pointer address is followed by the size of the
1735*ef5ccd6cSJohn Marino data in use in that stack, in bytes. This used to be a
1736*ef5ccd6cSJohn Marino conditional around just the two extra args, but that might
1737*ef5ccd6cSJohn Marino be undefined if yyoverflow is a macro. */
1738*ef5ccd6cSJohn Marino yyoverflow (YY_("memory exhausted"),
1739*ef5ccd6cSJohn Marino &yyss1, yysize * sizeof (*yyssp),
1740*ef5ccd6cSJohn Marino &yyvs1, yysize * sizeof (*yyvsp),
1741*ef5ccd6cSJohn Marino &yystacksize);
1742*ef5ccd6cSJohn Marino
1743*ef5ccd6cSJohn Marino yyss = yyss1;
1744*ef5ccd6cSJohn Marino yyvs = yyvs1;
1745*ef5ccd6cSJohn Marino }
1746*ef5ccd6cSJohn Marino #else /* no yyoverflow */
1747*ef5ccd6cSJohn Marino # ifndef YYSTACK_RELOCATE
1748*ef5ccd6cSJohn Marino goto yyexhaustedlab;
1749*ef5ccd6cSJohn Marino # else
1750*ef5ccd6cSJohn Marino /* Extend the stack our own way. */
1751*ef5ccd6cSJohn Marino if (YYMAXDEPTH <= yystacksize)
1752*ef5ccd6cSJohn Marino goto yyexhaustedlab;
1753*ef5ccd6cSJohn Marino yystacksize *= 2;
1754*ef5ccd6cSJohn Marino if (YYMAXDEPTH < yystacksize)
1755*ef5ccd6cSJohn Marino yystacksize = YYMAXDEPTH;
1756*ef5ccd6cSJohn Marino
1757*ef5ccd6cSJohn Marino {
1758*ef5ccd6cSJohn Marino yytype_int16 *yyss1 = yyss;
1759*ef5ccd6cSJohn Marino union yyalloc *yyptr =
1760*ef5ccd6cSJohn Marino (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1761*ef5ccd6cSJohn Marino if (! yyptr)
1762*ef5ccd6cSJohn Marino goto yyexhaustedlab;
1763*ef5ccd6cSJohn Marino YYSTACK_RELOCATE (yyss_alloc, yyss);
1764*ef5ccd6cSJohn Marino YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1765*ef5ccd6cSJohn Marino # undef YYSTACK_RELOCATE
1766*ef5ccd6cSJohn Marino if (yyss1 != yyssa)
1767*ef5ccd6cSJohn Marino YYSTACK_FREE (yyss1);
1768*ef5ccd6cSJohn Marino }
1769*ef5ccd6cSJohn Marino # endif
1770*ef5ccd6cSJohn Marino #endif /* no yyoverflow */
1771*ef5ccd6cSJohn Marino
1772*ef5ccd6cSJohn Marino yyssp = yyss + yysize - 1;
1773*ef5ccd6cSJohn Marino yyvsp = yyvs + yysize - 1;
1774*ef5ccd6cSJohn Marino
1775*ef5ccd6cSJohn Marino YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1776*ef5ccd6cSJohn Marino (unsigned long int) yystacksize));
1777*ef5ccd6cSJohn Marino
1778*ef5ccd6cSJohn Marino if (yyss + yystacksize - 1 <= yyssp)
1779*ef5ccd6cSJohn Marino YYABORT;
1780*ef5ccd6cSJohn Marino }
1781*ef5ccd6cSJohn Marino
1782*ef5ccd6cSJohn Marino YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1783*ef5ccd6cSJohn Marino
1784*ef5ccd6cSJohn Marino if (yystate == YYFINAL)
1785*ef5ccd6cSJohn Marino YYACCEPT;
1786*ef5ccd6cSJohn Marino
1787*ef5ccd6cSJohn Marino goto yybackup;
1788*ef5ccd6cSJohn Marino
1789*ef5ccd6cSJohn Marino /*-----------.
1790*ef5ccd6cSJohn Marino | yybackup. |
1791*ef5ccd6cSJohn Marino `-----------*/
1792*ef5ccd6cSJohn Marino yybackup:
1793*ef5ccd6cSJohn Marino
1794*ef5ccd6cSJohn Marino /* Do appropriate processing given the current state. Read a
1795*ef5ccd6cSJohn Marino lookahead token if we need one and don't already have one. */
1796*ef5ccd6cSJohn Marino
1797*ef5ccd6cSJohn Marino /* First try to decide what to do without reference to lookahead token. */
1798*ef5ccd6cSJohn Marino yyn = yypact[yystate];
1799*ef5ccd6cSJohn Marino if (yyn == YYPACT_NINF)
1800*ef5ccd6cSJohn Marino goto yydefault;
1801*ef5ccd6cSJohn Marino
1802*ef5ccd6cSJohn Marino /* Not known => get a lookahead token if don't already have one. */
1803*ef5ccd6cSJohn Marino
1804*ef5ccd6cSJohn Marino /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1805*ef5ccd6cSJohn Marino if (yychar == YYEMPTY)
1806*ef5ccd6cSJohn Marino {
1807*ef5ccd6cSJohn Marino YYDPRINTF ((stderr, "Reading a token: "));
1808*ef5ccd6cSJohn Marino yychar = YYLEX;
1809*ef5ccd6cSJohn Marino }
1810*ef5ccd6cSJohn Marino
1811*ef5ccd6cSJohn Marino if (yychar <= YYEOF)
1812*ef5ccd6cSJohn Marino {
1813*ef5ccd6cSJohn Marino yychar = yytoken = YYEOF;
1814*ef5ccd6cSJohn Marino YYDPRINTF ((stderr, "Now at end of input.\n"));
1815*ef5ccd6cSJohn Marino }
1816*ef5ccd6cSJohn Marino else
1817*ef5ccd6cSJohn Marino {
1818*ef5ccd6cSJohn Marino yytoken = YYTRANSLATE (yychar);
1819*ef5ccd6cSJohn Marino YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1820*ef5ccd6cSJohn Marino }
1821*ef5ccd6cSJohn Marino
1822*ef5ccd6cSJohn Marino /* If the proper action on seeing token YYTOKEN is to reduce or to
1823*ef5ccd6cSJohn Marino detect an error, take that action. */
1824*ef5ccd6cSJohn Marino yyn += yytoken;
1825*ef5ccd6cSJohn Marino if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1826*ef5ccd6cSJohn Marino goto yydefault;
1827*ef5ccd6cSJohn Marino yyn = yytable[yyn];
1828*ef5ccd6cSJohn Marino if (yyn <= 0)
1829*ef5ccd6cSJohn Marino {
1830*ef5ccd6cSJohn Marino if (yyn == 0 || yyn == YYTABLE_NINF)
1831*ef5ccd6cSJohn Marino goto yyerrlab;
1832*ef5ccd6cSJohn Marino yyn = -yyn;
1833*ef5ccd6cSJohn Marino goto yyreduce;
1834*ef5ccd6cSJohn Marino }
1835*ef5ccd6cSJohn Marino
1836*ef5ccd6cSJohn Marino /* Count tokens shifted since error; after three, turn off error
1837*ef5ccd6cSJohn Marino status. */
1838*ef5ccd6cSJohn Marino if (yyerrstatus)
1839*ef5ccd6cSJohn Marino yyerrstatus--;
1840*ef5ccd6cSJohn Marino
1841*ef5ccd6cSJohn Marino /* Shift the lookahead token. */
1842*ef5ccd6cSJohn Marino YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1843*ef5ccd6cSJohn Marino
1844*ef5ccd6cSJohn Marino /* Discard the shifted token. */
1845*ef5ccd6cSJohn Marino yychar = YYEMPTY;
1846*ef5ccd6cSJohn Marino
1847*ef5ccd6cSJohn Marino yystate = yyn;
1848*ef5ccd6cSJohn Marino *++yyvsp = yylval;
1849*ef5ccd6cSJohn Marino
1850*ef5ccd6cSJohn Marino goto yynewstate;
1851*ef5ccd6cSJohn Marino
1852*ef5ccd6cSJohn Marino
1853*ef5ccd6cSJohn Marino /*-----------------------------------------------------------.
1854*ef5ccd6cSJohn Marino | yydefault -- do the default action for the current state. |
1855*ef5ccd6cSJohn Marino `-----------------------------------------------------------*/
1856*ef5ccd6cSJohn Marino yydefault:
1857*ef5ccd6cSJohn Marino yyn = yydefact[yystate];
1858*ef5ccd6cSJohn Marino if (yyn == 0)
1859*ef5ccd6cSJohn Marino goto yyerrlab;
1860*ef5ccd6cSJohn Marino goto yyreduce;
1861*ef5ccd6cSJohn Marino
1862*ef5ccd6cSJohn Marino
1863*ef5ccd6cSJohn Marino /*-----------------------------.
1864*ef5ccd6cSJohn Marino | yyreduce -- Do a reduction. |
1865*ef5ccd6cSJohn Marino `-----------------------------*/
1866*ef5ccd6cSJohn Marino yyreduce:
1867*ef5ccd6cSJohn Marino /* yyn is the number of a rule to reduce with. */
1868*ef5ccd6cSJohn Marino yylen = yyr2[yyn];
1869*ef5ccd6cSJohn Marino
1870*ef5ccd6cSJohn Marino /* If YYLEN is nonzero, implement the default value of the action:
1871*ef5ccd6cSJohn Marino `$$ = $1'.
1872*ef5ccd6cSJohn Marino
1873*ef5ccd6cSJohn Marino Otherwise, the following line sets YYVAL to garbage.
1874*ef5ccd6cSJohn Marino This behavior is undocumented and Bison
1875*ef5ccd6cSJohn Marino users should not rely upon it. Assigning to YYVAL
1876*ef5ccd6cSJohn Marino unconditionally makes the parser a bit smaller, and it avoids a
1877*ef5ccd6cSJohn Marino GCC warning that YYVAL may be used uninitialized. */
1878*ef5ccd6cSJohn Marino yyval = yyvsp[1-yylen];
1879*ef5ccd6cSJohn Marino
1880*ef5ccd6cSJohn Marino
1881*ef5ccd6cSJohn Marino YY_REDUCE_PRINT (yyn);
1882*ef5ccd6cSJohn Marino switch (yyn)
1883*ef5ccd6cSJohn Marino {
1884*ef5ccd6cSJohn Marino case 4:
1885*ef5ccd6cSJohn Marino
1886*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1887*ef5ccd6cSJohn Marino #line 239 "ada-exp.y"
1888*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_COMMA); }
1889*ef5ccd6cSJohn Marino break;
1890*ef5ccd6cSJohn Marino
1891*ef5ccd6cSJohn Marino case 5:
1892*ef5ccd6cSJohn Marino
1893*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1894*ef5ccd6cSJohn Marino #line 241 "ada-exp.y"
1895*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_ASSIGN); }
1896*ef5ccd6cSJohn Marino break;
1897*ef5ccd6cSJohn Marino
1898*ef5ccd6cSJohn Marino case 6:
1899*ef5ccd6cSJohn Marino
1900*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1901*ef5ccd6cSJohn Marino #line 246 "ada-exp.y"
1902*ef5ccd6cSJohn Marino { write_exp_elt_opcode (UNOP_IND); }
1903*ef5ccd6cSJohn Marino break;
1904*ef5ccd6cSJohn Marino
1905*ef5ccd6cSJohn Marino case 7:
1906*ef5ccd6cSJohn Marino
1907*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1908*ef5ccd6cSJohn Marino #line 250 "ada-exp.y"
1909*ef5ccd6cSJohn Marino { write_exp_op_with_string (STRUCTOP_STRUCT, (yyvsp[(2) - (2)].sval)); }
1910*ef5ccd6cSJohn Marino break;
1911*ef5ccd6cSJohn Marino
1912*ef5ccd6cSJohn Marino case 8:
1913*ef5ccd6cSJohn Marino
1914*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1915*ef5ccd6cSJohn Marino #line 254 "ada-exp.y"
1916*ef5ccd6cSJohn Marino {
1917*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_FUNCALL);
1918*ef5ccd6cSJohn Marino write_exp_elt_longcst ((yyvsp[(3) - (4)].lval));
1919*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_FUNCALL);
1920*ef5ccd6cSJohn Marino }
1921*ef5ccd6cSJohn Marino break;
1922*ef5ccd6cSJohn Marino
1923*ef5ccd6cSJohn Marino case 9:
1924*ef5ccd6cSJohn Marino
1925*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1926*ef5ccd6cSJohn Marino #line 260 "ada-exp.y"
1927*ef5ccd6cSJohn Marino {
1928*ef5ccd6cSJohn Marino if ((yyvsp[(1) - (4)].tval) != NULL)
1929*ef5ccd6cSJohn Marino {
1930*ef5ccd6cSJohn Marino if ((yyvsp[(3) - (4)].lval) != 1)
1931*ef5ccd6cSJohn Marino error (_("Invalid conversion"));
1932*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_CAST);
1933*ef5ccd6cSJohn Marino write_exp_elt_type ((yyvsp[(1) - (4)].tval));
1934*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_CAST);
1935*ef5ccd6cSJohn Marino }
1936*ef5ccd6cSJohn Marino else
1937*ef5ccd6cSJohn Marino {
1938*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_FUNCALL);
1939*ef5ccd6cSJohn Marino write_exp_elt_longcst ((yyvsp[(3) - (4)].lval));
1940*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_FUNCALL);
1941*ef5ccd6cSJohn Marino }
1942*ef5ccd6cSJohn Marino }
1943*ef5ccd6cSJohn Marino break;
1944*ef5ccd6cSJohn Marino
1945*ef5ccd6cSJohn Marino case 10:
1946*ef5ccd6cSJohn Marino
1947*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1948*ef5ccd6cSJohn Marino #line 278 "ada-exp.y"
1949*ef5ccd6cSJohn Marino { type_qualifier = (yyvsp[(1) - (3)].tval); }
1950*ef5ccd6cSJohn Marino break;
1951*ef5ccd6cSJohn Marino
1952*ef5ccd6cSJohn Marino case 11:
1953*ef5ccd6cSJohn Marino
1954*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1955*ef5ccd6cSJohn Marino #line 280 "ada-exp.y"
1956*ef5ccd6cSJohn Marino {
1957*ef5ccd6cSJohn Marino if ((yyvsp[(1) - (7)].tval) == NULL)
1958*ef5ccd6cSJohn Marino error (_("Type required for qualification"));
1959*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_QUAL);
1960*ef5ccd6cSJohn Marino write_exp_elt_type ((yyvsp[(1) - (7)].tval));
1961*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_QUAL);
1962*ef5ccd6cSJohn Marino type_qualifier = (yyvsp[(3) - (7)].tval);
1963*ef5ccd6cSJohn Marino }
1964*ef5ccd6cSJohn Marino break;
1965*ef5ccd6cSJohn Marino
1966*ef5ccd6cSJohn Marino case 12:
1967*ef5ccd6cSJohn Marino
1968*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1969*ef5ccd6cSJohn Marino #line 290 "ada-exp.y"
1970*ef5ccd6cSJohn Marino { (yyval.tval) = type_qualifier; }
1971*ef5ccd6cSJohn Marino break;
1972*ef5ccd6cSJohn Marino
1973*ef5ccd6cSJohn Marino case 13:
1974*ef5ccd6cSJohn Marino
1975*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1976*ef5ccd6cSJohn Marino #line 295 "ada-exp.y"
1977*ef5ccd6cSJohn Marino { write_exp_elt_opcode (TERNOP_SLICE); }
1978*ef5ccd6cSJohn Marino break;
1979*ef5ccd6cSJohn Marino
1980*ef5ccd6cSJohn Marino case 14:
1981*ef5ccd6cSJohn Marino
1982*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1983*ef5ccd6cSJohn Marino #line 297 "ada-exp.y"
1984*ef5ccd6cSJohn Marino { if ((yyvsp[(1) - (6)].tval) == NULL)
1985*ef5ccd6cSJohn Marino write_exp_elt_opcode (TERNOP_SLICE);
1986*ef5ccd6cSJohn Marino else
1987*ef5ccd6cSJohn Marino error (_("Cannot slice a type"));
1988*ef5ccd6cSJohn Marino }
1989*ef5ccd6cSJohn Marino break;
1990*ef5ccd6cSJohn Marino
1991*ef5ccd6cSJohn Marino case 15:
1992*ef5ccd6cSJohn Marino
1993*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
1994*ef5ccd6cSJohn Marino #line 304 "ada-exp.y"
1995*ef5ccd6cSJohn Marino { }
1996*ef5ccd6cSJohn Marino break;
1997*ef5ccd6cSJohn Marino
1998*ef5ccd6cSJohn Marino case 16:
1999*ef5ccd6cSJohn Marino
2000*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2001*ef5ccd6cSJohn Marino #line 316 "ada-exp.y"
2002*ef5ccd6cSJohn Marino { if ((yyvsp[(1) - (1)].tval) != NULL)
2003*ef5ccd6cSJohn Marino {
2004*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_TYPE);
2005*ef5ccd6cSJohn Marino write_exp_elt_type ((yyvsp[(1) - (1)].tval));
2006*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_TYPE);
2007*ef5ccd6cSJohn Marino }
2008*ef5ccd6cSJohn Marino }
2009*ef5ccd6cSJohn Marino break;
2010*ef5ccd6cSJohn Marino
2011*ef5ccd6cSJohn Marino case 17:
2012*ef5ccd6cSJohn Marino
2013*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2014*ef5ccd6cSJohn Marino #line 326 "ada-exp.y"
2015*ef5ccd6cSJohn Marino { write_dollar_variable ((yyvsp[(1) - (1)].sval)); }
2016*ef5ccd6cSJohn Marino break;
2017*ef5ccd6cSJohn Marino
2018*ef5ccd6cSJohn Marino case 20:
2019*ef5ccd6cSJohn Marino
2020*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2021*ef5ccd6cSJohn Marino #line 336 "ada-exp.y"
2022*ef5ccd6cSJohn Marino { write_exp_elt_opcode (UNOP_NEG); }
2023*ef5ccd6cSJohn Marino break;
2024*ef5ccd6cSJohn Marino
2025*ef5ccd6cSJohn Marino case 21:
2026*ef5ccd6cSJohn Marino
2027*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2028*ef5ccd6cSJohn Marino #line 340 "ada-exp.y"
2029*ef5ccd6cSJohn Marino { write_exp_elt_opcode (UNOP_PLUS); }
2030*ef5ccd6cSJohn Marino break;
2031*ef5ccd6cSJohn Marino
2032*ef5ccd6cSJohn Marino case 22:
2033*ef5ccd6cSJohn Marino
2034*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2035*ef5ccd6cSJohn Marino #line 344 "ada-exp.y"
2036*ef5ccd6cSJohn Marino { write_exp_elt_opcode (UNOP_LOGICAL_NOT); }
2037*ef5ccd6cSJohn Marino break;
2038*ef5ccd6cSJohn Marino
2039*ef5ccd6cSJohn Marino case 23:
2040*ef5ccd6cSJohn Marino
2041*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2042*ef5ccd6cSJohn Marino #line 348 "ada-exp.y"
2043*ef5ccd6cSJohn Marino { write_exp_elt_opcode (UNOP_ABS); }
2044*ef5ccd6cSJohn Marino break;
2045*ef5ccd6cSJohn Marino
2046*ef5ccd6cSJohn Marino case 24:
2047*ef5ccd6cSJohn Marino
2048*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2049*ef5ccd6cSJohn Marino #line 351 "ada-exp.y"
2050*ef5ccd6cSJohn Marino { (yyval.lval) = 0; }
2051*ef5ccd6cSJohn Marino break;
2052*ef5ccd6cSJohn Marino
2053*ef5ccd6cSJohn Marino case 25:
2054*ef5ccd6cSJohn Marino
2055*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2056*ef5ccd6cSJohn Marino #line 355 "ada-exp.y"
2057*ef5ccd6cSJohn Marino { (yyval.lval) = 1; }
2058*ef5ccd6cSJohn Marino break;
2059*ef5ccd6cSJohn Marino
2060*ef5ccd6cSJohn Marino case 26:
2061*ef5ccd6cSJohn Marino
2062*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2063*ef5ccd6cSJohn Marino #line 357 "ada-exp.y"
2064*ef5ccd6cSJohn Marino { (yyval.lval) = 1; }
2065*ef5ccd6cSJohn Marino break;
2066*ef5ccd6cSJohn Marino
2067*ef5ccd6cSJohn Marino case 27:
2068*ef5ccd6cSJohn Marino
2069*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2070*ef5ccd6cSJohn Marino #line 359 "ada-exp.y"
2071*ef5ccd6cSJohn Marino { (yyval.lval) = (yyvsp[(1) - (3)].lval) + 1; }
2072*ef5ccd6cSJohn Marino break;
2073*ef5ccd6cSJohn Marino
2074*ef5ccd6cSJohn Marino case 28:
2075*ef5ccd6cSJohn Marino
2076*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2077*ef5ccd6cSJohn Marino #line 361 "ada-exp.y"
2078*ef5ccd6cSJohn Marino { (yyval.lval) = (yyvsp[(1) - (5)].lval) + 1; }
2079*ef5ccd6cSJohn Marino break;
2080*ef5ccd6cSJohn Marino
2081*ef5ccd6cSJohn Marino case 29:
2082*ef5ccd6cSJohn Marino
2083*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2084*ef5ccd6cSJohn Marino #line 366 "ada-exp.y"
2085*ef5ccd6cSJohn Marino {
2086*ef5ccd6cSJohn Marino if ((yyvsp[(2) - (4)].tval) == NULL)
2087*ef5ccd6cSJohn Marino error (_("Type required within braces in coercion"));
2088*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_MEMVAL);
2089*ef5ccd6cSJohn Marino write_exp_elt_type ((yyvsp[(2) - (4)].tval));
2090*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_MEMVAL);
2091*ef5ccd6cSJohn Marino }
2092*ef5ccd6cSJohn Marino break;
2093*ef5ccd6cSJohn Marino
2094*ef5ccd6cSJohn Marino case 30:
2095*ef5ccd6cSJohn Marino
2096*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2097*ef5ccd6cSJohn Marino #line 378 "ada-exp.y"
2098*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_EXP); }
2099*ef5ccd6cSJohn Marino break;
2100*ef5ccd6cSJohn Marino
2101*ef5ccd6cSJohn Marino case 31:
2102*ef5ccd6cSJohn Marino
2103*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2104*ef5ccd6cSJohn Marino #line 382 "ada-exp.y"
2105*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_MUL); }
2106*ef5ccd6cSJohn Marino break;
2107*ef5ccd6cSJohn Marino
2108*ef5ccd6cSJohn Marino case 32:
2109*ef5ccd6cSJohn Marino
2110*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2111*ef5ccd6cSJohn Marino #line 386 "ada-exp.y"
2112*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_DIV); }
2113*ef5ccd6cSJohn Marino break;
2114*ef5ccd6cSJohn Marino
2115*ef5ccd6cSJohn Marino case 33:
2116*ef5ccd6cSJohn Marino
2117*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2118*ef5ccd6cSJohn Marino #line 390 "ada-exp.y"
2119*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_REM); }
2120*ef5ccd6cSJohn Marino break;
2121*ef5ccd6cSJohn Marino
2122*ef5ccd6cSJohn Marino case 34:
2123*ef5ccd6cSJohn Marino
2124*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2125*ef5ccd6cSJohn Marino #line 394 "ada-exp.y"
2126*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_MOD); }
2127*ef5ccd6cSJohn Marino break;
2128*ef5ccd6cSJohn Marino
2129*ef5ccd6cSJohn Marino case 35:
2130*ef5ccd6cSJohn Marino
2131*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2132*ef5ccd6cSJohn Marino #line 398 "ada-exp.y"
2133*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_REPEAT); }
2134*ef5ccd6cSJohn Marino break;
2135*ef5ccd6cSJohn Marino
2136*ef5ccd6cSJohn Marino case 36:
2137*ef5ccd6cSJohn Marino
2138*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2139*ef5ccd6cSJohn Marino #line 402 "ada-exp.y"
2140*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_ADD); }
2141*ef5ccd6cSJohn Marino break;
2142*ef5ccd6cSJohn Marino
2143*ef5ccd6cSJohn Marino case 37:
2144*ef5ccd6cSJohn Marino
2145*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2146*ef5ccd6cSJohn Marino #line 406 "ada-exp.y"
2147*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_CONCAT); }
2148*ef5ccd6cSJohn Marino break;
2149*ef5ccd6cSJohn Marino
2150*ef5ccd6cSJohn Marino case 38:
2151*ef5ccd6cSJohn Marino
2152*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2153*ef5ccd6cSJohn Marino #line 410 "ada-exp.y"
2154*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_SUB); }
2155*ef5ccd6cSJohn Marino break;
2156*ef5ccd6cSJohn Marino
2157*ef5ccd6cSJohn Marino case 40:
2158*ef5ccd6cSJohn Marino
2159*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2160*ef5ccd6cSJohn Marino #line 417 "ada-exp.y"
2161*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_EQUAL); }
2162*ef5ccd6cSJohn Marino break;
2163*ef5ccd6cSJohn Marino
2164*ef5ccd6cSJohn Marino case 41:
2165*ef5ccd6cSJohn Marino
2166*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2167*ef5ccd6cSJohn Marino #line 421 "ada-exp.y"
2168*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_NOTEQUAL); }
2169*ef5ccd6cSJohn Marino break;
2170*ef5ccd6cSJohn Marino
2171*ef5ccd6cSJohn Marino case 42:
2172*ef5ccd6cSJohn Marino
2173*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2174*ef5ccd6cSJohn Marino #line 425 "ada-exp.y"
2175*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_LEQ); }
2176*ef5ccd6cSJohn Marino break;
2177*ef5ccd6cSJohn Marino
2178*ef5ccd6cSJohn Marino case 43:
2179*ef5ccd6cSJohn Marino
2180*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2181*ef5ccd6cSJohn Marino #line 429 "ada-exp.y"
2182*ef5ccd6cSJohn Marino { write_exp_elt_opcode (TERNOP_IN_RANGE); }
2183*ef5ccd6cSJohn Marino break;
2184*ef5ccd6cSJohn Marino
2185*ef5ccd6cSJohn Marino case 44:
2186*ef5ccd6cSJohn Marino
2187*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2188*ef5ccd6cSJohn Marino #line 431 "ada-exp.y"
2189*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_IN_BOUNDS);
2190*ef5ccd6cSJohn Marino write_exp_elt_longcst ((LONGEST) (yyvsp[(5) - (5)].lval));
2191*ef5ccd6cSJohn Marino write_exp_elt_opcode (BINOP_IN_BOUNDS);
2192*ef5ccd6cSJohn Marino }
2193*ef5ccd6cSJohn Marino break;
2194*ef5ccd6cSJohn Marino
2195*ef5ccd6cSJohn Marino case 45:
2196*ef5ccd6cSJohn Marino
2197*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2198*ef5ccd6cSJohn Marino #line 436 "ada-exp.y"
2199*ef5ccd6cSJohn Marino {
2200*ef5ccd6cSJohn Marino if ((yyvsp[(3) - (3)].tval) == NULL)
2201*ef5ccd6cSJohn Marino error (_("Right operand of 'in' must be type"));
2202*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_IN_RANGE);
2203*ef5ccd6cSJohn Marino write_exp_elt_type ((yyvsp[(3) - (3)].tval));
2204*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_IN_RANGE);
2205*ef5ccd6cSJohn Marino }
2206*ef5ccd6cSJohn Marino break;
2207*ef5ccd6cSJohn Marino
2208*ef5ccd6cSJohn Marino case 46:
2209*ef5ccd6cSJohn Marino
2210*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2211*ef5ccd6cSJohn Marino #line 444 "ada-exp.y"
2212*ef5ccd6cSJohn Marino { write_exp_elt_opcode (TERNOP_IN_RANGE);
2213*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_LOGICAL_NOT);
2214*ef5ccd6cSJohn Marino }
2215*ef5ccd6cSJohn Marino break;
2216*ef5ccd6cSJohn Marino
2217*ef5ccd6cSJohn Marino case 47:
2218*ef5ccd6cSJohn Marino
2219*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2220*ef5ccd6cSJohn Marino #line 448 "ada-exp.y"
2221*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_IN_BOUNDS);
2222*ef5ccd6cSJohn Marino write_exp_elt_longcst ((LONGEST) (yyvsp[(6) - (6)].lval));
2223*ef5ccd6cSJohn Marino write_exp_elt_opcode (BINOP_IN_BOUNDS);
2224*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_LOGICAL_NOT);
2225*ef5ccd6cSJohn Marino }
2226*ef5ccd6cSJohn Marino break;
2227*ef5ccd6cSJohn Marino
2228*ef5ccd6cSJohn Marino case 48:
2229*ef5ccd6cSJohn Marino
2230*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2231*ef5ccd6cSJohn Marino #line 454 "ada-exp.y"
2232*ef5ccd6cSJohn Marino {
2233*ef5ccd6cSJohn Marino if ((yyvsp[(4) - (4)].tval) == NULL)
2234*ef5ccd6cSJohn Marino error (_("Right operand of 'in' must be type"));
2235*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_IN_RANGE);
2236*ef5ccd6cSJohn Marino write_exp_elt_type ((yyvsp[(4) - (4)].tval));
2237*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_IN_RANGE);
2238*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_LOGICAL_NOT);
2239*ef5ccd6cSJohn Marino }
2240*ef5ccd6cSJohn Marino break;
2241*ef5ccd6cSJohn Marino
2242*ef5ccd6cSJohn Marino case 49:
2243*ef5ccd6cSJohn Marino
2244*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2245*ef5ccd6cSJohn Marino #line 465 "ada-exp.y"
2246*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_GEQ); }
2247*ef5ccd6cSJohn Marino break;
2248*ef5ccd6cSJohn Marino
2249*ef5ccd6cSJohn Marino case 50:
2250*ef5ccd6cSJohn Marino
2251*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2252*ef5ccd6cSJohn Marino #line 469 "ada-exp.y"
2253*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_LESS); }
2254*ef5ccd6cSJohn Marino break;
2255*ef5ccd6cSJohn Marino
2256*ef5ccd6cSJohn Marino case 51:
2257*ef5ccd6cSJohn Marino
2258*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2259*ef5ccd6cSJohn Marino #line 473 "ada-exp.y"
2260*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_GTR); }
2261*ef5ccd6cSJohn Marino break;
2262*ef5ccd6cSJohn Marino
2263*ef5ccd6cSJohn Marino case 58:
2264*ef5ccd6cSJohn Marino
2265*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2266*ef5ccd6cSJohn Marino #line 486 "ada-exp.y"
2267*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_BITWISE_AND); }
2268*ef5ccd6cSJohn Marino break;
2269*ef5ccd6cSJohn Marino
2270*ef5ccd6cSJohn Marino case 59:
2271*ef5ccd6cSJohn Marino
2272*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2273*ef5ccd6cSJohn Marino #line 488 "ada-exp.y"
2274*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_BITWISE_AND); }
2275*ef5ccd6cSJohn Marino break;
2276*ef5ccd6cSJohn Marino
2277*ef5ccd6cSJohn Marino case 60:
2278*ef5ccd6cSJohn Marino
2279*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2280*ef5ccd6cSJohn Marino #line 493 "ada-exp.y"
2281*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_LOGICAL_AND); }
2282*ef5ccd6cSJohn Marino break;
2283*ef5ccd6cSJohn Marino
2284*ef5ccd6cSJohn Marino case 61:
2285*ef5ccd6cSJohn Marino
2286*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2287*ef5ccd6cSJohn Marino #line 495 "ada-exp.y"
2288*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_LOGICAL_AND); }
2289*ef5ccd6cSJohn Marino break;
2290*ef5ccd6cSJohn Marino
2291*ef5ccd6cSJohn Marino case 62:
2292*ef5ccd6cSJohn Marino
2293*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2294*ef5ccd6cSJohn Marino #line 500 "ada-exp.y"
2295*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_BITWISE_IOR); }
2296*ef5ccd6cSJohn Marino break;
2297*ef5ccd6cSJohn Marino
2298*ef5ccd6cSJohn Marino case 63:
2299*ef5ccd6cSJohn Marino
2300*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2301*ef5ccd6cSJohn Marino #line 502 "ada-exp.y"
2302*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_BITWISE_IOR); }
2303*ef5ccd6cSJohn Marino break;
2304*ef5ccd6cSJohn Marino
2305*ef5ccd6cSJohn Marino case 64:
2306*ef5ccd6cSJohn Marino
2307*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2308*ef5ccd6cSJohn Marino #line 507 "ada-exp.y"
2309*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_LOGICAL_OR); }
2310*ef5ccd6cSJohn Marino break;
2311*ef5ccd6cSJohn Marino
2312*ef5ccd6cSJohn Marino case 65:
2313*ef5ccd6cSJohn Marino
2314*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2315*ef5ccd6cSJohn Marino #line 509 "ada-exp.y"
2316*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_LOGICAL_OR); }
2317*ef5ccd6cSJohn Marino break;
2318*ef5ccd6cSJohn Marino
2319*ef5ccd6cSJohn Marino case 66:
2320*ef5ccd6cSJohn Marino
2321*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2322*ef5ccd6cSJohn Marino #line 513 "ada-exp.y"
2323*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_BITWISE_XOR); }
2324*ef5ccd6cSJohn Marino break;
2325*ef5ccd6cSJohn Marino
2326*ef5ccd6cSJohn Marino case 67:
2327*ef5ccd6cSJohn Marino
2328*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2329*ef5ccd6cSJohn Marino #line 515 "ada-exp.y"
2330*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_BITWISE_XOR); }
2331*ef5ccd6cSJohn Marino break;
2332*ef5ccd6cSJohn Marino
2333*ef5ccd6cSJohn Marino case 68:
2334*ef5ccd6cSJohn Marino
2335*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2336*ef5ccd6cSJohn Marino #line 527 "ada-exp.y"
2337*ef5ccd6cSJohn Marino { write_exp_elt_opcode (UNOP_ADDR); }
2338*ef5ccd6cSJohn Marino break;
2339*ef5ccd6cSJohn Marino
2340*ef5ccd6cSJohn Marino case 69:
2341*ef5ccd6cSJohn Marino
2342*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2343*ef5ccd6cSJohn Marino #line 529 "ada-exp.y"
2344*ef5ccd6cSJohn Marino { write_exp_elt_opcode (UNOP_ADDR);
2345*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_CAST);
2346*ef5ccd6cSJohn Marino write_exp_elt_type (type_system_address ());
2347*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_CAST);
2348*ef5ccd6cSJohn Marino }
2349*ef5ccd6cSJohn Marino break;
2350*ef5ccd6cSJohn Marino
2351*ef5ccd6cSJohn Marino case 70:
2352*ef5ccd6cSJohn Marino
2353*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2354*ef5ccd6cSJohn Marino #line 535 "ada-exp.y"
2355*ef5ccd6cSJohn Marino { write_int ((yyvsp[(3) - (3)].lval), type_int ());
2356*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_ATR_FIRST); }
2357*ef5ccd6cSJohn Marino break;
2358*ef5ccd6cSJohn Marino
2359*ef5ccd6cSJohn Marino case 71:
2360*ef5ccd6cSJohn Marino
2361*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2362*ef5ccd6cSJohn Marino #line 538 "ada-exp.y"
2363*ef5ccd6cSJohn Marino { write_int ((yyvsp[(3) - (3)].lval), type_int ());
2364*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_ATR_LAST); }
2365*ef5ccd6cSJohn Marino break;
2366*ef5ccd6cSJohn Marino
2367*ef5ccd6cSJohn Marino case 72:
2368*ef5ccd6cSJohn Marino
2369*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2370*ef5ccd6cSJohn Marino #line 541 "ada-exp.y"
2371*ef5ccd6cSJohn Marino { write_int ((yyvsp[(3) - (3)].lval), type_int ());
2372*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_ATR_LENGTH); }
2373*ef5ccd6cSJohn Marino break;
2374*ef5ccd6cSJohn Marino
2375*ef5ccd6cSJohn Marino case 73:
2376*ef5ccd6cSJohn Marino
2377*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2378*ef5ccd6cSJohn Marino #line 544 "ada-exp.y"
2379*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_ATR_SIZE); }
2380*ef5ccd6cSJohn Marino break;
2381*ef5ccd6cSJohn Marino
2382*ef5ccd6cSJohn Marino case 74:
2383*ef5ccd6cSJohn Marino
2384*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2385*ef5ccd6cSJohn Marino #line 546 "ada-exp.y"
2386*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_ATR_TAG); }
2387*ef5ccd6cSJohn Marino break;
2388*ef5ccd6cSJohn Marino
2389*ef5ccd6cSJohn Marino case 75:
2390*ef5ccd6cSJohn Marino
2391*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2392*ef5ccd6cSJohn Marino #line 548 "ada-exp.y"
2393*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_ATR_MIN); }
2394*ef5ccd6cSJohn Marino break;
2395*ef5ccd6cSJohn Marino
2396*ef5ccd6cSJohn Marino case 76:
2397*ef5ccd6cSJohn Marino
2398*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2399*ef5ccd6cSJohn Marino #line 550 "ada-exp.y"
2400*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_ATR_MAX); }
2401*ef5ccd6cSJohn Marino break;
2402*ef5ccd6cSJohn Marino
2403*ef5ccd6cSJohn Marino case 77:
2404*ef5ccd6cSJohn Marino
2405*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2406*ef5ccd6cSJohn Marino #line 552 "ada-exp.y"
2407*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_ATR_POS); }
2408*ef5ccd6cSJohn Marino break;
2409*ef5ccd6cSJohn Marino
2410*ef5ccd6cSJohn Marino case 78:
2411*ef5ccd6cSJohn Marino
2412*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2413*ef5ccd6cSJohn Marino #line 554 "ada-exp.y"
2414*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_ATR_VAL); }
2415*ef5ccd6cSJohn Marino break;
2416*ef5ccd6cSJohn Marino
2417*ef5ccd6cSJohn Marino case 79:
2418*ef5ccd6cSJohn Marino
2419*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2420*ef5ccd6cSJohn Marino #line 556 "ada-exp.y"
2421*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_ATR_MODULUS); }
2422*ef5ccd6cSJohn Marino break;
2423*ef5ccd6cSJohn Marino
2424*ef5ccd6cSJohn Marino case 80:
2425*ef5ccd6cSJohn Marino
2426*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2427*ef5ccd6cSJohn Marino #line 560 "ada-exp.y"
2428*ef5ccd6cSJohn Marino { (yyval.lval) = 1; }
2429*ef5ccd6cSJohn Marino break;
2430*ef5ccd6cSJohn Marino
2431*ef5ccd6cSJohn Marino case 81:
2432*ef5ccd6cSJohn Marino
2433*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2434*ef5ccd6cSJohn Marino #line 562 "ada-exp.y"
2435*ef5ccd6cSJohn Marino { (yyval.lval) = (yyvsp[(2) - (3)].typed_val).val; }
2436*ef5ccd6cSJohn Marino break;
2437*ef5ccd6cSJohn Marino
2438*ef5ccd6cSJohn Marino case 82:
2439*ef5ccd6cSJohn Marino
2440*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2441*ef5ccd6cSJohn Marino #line 567 "ada-exp.y"
2442*ef5ccd6cSJohn Marino {
2443*ef5ccd6cSJohn Marino if ((yyvsp[(1) - (1)].tval) == NULL)
2444*ef5ccd6cSJohn Marino error (_("Prefix must be type"));
2445*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_TYPE);
2446*ef5ccd6cSJohn Marino write_exp_elt_type ((yyvsp[(1) - (1)].tval));
2447*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_TYPE); }
2448*ef5ccd6cSJohn Marino break;
2449*ef5ccd6cSJohn Marino
2450*ef5ccd6cSJohn Marino case 84:
2451*ef5ccd6cSJohn Marino
2452*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2453*ef5ccd6cSJohn Marino #line 578 "ada-exp.y"
2454*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_TYPE);
2455*ef5ccd6cSJohn Marino write_exp_elt_type (parse_type->builtin_void);
2456*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_TYPE); }
2457*ef5ccd6cSJohn Marino break;
2458*ef5ccd6cSJohn Marino
2459*ef5ccd6cSJohn Marino case 85:
2460*ef5ccd6cSJohn Marino
2461*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2462*ef5ccd6cSJohn Marino #line 585 "ada-exp.y"
2463*ef5ccd6cSJohn Marino { write_int ((LONGEST) (yyvsp[(1) - (1)].typed_val).val, (yyvsp[(1) - (1)].typed_val).type); }
2464*ef5ccd6cSJohn Marino break;
2465*ef5ccd6cSJohn Marino
2466*ef5ccd6cSJohn Marino case 86:
2467*ef5ccd6cSJohn Marino
2468*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2469*ef5ccd6cSJohn Marino #line 589 "ada-exp.y"
2470*ef5ccd6cSJohn Marino { write_int (convert_char_literal (type_qualifier, (yyvsp[(1) - (1)].typed_val).val),
2471*ef5ccd6cSJohn Marino (type_qualifier == NULL)
2472*ef5ccd6cSJohn Marino ? (yyvsp[(1) - (1)].typed_val).type : type_qualifier);
2473*ef5ccd6cSJohn Marino }
2474*ef5ccd6cSJohn Marino break;
2475*ef5ccd6cSJohn Marino
2476*ef5ccd6cSJohn Marino case 87:
2477*ef5ccd6cSJohn Marino
2478*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2479*ef5ccd6cSJohn Marino #line 596 "ada-exp.y"
2480*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_DOUBLE);
2481*ef5ccd6cSJohn Marino write_exp_elt_type ((yyvsp[(1) - (1)].typed_val_float).type);
2482*ef5ccd6cSJohn Marino write_exp_elt_dblcst ((yyvsp[(1) - (1)].typed_val_float).dval);
2483*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_DOUBLE);
2484*ef5ccd6cSJohn Marino }
2485*ef5ccd6cSJohn Marino break;
2486*ef5ccd6cSJohn Marino
2487*ef5ccd6cSJohn Marino case 88:
2488*ef5ccd6cSJohn Marino
2489*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2490*ef5ccd6cSJohn Marino #line 604 "ada-exp.y"
2491*ef5ccd6cSJohn Marino { write_int (0, type_int ()); }
2492*ef5ccd6cSJohn Marino break;
2493*ef5ccd6cSJohn Marino
2494*ef5ccd6cSJohn Marino case 89:
2495*ef5ccd6cSJohn Marino
2496*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2497*ef5ccd6cSJohn Marino #line 608 "ada-exp.y"
2498*ef5ccd6cSJohn Marino {
2499*ef5ccd6cSJohn Marino write_exp_op_with_string (OP_STRING, (yyvsp[(1) - (1)].sval));
2500*ef5ccd6cSJohn Marino }
2501*ef5ccd6cSJohn Marino break;
2502*ef5ccd6cSJohn Marino
2503*ef5ccd6cSJohn Marino case 90:
2504*ef5ccd6cSJohn Marino
2505*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2506*ef5ccd6cSJohn Marino #line 614 "ada-exp.y"
2507*ef5ccd6cSJohn Marino { write_int (1, type_boolean ()); }
2508*ef5ccd6cSJohn Marino break;
2509*ef5ccd6cSJohn Marino
2510*ef5ccd6cSJohn Marino case 91:
2511*ef5ccd6cSJohn Marino
2512*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2513*ef5ccd6cSJohn Marino #line 616 "ada-exp.y"
2514*ef5ccd6cSJohn Marino { write_int (0, type_boolean ()); }
2515*ef5ccd6cSJohn Marino break;
2516*ef5ccd6cSJohn Marino
2517*ef5ccd6cSJohn Marino case 92:
2518*ef5ccd6cSJohn Marino
2519*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2520*ef5ccd6cSJohn Marino #line 620 "ada-exp.y"
2521*ef5ccd6cSJohn Marino { error (_("NEW not implemented.")); }
2522*ef5ccd6cSJohn Marino break;
2523*ef5ccd6cSJohn Marino
2524*ef5ccd6cSJohn Marino case 93:
2525*ef5ccd6cSJohn Marino
2526*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2527*ef5ccd6cSJohn Marino #line 624 "ada-exp.y"
2528*ef5ccd6cSJohn Marino { (yyval.tval) = write_var_or_type (NULL, (yyvsp[(1) - (1)].sval)); }
2529*ef5ccd6cSJohn Marino break;
2530*ef5ccd6cSJohn Marino
2531*ef5ccd6cSJohn Marino case 94:
2532*ef5ccd6cSJohn Marino
2533*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2534*ef5ccd6cSJohn Marino #line 626 "ada-exp.y"
2535*ef5ccd6cSJohn Marino { (yyval.tval) = write_var_or_type ((yyvsp[(1) - (2)].bval), (yyvsp[(2) - (2)].sval)); }
2536*ef5ccd6cSJohn Marino break;
2537*ef5ccd6cSJohn Marino
2538*ef5ccd6cSJohn Marino case 95:
2539*ef5ccd6cSJohn Marino
2540*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2541*ef5ccd6cSJohn Marino #line 628 "ada-exp.y"
2542*ef5ccd6cSJohn Marino {
2543*ef5ccd6cSJohn Marino (yyval.tval) = write_var_or_type (NULL, (yyvsp[(1) - (2)].sval));
2544*ef5ccd6cSJohn Marino if ((yyval.tval) == NULL)
2545*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_ADDR);
2546*ef5ccd6cSJohn Marino else
2547*ef5ccd6cSJohn Marino (yyval.tval) = lookup_pointer_type ((yyval.tval));
2548*ef5ccd6cSJohn Marino }
2549*ef5ccd6cSJohn Marino break;
2550*ef5ccd6cSJohn Marino
2551*ef5ccd6cSJohn Marino case 96:
2552*ef5ccd6cSJohn Marino
2553*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2554*ef5ccd6cSJohn Marino #line 636 "ada-exp.y"
2555*ef5ccd6cSJohn Marino {
2556*ef5ccd6cSJohn Marino (yyval.tval) = write_var_or_type ((yyvsp[(1) - (3)].bval), (yyvsp[(2) - (3)].sval));
2557*ef5ccd6cSJohn Marino if ((yyval.tval) == NULL)
2558*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_ADDR);
2559*ef5ccd6cSJohn Marino else
2560*ef5ccd6cSJohn Marino (yyval.tval) = lookup_pointer_type ((yyval.tval));
2561*ef5ccd6cSJohn Marino }
2562*ef5ccd6cSJohn Marino break;
2563*ef5ccd6cSJohn Marino
2564*ef5ccd6cSJohn Marino case 97:
2565*ef5ccd6cSJohn Marino
2566*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2567*ef5ccd6cSJohn Marino #line 647 "ada-exp.y"
2568*ef5ccd6cSJohn Marino { (yyval.bval) = block_lookup (NULL, (yyvsp[(1) - (2)].sval).ptr); }
2569*ef5ccd6cSJohn Marino break;
2570*ef5ccd6cSJohn Marino
2571*ef5ccd6cSJohn Marino case 98:
2572*ef5ccd6cSJohn Marino
2573*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2574*ef5ccd6cSJohn Marino #line 649 "ada-exp.y"
2575*ef5ccd6cSJohn Marino { (yyval.bval) = block_lookup ((yyvsp[(1) - (3)].bval), (yyvsp[(2) - (3)].sval).ptr); }
2576*ef5ccd6cSJohn Marino break;
2577*ef5ccd6cSJohn Marino
2578*ef5ccd6cSJohn Marino case 99:
2579*ef5ccd6cSJohn Marino
2580*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2581*ef5ccd6cSJohn Marino #line 654 "ada-exp.y"
2582*ef5ccd6cSJohn Marino {
2583*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_AGGREGATE);
2584*ef5ccd6cSJohn Marino write_exp_elt_longcst ((yyvsp[(2) - (3)].lval));
2585*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_AGGREGATE);
2586*ef5ccd6cSJohn Marino }
2587*ef5ccd6cSJohn Marino break;
2588*ef5ccd6cSJohn Marino
2589*ef5ccd6cSJohn Marino case 100:
2590*ef5ccd6cSJohn Marino
2591*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2592*ef5ccd6cSJohn Marino #line 662 "ada-exp.y"
2593*ef5ccd6cSJohn Marino { (yyval.lval) = (yyvsp[(1) - (1)].lval); }
2594*ef5ccd6cSJohn Marino break;
2595*ef5ccd6cSJohn Marino
2596*ef5ccd6cSJohn Marino case 101:
2597*ef5ccd6cSJohn Marino
2598*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2599*ef5ccd6cSJohn Marino #line 664 "ada-exp.y"
2600*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_POSITIONAL);
2601*ef5ccd6cSJohn Marino write_exp_elt_longcst ((yyvsp[(1) - (2)].lval));
2602*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_POSITIONAL);
2603*ef5ccd6cSJohn Marino (yyval.lval) = (yyvsp[(1) - (2)].lval) + 1;
2604*ef5ccd6cSJohn Marino }
2605*ef5ccd6cSJohn Marino break;
2606*ef5ccd6cSJohn Marino
2607*ef5ccd6cSJohn Marino case 102:
2608*ef5ccd6cSJohn Marino
2609*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2610*ef5ccd6cSJohn Marino #line 670 "ada-exp.y"
2611*ef5ccd6cSJohn Marino { (yyval.lval) = (yyvsp[(1) - (2)].lval) + (yyvsp[(2) - (2)].lval); }
2612*ef5ccd6cSJohn Marino break;
2613*ef5ccd6cSJohn Marino
2614*ef5ccd6cSJohn Marino case 103:
2615*ef5ccd6cSJohn Marino
2616*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2617*ef5ccd6cSJohn Marino #line 675 "ada-exp.y"
2618*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_POSITIONAL);
2619*ef5ccd6cSJohn Marino write_exp_elt_longcst (0);
2620*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_POSITIONAL);
2621*ef5ccd6cSJohn Marino (yyval.lval) = 1;
2622*ef5ccd6cSJohn Marino }
2623*ef5ccd6cSJohn Marino break;
2624*ef5ccd6cSJohn Marino
2625*ef5ccd6cSJohn Marino case 104:
2626*ef5ccd6cSJohn Marino
2627*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2628*ef5ccd6cSJohn Marino #line 681 "ada-exp.y"
2629*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_POSITIONAL);
2630*ef5ccd6cSJohn Marino write_exp_elt_longcst ((yyvsp[(1) - (3)].lval));
2631*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_POSITIONAL);
2632*ef5ccd6cSJohn Marino (yyval.lval) = (yyvsp[(1) - (3)].lval) + 1;
2633*ef5ccd6cSJohn Marino }
2634*ef5ccd6cSJohn Marino break;
2635*ef5ccd6cSJohn Marino
2636*ef5ccd6cSJohn Marino case 105:
2637*ef5ccd6cSJohn Marino
2638*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2639*ef5ccd6cSJohn Marino #line 689 "ada-exp.y"
2640*ef5ccd6cSJohn Marino { (yyval.lval) = 1; }
2641*ef5ccd6cSJohn Marino break;
2642*ef5ccd6cSJohn Marino
2643*ef5ccd6cSJohn Marino case 106:
2644*ef5ccd6cSJohn Marino
2645*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2646*ef5ccd6cSJohn Marino #line 690 "ada-exp.y"
2647*ef5ccd6cSJohn Marino { (yyval.lval) = 1; }
2648*ef5ccd6cSJohn Marino break;
2649*ef5ccd6cSJohn Marino
2650*ef5ccd6cSJohn Marino case 107:
2651*ef5ccd6cSJohn Marino
2652*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2653*ef5ccd6cSJohn Marino #line 692 "ada-exp.y"
2654*ef5ccd6cSJohn Marino { (yyval.lval) = (yyvsp[(3) - (3)].lval) + 1; }
2655*ef5ccd6cSJohn Marino break;
2656*ef5ccd6cSJohn Marino
2657*ef5ccd6cSJohn Marino case 108:
2658*ef5ccd6cSJohn Marino
2659*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2660*ef5ccd6cSJohn Marino #line 696 "ada-exp.y"
2661*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_OTHERS); }
2662*ef5ccd6cSJohn Marino break;
2663*ef5ccd6cSJohn Marino
2664*ef5ccd6cSJohn Marino case 109:
2665*ef5ccd6cSJohn Marino
2666*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2667*ef5ccd6cSJohn Marino #line 701 "ada-exp.y"
2668*ef5ccd6cSJohn Marino {
2669*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_CHOICES);
2670*ef5ccd6cSJohn Marino write_exp_elt_longcst ((yyvsp[(1) - (1)].lval));
2671*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_CHOICES);
2672*ef5ccd6cSJohn Marino }
2673*ef5ccd6cSJohn Marino break;
2674*ef5ccd6cSJohn Marino
2675*ef5ccd6cSJohn Marino case 110:
2676*ef5ccd6cSJohn Marino
2677*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2678*ef5ccd6cSJohn Marino #line 715 "ada-exp.y"
2679*ef5ccd6cSJohn Marino { write_name_assoc ((yyvsp[(1) - (2)].sval)); }
2680*ef5ccd6cSJohn Marino break;
2681*ef5ccd6cSJohn Marino
2682*ef5ccd6cSJohn Marino case 111:
2683*ef5ccd6cSJohn Marino
2684*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2685*ef5ccd6cSJohn Marino #line 716 "ada-exp.y"
2686*ef5ccd6cSJohn Marino { (yyval.lval) = 1; }
2687*ef5ccd6cSJohn Marino break;
2688*ef5ccd6cSJohn Marino
2689*ef5ccd6cSJohn Marino case 112:
2690*ef5ccd6cSJohn Marino
2691*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2692*ef5ccd6cSJohn Marino #line 718 "ada-exp.y"
2693*ef5ccd6cSJohn Marino { (yyval.lval) = 1; }
2694*ef5ccd6cSJohn Marino break;
2695*ef5ccd6cSJohn Marino
2696*ef5ccd6cSJohn Marino case 113:
2697*ef5ccd6cSJohn Marino
2698*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2699*ef5ccd6cSJohn Marino #line 720 "ada-exp.y"
2700*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_DISCRETE_RANGE);
2701*ef5ccd6cSJohn Marino write_exp_op_with_string (OP_NAME, empty_stoken);
2702*ef5ccd6cSJohn Marino }
2703*ef5ccd6cSJohn Marino break;
2704*ef5ccd6cSJohn Marino
2705*ef5ccd6cSJohn Marino case 114:
2706*ef5ccd6cSJohn Marino
2707*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2708*ef5ccd6cSJohn Marino #line 723 "ada-exp.y"
2709*ef5ccd6cSJohn Marino { (yyval.lval) = 1; }
2710*ef5ccd6cSJohn Marino break;
2711*ef5ccd6cSJohn Marino
2712*ef5ccd6cSJohn Marino case 115:
2713*ef5ccd6cSJohn Marino
2714*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2715*ef5ccd6cSJohn Marino #line 725 "ada-exp.y"
2716*ef5ccd6cSJohn Marino { write_name_assoc ((yyvsp[(1) - (2)].sval)); }
2717*ef5ccd6cSJohn Marino break;
2718*ef5ccd6cSJohn Marino
2719*ef5ccd6cSJohn Marino case 116:
2720*ef5ccd6cSJohn Marino
2721*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2722*ef5ccd6cSJohn Marino #line 726 "ada-exp.y"
2723*ef5ccd6cSJohn Marino { (yyval.lval) = (yyvsp[(4) - (4)].lval) + 1; }
2724*ef5ccd6cSJohn Marino break;
2725*ef5ccd6cSJohn Marino
2726*ef5ccd6cSJohn Marino case 117:
2727*ef5ccd6cSJohn Marino
2728*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2729*ef5ccd6cSJohn Marino #line 728 "ada-exp.y"
2730*ef5ccd6cSJohn Marino { (yyval.lval) = (yyvsp[(3) - (3)].lval) + 1; }
2731*ef5ccd6cSJohn Marino break;
2732*ef5ccd6cSJohn Marino
2733*ef5ccd6cSJohn Marino case 118:
2734*ef5ccd6cSJohn Marino
2735*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2736*ef5ccd6cSJohn Marino #line 730 "ada-exp.y"
2737*ef5ccd6cSJohn Marino { write_exp_elt_opcode (OP_DISCRETE_RANGE); }
2738*ef5ccd6cSJohn Marino break;
2739*ef5ccd6cSJohn Marino
2740*ef5ccd6cSJohn Marino case 119:
2741*ef5ccd6cSJohn Marino
2742*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2743*ef5ccd6cSJohn Marino #line 731 "ada-exp.y"
2744*ef5ccd6cSJohn Marino { (yyval.lval) = (yyvsp[(6) - (6)].lval) + 1; }
2745*ef5ccd6cSJohn Marino break;
2746*ef5ccd6cSJohn Marino
2747*ef5ccd6cSJohn Marino case 120:
2748*ef5ccd6cSJohn Marino
2749*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2750*ef5ccd6cSJohn Marino #line 738 "ada-exp.y"
2751*ef5ccd6cSJohn Marino { write_exp_elt_opcode (UNOP_IND); }
2752*ef5ccd6cSJohn Marino break;
2753*ef5ccd6cSJohn Marino
2754*ef5ccd6cSJohn Marino case 121:
2755*ef5ccd6cSJohn Marino
2756*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2757*ef5ccd6cSJohn Marino #line 740 "ada-exp.y"
2758*ef5ccd6cSJohn Marino { write_exp_elt_opcode (UNOP_ADDR); }
2759*ef5ccd6cSJohn Marino break;
2760*ef5ccd6cSJohn Marino
2761*ef5ccd6cSJohn Marino case 122:
2762*ef5ccd6cSJohn Marino
2763*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2764*ef5ccd6cSJohn Marino #line 742 "ada-exp.y"
2765*ef5ccd6cSJohn Marino { write_exp_elt_opcode (BINOP_SUBSCRIPT); }
2766*ef5ccd6cSJohn Marino break;
2767*ef5ccd6cSJohn Marino
2768*ef5ccd6cSJohn Marino
2769*ef5ccd6cSJohn Marino
2770*ef5ccd6cSJohn Marino /* Line 1455 of yacc.c */
2771*ef5ccd6cSJohn Marino #line 2773 "ada-exp.c"
2772*ef5ccd6cSJohn Marino default: break;
2773*ef5ccd6cSJohn Marino }
2774*ef5ccd6cSJohn Marino YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2775*ef5ccd6cSJohn Marino
2776*ef5ccd6cSJohn Marino YYPOPSTACK (yylen);
2777*ef5ccd6cSJohn Marino yylen = 0;
2778*ef5ccd6cSJohn Marino YY_STACK_PRINT (yyss, yyssp);
2779*ef5ccd6cSJohn Marino
2780*ef5ccd6cSJohn Marino *++yyvsp = yyval;
2781*ef5ccd6cSJohn Marino
2782*ef5ccd6cSJohn Marino /* Now `shift' the result of the reduction. Determine what state
2783*ef5ccd6cSJohn Marino that goes to, based on the state we popped back to and the rule
2784*ef5ccd6cSJohn Marino number reduced by. */
2785*ef5ccd6cSJohn Marino
2786*ef5ccd6cSJohn Marino yyn = yyr1[yyn];
2787*ef5ccd6cSJohn Marino
2788*ef5ccd6cSJohn Marino yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2789*ef5ccd6cSJohn Marino if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2790*ef5ccd6cSJohn Marino yystate = yytable[yystate];
2791*ef5ccd6cSJohn Marino else
2792*ef5ccd6cSJohn Marino yystate = yydefgoto[yyn - YYNTOKENS];
2793*ef5ccd6cSJohn Marino
2794*ef5ccd6cSJohn Marino goto yynewstate;
2795*ef5ccd6cSJohn Marino
2796*ef5ccd6cSJohn Marino
2797*ef5ccd6cSJohn Marino /*------------------------------------.
2798*ef5ccd6cSJohn Marino | yyerrlab -- here on detecting error |
2799*ef5ccd6cSJohn Marino `------------------------------------*/
2800*ef5ccd6cSJohn Marino yyerrlab:
2801*ef5ccd6cSJohn Marino /* If not already recovering from an error, report this error. */
2802*ef5ccd6cSJohn Marino if (!yyerrstatus)
2803*ef5ccd6cSJohn Marino {
2804*ef5ccd6cSJohn Marino ++yynerrs;
2805*ef5ccd6cSJohn Marino #if ! YYERROR_VERBOSE
2806*ef5ccd6cSJohn Marino yyerror (YY_("syntax error"));
2807*ef5ccd6cSJohn Marino #else
2808*ef5ccd6cSJohn Marino {
2809*ef5ccd6cSJohn Marino YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2810*ef5ccd6cSJohn Marino if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2811*ef5ccd6cSJohn Marino {
2812*ef5ccd6cSJohn Marino YYSIZE_T yyalloc = 2 * yysize;
2813*ef5ccd6cSJohn Marino if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2814*ef5ccd6cSJohn Marino yyalloc = YYSTACK_ALLOC_MAXIMUM;
2815*ef5ccd6cSJohn Marino if (yymsg != yymsgbuf)
2816*ef5ccd6cSJohn Marino YYSTACK_FREE (yymsg);
2817*ef5ccd6cSJohn Marino yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2818*ef5ccd6cSJohn Marino if (yymsg)
2819*ef5ccd6cSJohn Marino yymsg_alloc = yyalloc;
2820*ef5ccd6cSJohn Marino else
2821*ef5ccd6cSJohn Marino {
2822*ef5ccd6cSJohn Marino yymsg = yymsgbuf;
2823*ef5ccd6cSJohn Marino yymsg_alloc = sizeof yymsgbuf;
2824*ef5ccd6cSJohn Marino }
2825*ef5ccd6cSJohn Marino }
2826*ef5ccd6cSJohn Marino
2827*ef5ccd6cSJohn Marino if (0 < yysize && yysize <= yymsg_alloc)
2828*ef5ccd6cSJohn Marino {
2829*ef5ccd6cSJohn Marino (void) yysyntax_error (yymsg, yystate, yychar);
2830*ef5ccd6cSJohn Marino yyerror (yymsg);
2831*ef5ccd6cSJohn Marino }
2832*ef5ccd6cSJohn Marino else
2833*ef5ccd6cSJohn Marino {
2834*ef5ccd6cSJohn Marino yyerror (YY_("syntax error"));
2835*ef5ccd6cSJohn Marino if (yysize != 0)
2836*ef5ccd6cSJohn Marino goto yyexhaustedlab;
2837*ef5ccd6cSJohn Marino }
2838*ef5ccd6cSJohn Marino }
2839*ef5ccd6cSJohn Marino #endif
2840*ef5ccd6cSJohn Marino }
2841*ef5ccd6cSJohn Marino
2842*ef5ccd6cSJohn Marino
2843*ef5ccd6cSJohn Marino
2844*ef5ccd6cSJohn Marino if (yyerrstatus == 3)
2845*ef5ccd6cSJohn Marino {
2846*ef5ccd6cSJohn Marino /* If just tried and failed to reuse lookahead token after an
2847*ef5ccd6cSJohn Marino error, discard it. */
2848*ef5ccd6cSJohn Marino
2849*ef5ccd6cSJohn Marino if (yychar <= YYEOF)
2850*ef5ccd6cSJohn Marino {
2851*ef5ccd6cSJohn Marino /* Return failure if at end of input. */
2852*ef5ccd6cSJohn Marino if (yychar == YYEOF)
2853*ef5ccd6cSJohn Marino YYABORT;
2854*ef5ccd6cSJohn Marino }
2855*ef5ccd6cSJohn Marino else
2856*ef5ccd6cSJohn Marino {
2857*ef5ccd6cSJohn Marino yydestruct ("Error: discarding",
2858*ef5ccd6cSJohn Marino yytoken, &yylval);
2859*ef5ccd6cSJohn Marino yychar = YYEMPTY;
2860*ef5ccd6cSJohn Marino }
2861*ef5ccd6cSJohn Marino }
2862*ef5ccd6cSJohn Marino
2863*ef5ccd6cSJohn Marino /* Else will try to reuse lookahead token after shifting the error
2864*ef5ccd6cSJohn Marino token. */
2865*ef5ccd6cSJohn Marino goto yyerrlab1;
2866*ef5ccd6cSJohn Marino
2867*ef5ccd6cSJohn Marino
2868*ef5ccd6cSJohn Marino /*---------------------------------------------------.
2869*ef5ccd6cSJohn Marino | yyerrorlab -- error raised explicitly by YYERROR. |
2870*ef5ccd6cSJohn Marino `---------------------------------------------------*/
2871*ef5ccd6cSJohn Marino yyerrorlab:
2872*ef5ccd6cSJohn Marino
2873*ef5ccd6cSJohn Marino /* Pacify compilers like GCC when the user code never invokes
2874*ef5ccd6cSJohn Marino YYERROR and the label yyerrorlab therefore never appears in user
2875*ef5ccd6cSJohn Marino code. */
2876*ef5ccd6cSJohn Marino if (/*CONSTCOND*/ 0)
2877*ef5ccd6cSJohn Marino goto yyerrorlab;
2878*ef5ccd6cSJohn Marino
2879*ef5ccd6cSJohn Marino /* Do not reclaim the symbols of the rule which action triggered
2880*ef5ccd6cSJohn Marino this YYERROR. */
2881*ef5ccd6cSJohn Marino YYPOPSTACK (yylen);
2882*ef5ccd6cSJohn Marino yylen = 0;
2883*ef5ccd6cSJohn Marino YY_STACK_PRINT (yyss, yyssp);
2884*ef5ccd6cSJohn Marino yystate = *yyssp;
2885*ef5ccd6cSJohn Marino goto yyerrlab1;
2886*ef5ccd6cSJohn Marino
2887*ef5ccd6cSJohn Marino
2888*ef5ccd6cSJohn Marino /*-------------------------------------------------------------.
2889*ef5ccd6cSJohn Marino | yyerrlab1 -- common code for both syntax error and YYERROR. |
2890*ef5ccd6cSJohn Marino `-------------------------------------------------------------*/
2891*ef5ccd6cSJohn Marino yyerrlab1:
2892*ef5ccd6cSJohn Marino yyerrstatus = 3; /* Each real token shifted decrements this. */
2893*ef5ccd6cSJohn Marino
2894*ef5ccd6cSJohn Marino for (;;)
2895*ef5ccd6cSJohn Marino {
2896*ef5ccd6cSJohn Marino yyn = yypact[yystate];
2897*ef5ccd6cSJohn Marino if (yyn != YYPACT_NINF)
2898*ef5ccd6cSJohn Marino {
2899*ef5ccd6cSJohn Marino yyn += YYTERROR;
2900*ef5ccd6cSJohn Marino if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2901*ef5ccd6cSJohn Marino {
2902*ef5ccd6cSJohn Marino yyn = yytable[yyn];
2903*ef5ccd6cSJohn Marino if (0 < yyn)
2904*ef5ccd6cSJohn Marino break;
2905*ef5ccd6cSJohn Marino }
2906*ef5ccd6cSJohn Marino }
2907*ef5ccd6cSJohn Marino
2908*ef5ccd6cSJohn Marino /* Pop the current state because it cannot handle the error token. */
2909*ef5ccd6cSJohn Marino if (yyssp == yyss)
2910*ef5ccd6cSJohn Marino YYABORT;
2911*ef5ccd6cSJohn Marino
2912*ef5ccd6cSJohn Marino
2913*ef5ccd6cSJohn Marino yydestruct ("Error: popping",
2914*ef5ccd6cSJohn Marino yystos[yystate], yyvsp);
2915*ef5ccd6cSJohn Marino YYPOPSTACK (1);
2916*ef5ccd6cSJohn Marino yystate = *yyssp;
2917*ef5ccd6cSJohn Marino YY_STACK_PRINT (yyss, yyssp);
2918*ef5ccd6cSJohn Marino }
2919*ef5ccd6cSJohn Marino
2920*ef5ccd6cSJohn Marino *++yyvsp = yylval;
2921*ef5ccd6cSJohn Marino
2922*ef5ccd6cSJohn Marino
2923*ef5ccd6cSJohn Marino /* Shift the error token. */
2924*ef5ccd6cSJohn Marino YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2925*ef5ccd6cSJohn Marino
2926*ef5ccd6cSJohn Marino yystate = yyn;
2927*ef5ccd6cSJohn Marino goto yynewstate;
2928*ef5ccd6cSJohn Marino
2929*ef5ccd6cSJohn Marino
2930*ef5ccd6cSJohn Marino /*-------------------------------------.
2931*ef5ccd6cSJohn Marino | yyacceptlab -- YYACCEPT comes here. |
2932*ef5ccd6cSJohn Marino `-------------------------------------*/
2933*ef5ccd6cSJohn Marino yyacceptlab:
2934*ef5ccd6cSJohn Marino yyresult = 0;
2935*ef5ccd6cSJohn Marino goto yyreturn;
2936*ef5ccd6cSJohn Marino
2937*ef5ccd6cSJohn Marino /*-----------------------------------.
2938*ef5ccd6cSJohn Marino | yyabortlab -- YYABORT comes here. |
2939*ef5ccd6cSJohn Marino `-----------------------------------*/
2940*ef5ccd6cSJohn Marino yyabortlab:
2941*ef5ccd6cSJohn Marino yyresult = 1;
2942*ef5ccd6cSJohn Marino goto yyreturn;
2943*ef5ccd6cSJohn Marino
2944*ef5ccd6cSJohn Marino #if !defined(yyoverflow) || YYERROR_VERBOSE
2945*ef5ccd6cSJohn Marino /*-------------------------------------------------.
2946*ef5ccd6cSJohn Marino | yyexhaustedlab -- memory exhaustion comes here. |
2947*ef5ccd6cSJohn Marino `-------------------------------------------------*/
2948*ef5ccd6cSJohn Marino yyexhaustedlab:
2949*ef5ccd6cSJohn Marino yyerror (YY_("memory exhausted"));
2950*ef5ccd6cSJohn Marino yyresult = 2;
2951*ef5ccd6cSJohn Marino /* Fall through. */
2952*ef5ccd6cSJohn Marino #endif
2953*ef5ccd6cSJohn Marino
2954*ef5ccd6cSJohn Marino yyreturn:
2955*ef5ccd6cSJohn Marino if (yychar != YYEMPTY)
2956*ef5ccd6cSJohn Marino yydestruct ("Cleanup: discarding lookahead",
2957*ef5ccd6cSJohn Marino yytoken, &yylval);
2958*ef5ccd6cSJohn Marino /* Do not reclaim the symbols of the rule which action triggered
2959*ef5ccd6cSJohn Marino this YYABORT or YYACCEPT. */
2960*ef5ccd6cSJohn Marino YYPOPSTACK (yylen);
2961*ef5ccd6cSJohn Marino YY_STACK_PRINT (yyss, yyssp);
2962*ef5ccd6cSJohn Marino while (yyssp != yyss)
2963*ef5ccd6cSJohn Marino {
2964*ef5ccd6cSJohn Marino yydestruct ("Cleanup: popping",
2965*ef5ccd6cSJohn Marino yystos[*yyssp], yyvsp);
2966*ef5ccd6cSJohn Marino YYPOPSTACK (1);
2967*ef5ccd6cSJohn Marino }
2968*ef5ccd6cSJohn Marino #ifndef yyoverflow
2969*ef5ccd6cSJohn Marino if (yyss != yyssa)
2970*ef5ccd6cSJohn Marino YYSTACK_FREE (yyss);
2971*ef5ccd6cSJohn Marino #endif
2972*ef5ccd6cSJohn Marino #if YYERROR_VERBOSE
2973*ef5ccd6cSJohn Marino if (yymsg != yymsgbuf)
2974*ef5ccd6cSJohn Marino YYSTACK_FREE (yymsg);
2975*ef5ccd6cSJohn Marino #endif
2976*ef5ccd6cSJohn Marino /* Make sure YYID is used. */
2977*ef5ccd6cSJohn Marino return YYID (yyresult);
2978*ef5ccd6cSJohn Marino }
2979*ef5ccd6cSJohn Marino
2980*ef5ccd6cSJohn Marino
2981*ef5ccd6cSJohn Marino
2982*ef5ccd6cSJohn Marino /* Line 1675 of yacc.c */
2983*ef5ccd6cSJohn Marino #line 745 "ada-exp.y"
2984*ef5ccd6cSJohn Marino
2985*ef5ccd6cSJohn Marino
2986*ef5ccd6cSJohn Marino /* yylex defined in ada-lex.c: Reads one token, getting characters */
2987*ef5ccd6cSJohn Marino /* through lexptr. */
2988*ef5ccd6cSJohn Marino
2989*ef5ccd6cSJohn Marino /* Remap normal flex interface names (yylex) as well as gratuitiously */
2990*ef5ccd6cSJohn Marino /* global symbol names, so we can have multiple flex-generated parsers */
2991*ef5ccd6cSJohn Marino /* in gdb. */
2992*ef5ccd6cSJohn Marino
2993*ef5ccd6cSJohn Marino /* (See note above on previous definitions for YACC.) */
2994*ef5ccd6cSJohn Marino
2995*ef5ccd6cSJohn Marino #define yy_create_buffer ada_yy_create_buffer
2996*ef5ccd6cSJohn Marino #define yy_delete_buffer ada_yy_delete_buffer
2997*ef5ccd6cSJohn Marino #define yy_init_buffer ada_yy_init_buffer
2998*ef5ccd6cSJohn Marino #define yy_load_buffer_state ada_yy_load_buffer_state
2999*ef5ccd6cSJohn Marino #define yy_switch_to_buffer ada_yy_switch_to_buffer
3000*ef5ccd6cSJohn Marino #define yyrestart ada_yyrestart
3001*ef5ccd6cSJohn Marino #define yytext ada_yytext
3002*ef5ccd6cSJohn Marino #define yywrap ada_yywrap
3003*ef5ccd6cSJohn Marino
3004*ef5ccd6cSJohn Marino static struct obstack temp_parse_space;
3005*ef5ccd6cSJohn Marino
3006*ef5ccd6cSJohn Marino /* The following kludge was found necessary to prevent conflicts between */
3007*ef5ccd6cSJohn Marino /* defs.h and non-standard stdlib.h files. */
3008*ef5ccd6cSJohn Marino #define qsort __qsort__dummy
3009*ef5ccd6cSJohn Marino #include "ada-lex.c"
3010*ef5ccd6cSJohn Marino
3011*ef5ccd6cSJohn Marino int
ada_parse(void)3012*ef5ccd6cSJohn Marino ada_parse (void)
3013*ef5ccd6cSJohn Marino {
3014*ef5ccd6cSJohn Marino lexer_init (yyin); /* (Re-)initialize lexer. */
3015*ef5ccd6cSJohn Marino type_qualifier = NULL;
3016*ef5ccd6cSJohn Marino obstack_free (&temp_parse_space, NULL);
3017*ef5ccd6cSJohn Marino obstack_init (&temp_parse_space);
3018*ef5ccd6cSJohn Marino
3019*ef5ccd6cSJohn Marino return _ada_parse ();
3020*ef5ccd6cSJohn Marino }
3021*ef5ccd6cSJohn Marino
3022*ef5ccd6cSJohn Marino void
yyerror(char * msg)3023*ef5ccd6cSJohn Marino yyerror (char *msg)
3024*ef5ccd6cSJohn Marino {
3025*ef5ccd6cSJohn Marino error (_("Error in expression, near `%s'."), lexptr);
3026*ef5ccd6cSJohn Marino }
3027*ef5ccd6cSJohn Marino
3028*ef5ccd6cSJohn Marino /* The operator name corresponding to operator symbol STRING (adds
3029*ef5ccd6cSJohn Marino quotes and maps to lower-case). Destroys the previous contents of
3030*ef5ccd6cSJohn Marino the array pointed to by STRING.ptr. Error if STRING does not match
3031*ef5ccd6cSJohn Marino a valid Ada operator. Assumes that STRING.ptr points to a
3032*ef5ccd6cSJohn Marino null-terminated string and that, if STRING is a valid operator
3033*ef5ccd6cSJohn Marino symbol, the array pointed to by STRING.ptr contains at least
3034*ef5ccd6cSJohn Marino STRING.length+3 characters. */
3035*ef5ccd6cSJohn Marino
3036*ef5ccd6cSJohn Marino static struct stoken
string_to_operator(struct stoken string)3037*ef5ccd6cSJohn Marino string_to_operator (struct stoken string)
3038*ef5ccd6cSJohn Marino {
3039*ef5ccd6cSJohn Marino int i;
3040*ef5ccd6cSJohn Marino
3041*ef5ccd6cSJohn Marino for (i = 0; ada_opname_table[i].encoded != NULL; i += 1)
3042*ef5ccd6cSJohn Marino {
3043*ef5ccd6cSJohn Marino if (string.length == strlen (ada_opname_table[i].decoded)-2
3044*ef5ccd6cSJohn Marino && strncasecmp (string.ptr, ada_opname_table[i].decoded+1,
3045*ef5ccd6cSJohn Marino string.length) == 0)
3046*ef5ccd6cSJohn Marino {
3047*ef5ccd6cSJohn Marino strncpy (string.ptr, ada_opname_table[i].decoded,
3048*ef5ccd6cSJohn Marino string.length+2);
3049*ef5ccd6cSJohn Marino string.length += 2;
3050*ef5ccd6cSJohn Marino return string;
3051*ef5ccd6cSJohn Marino }
3052*ef5ccd6cSJohn Marino }
3053*ef5ccd6cSJohn Marino error (_("Invalid operator symbol `%s'"), string.ptr);
3054*ef5ccd6cSJohn Marino }
3055*ef5ccd6cSJohn Marino
3056*ef5ccd6cSJohn Marino /* Emit expression to access an instance of SYM, in block BLOCK (if
3057*ef5ccd6cSJohn Marino * non-NULL), and with :: qualification ORIG_LEFT_CONTEXT. */
3058*ef5ccd6cSJohn Marino static void
write_var_from_sym(const struct block * orig_left_context,const struct block * block,struct symbol * sym)3059*ef5ccd6cSJohn Marino write_var_from_sym (const struct block *orig_left_context,
3060*ef5ccd6cSJohn Marino const struct block *block,
3061*ef5ccd6cSJohn Marino struct symbol *sym)
3062*ef5ccd6cSJohn Marino {
3063*ef5ccd6cSJohn Marino if (orig_left_context == NULL && symbol_read_needs_frame (sym))
3064*ef5ccd6cSJohn Marino {
3065*ef5ccd6cSJohn Marino if (innermost_block == 0
3066*ef5ccd6cSJohn Marino || contained_in (block, innermost_block))
3067*ef5ccd6cSJohn Marino innermost_block = block;
3068*ef5ccd6cSJohn Marino }
3069*ef5ccd6cSJohn Marino
3070*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_VAR_VALUE);
3071*ef5ccd6cSJohn Marino write_exp_elt_block (block);
3072*ef5ccd6cSJohn Marino write_exp_elt_sym (sym);
3073*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_VAR_VALUE);
3074*ef5ccd6cSJohn Marino }
3075*ef5ccd6cSJohn Marino
3076*ef5ccd6cSJohn Marino /* Write integer or boolean constant ARG of type TYPE. */
3077*ef5ccd6cSJohn Marino
3078*ef5ccd6cSJohn Marino static void
write_int(LONGEST arg,struct type * type)3079*ef5ccd6cSJohn Marino write_int (LONGEST arg, struct type *type)
3080*ef5ccd6cSJohn Marino {
3081*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_LONG);
3082*ef5ccd6cSJohn Marino write_exp_elt_type (type);
3083*ef5ccd6cSJohn Marino write_exp_elt_longcst (arg);
3084*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_LONG);
3085*ef5ccd6cSJohn Marino }
3086*ef5ccd6cSJohn Marino
3087*ef5ccd6cSJohn Marino /* Write an OPCODE, string, OPCODE sequence to the current expression. */
3088*ef5ccd6cSJohn Marino static void
write_exp_op_with_string(enum exp_opcode opcode,struct stoken token)3089*ef5ccd6cSJohn Marino write_exp_op_with_string (enum exp_opcode opcode, struct stoken token)
3090*ef5ccd6cSJohn Marino {
3091*ef5ccd6cSJohn Marino write_exp_elt_opcode (opcode);
3092*ef5ccd6cSJohn Marino write_exp_string (token);
3093*ef5ccd6cSJohn Marino write_exp_elt_opcode (opcode);
3094*ef5ccd6cSJohn Marino }
3095*ef5ccd6cSJohn Marino
3096*ef5ccd6cSJohn Marino /* Emit expression corresponding to the renamed object named
3097*ef5ccd6cSJohn Marino * designated by RENAMED_ENTITY[0 .. RENAMED_ENTITY_LEN-1] in the
3098*ef5ccd6cSJohn Marino * context of ORIG_LEFT_CONTEXT, to which is applied the operations
3099*ef5ccd6cSJohn Marino * encoded by RENAMING_EXPR. MAX_DEPTH is the maximum number of
3100*ef5ccd6cSJohn Marino * cascaded renamings to allow. If ORIG_LEFT_CONTEXT is null, it
3101*ef5ccd6cSJohn Marino * defaults to the currently selected block. ORIG_SYMBOL is the
3102*ef5ccd6cSJohn Marino * symbol that originally encoded the renaming. It is needed only
3103*ef5ccd6cSJohn Marino * because its prefix also qualifies any index variables used to index
3104*ef5ccd6cSJohn Marino * or slice an array. It should not be necessary once we go to the
3105*ef5ccd6cSJohn Marino * new encoding entirely (FIXME pnh 7/20/2007). */
3106*ef5ccd6cSJohn Marino
3107*ef5ccd6cSJohn Marino static void
write_object_renaming(const struct block * orig_left_context,const char * renamed_entity,int renamed_entity_len,const char * renaming_expr,int max_depth)3108*ef5ccd6cSJohn Marino write_object_renaming (const struct block *orig_left_context,
3109*ef5ccd6cSJohn Marino const char *renamed_entity, int renamed_entity_len,
3110*ef5ccd6cSJohn Marino const char *renaming_expr, int max_depth)
3111*ef5ccd6cSJohn Marino {
3112*ef5ccd6cSJohn Marino char *name;
3113*ef5ccd6cSJohn Marino enum { SIMPLE_INDEX, LOWER_BOUND, UPPER_BOUND } slice_state;
3114*ef5ccd6cSJohn Marino struct ada_symbol_info sym_info;
3115*ef5ccd6cSJohn Marino
3116*ef5ccd6cSJohn Marino if (max_depth <= 0)
3117*ef5ccd6cSJohn Marino error (_("Could not find renamed symbol"));
3118*ef5ccd6cSJohn Marino
3119*ef5ccd6cSJohn Marino if (orig_left_context == NULL)
3120*ef5ccd6cSJohn Marino orig_left_context = get_selected_block (NULL);
3121*ef5ccd6cSJohn Marino
3122*ef5ccd6cSJohn Marino name = obstack_copy0 (&temp_parse_space, renamed_entity, renamed_entity_len);
3123*ef5ccd6cSJohn Marino ada_lookup_encoded_symbol (name, orig_left_context, VAR_DOMAIN, &sym_info);
3124*ef5ccd6cSJohn Marino if (sym_info.sym == NULL)
3125*ef5ccd6cSJohn Marino error (_("Could not find renamed variable: %s"), ada_decode (name));
3126*ef5ccd6cSJohn Marino else if (SYMBOL_CLASS (sym_info.sym) == LOC_TYPEDEF)
3127*ef5ccd6cSJohn Marino /* We have a renaming of an old-style renaming symbol. Don't
3128*ef5ccd6cSJohn Marino trust the block information. */
3129*ef5ccd6cSJohn Marino sym_info.block = orig_left_context;
3130*ef5ccd6cSJohn Marino
3131*ef5ccd6cSJohn Marino {
3132*ef5ccd6cSJohn Marino const char *inner_renamed_entity;
3133*ef5ccd6cSJohn Marino int inner_renamed_entity_len;
3134*ef5ccd6cSJohn Marino const char *inner_renaming_expr;
3135*ef5ccd6cSJohn Marino
3136*ef5ccd6cSJohn Marino switch (ada_parse_renaming (sym_info.sym, &inner_renamed_entity,
3137*ef5ccd6cSJohn Marino &inner_renamed_entity_len,
3138*ef5ccd6cSJohn Marino &inner_renaming_expr))
3139*ef5ccd6cSJohn Marino {
3140*ef5ccd6cSJohn Marino case ADA_NOT_RENAMING:
3141*ef5ccd6cSJohn Marino write_var_from_sym (orig_left_context, sym_info.block, sym_info.sym);
3142*ef5ccd6cSJohn Marino break;
3143*ef5ccd6cSJohn Marino case ADA_OBJECT_RENAMING:
3144*ef5ccd6cSJohn Marino write_object_renaming (sym_info.block,
3145*ef5ccd6cSJohn Marino inner_renamed_entity, inner_renamed_entity_len,
3146*ef5ccd6cSJohn Marino inner_renaming_expr, max_depth - 1);
3147*ef5ccd6cSJohn Marino break;
3148*ef5ccd6cSJohn Marino default:
3149*ef5ccd6cSJohn Marino goto BadEncoding;
3150*ef5ccd6cSJohn Marino }
3151*ef5ccd6cSJohn Marino }
3152*ef5ccd6cSJohn Marino
3153*ef5ccd6cSJohn Marino slice_state = SIMPLE_INDEX;
3154*ef5ccd6cSJohn Marino while (*renaming_expr == 'X')
3155*ef5ccd6cSJohn Marino {
3156*ef5ccd6cSJohn Marino renaming_expr += 1;
3157*ef5ccd6cSJohn Marino
3158*ef5ccd6cSJohn Marino switch (*renaming_expr) {
3159*ef5ccd6cSJohn Marino case 'A':
3160*ef5ccd6cSJohn Marino renaming_expr += 1;
3161*ef5ccd6cSJohn Marino write_exp_elt_opcode (UNOP_IND);
3162*ef5ccd6cSJohn Marino break;
3163*ef5ccd6cSJohn Marino case 'L':
3164*ef5ccd6cSJohn Marino slice_state = LOWER_BOUND;
3165*ef5ccd6cSJohn Marino /* FALLTHROUGH */
3166*ef5ccd6cSJohn Marino case 'S':
3167*ef5ccd6cSJohn Marino renaming_expr += 1;
3168*ef5ccd6cSJohn Marino if (isdigit (*renaming_expr))
3169*ef5ccd6cSJohn Marino {
3170*ef5ccd6cSJohn Marino char *next;
3171*ef5ccd6cSJohn Marino long val = strtol (renaming_expr, &next, 10);
3172*ef5ccd6cSJohn Marino if (next == renaming_expr)
3173*ef5ccd6cSJohn Marino goto BadEncoding;
3174*ef5ccd6cSJohn Marino renaming_expr = next;
3175*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_LONG);
3176*ef5ccd6cSJohn Marino write_exp_elt_type (type_int ());
3177*ef5ccd6cSJohn Marino write_exp_elt_longcst ((LONGEST) val);
3178*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_LONG);
3179*ef5ccd6cSJohn Marino }
3180*ef5ccd6cSJohn Marino else
3181*ef5ccd6cSJohn Marino {
3182*ef5ccd6cSJohn Marino const char *end;
3183*ef5ccd6cSJohn Marino char *index_name;
3184*ef5ccd6cSJohn Marino struct ada_symbol_info index_sym_info;
3185*ef5ccd6cSJohn Marino
3186*ef5ccd6cSJohn Marino end = strchr (renaming_expr, 'X');
3187*ef5ccd6cSJohn Marino if (end == NULL)
3188*ef5ccd6cSJohn Marino end = renaming_expr + strlen (renaming_expr);
3189*ef5ccd6cSJohn Marino
3190*ef5ccd6cSJohn Marino index_name =
3191*ef5ccd6cSJohn Marino obstack_copy0 (&temp_parse_space, renaming_expr,
3192*ef5ccd6cSJohn Marino end - renaming_expr);
3193*ef5ccd6cSJohn Marino renaming_expr = end;
3194*ef5ccd6cSJohn Marino
3195*ef5ccd6cSJohn Marino ada_lookup_encoded_symbol (index_name, NULL, VAR_DOMAIN,
3196*ef5ccd6cSJohn Marino &index_sym_info);
3197*ef5ccd6cSJohn Marino if (index_sym_info.sym == NULL)
3198*ef5ccd6cSJohn Marino error (_("Could not find %s"), index_name);
3199*ef5ccd6cSJohn Marino else if (SYMBOL_CLASS (index_sym_info.sym) == LOC_TYPEDEF)
3200*ef5ccd6cSJohn Marino /* Index is an old-style renaming symbol. */
3201*ef5ccd6cSJohn Marino index_sym_info.block = orig_left_context;
3202*ef5ccd6cSJohn Marino write_var_from_sym (NULL, index_sym_info.block,
3203*ef5ccd6cSJohn Marino index_sym_info.sym);
3204*ef5ccd6cSJohn Marino }
3205*ef5ccd6cSJohn Marino if (slice_state == SIMPLE_INDEX)
3206*ef5ccd6cSJohn Marino {
3207*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_FUNCALL);
3208*ef5ccd6cSJohn Marino write_exp_elt_longcst ((LONGEST) 1);
3209*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_FUNCALL);
3210*ef5ccd6cSJohn Marino }
3211*ef5ccd6cSJohn Marino else if (slice_state == LOWER_BOUND)
3212*ef5ccd6cSJohn Marino slice_state = UPPER_BOUND;
3213*ef5ccd6cSJohn Marino else if (slice_state == UPPER_BOUND)
3214*ef5ccd6cSJohn Marino {
3215*ef5ccd6cSJohn Marino write_exp_elt_opcode (TERNOP_SLICE);
3216*ef5ccd6cSJohn Marino slice_state = SIMPLE_INDEX;
3217*ef5ccd6cSJohn Marino }
3218*ef5ccd6cSJohn Marino break;
3219*ef5ccd6cSJohn Marino
3220*ef5ccd6cSJohn Marino case 'R':
3221*ef5ccd6cSJohn Marino {
3222*ef5ccd6cSJohn Marino struct stoken field_name;
3223*ef5ccd6cSJohn Marino const char *end;
3224*ef5ccd6cSJohn Marino renaming_expr += 1;
3225*ef5ccd6cSJohn Marino
3226*ef5ccd6cSJohn Marino if (slice_state != SIMPLE_INDEX)
3227*ef5ccd6cSJohn Marino goto BadEncoding;
3228*ef5ccd6cSJohn Marino end = strchr (renaming_expr, 'X');
3229*ef5ccd6cSJohn Marino if (end == NULL)
3230*ef5ccd6cSJohn Marino end = renaming_expr + strlen (renaming_expr);
3231*ef5ccd6cSJohn Marino field_name.length = end - renaming_expr;
3232*ef5ccd6cSJohn Marino field_name.ptr = xmalloc (end - renaming_expr + 1);
3233*ef5ccd6cSJohn Marino strncpy (field_name.ptr, renaming_expr, end - renaming_expr);
3234*ef5ccd6cSJohn Marino field_name.ptr[end - renaming_expr] = '\000';
3235*ef5ccd6cSJohn Marino renaming_expr = end;
3236*ef5ccd6cSJohn Marino write_exp_op_with_string (STRUCTOP_STRUCT, field_name);
3237*ef5ccd6cSJohn Marino break;
3238*ef5ccd6cSJohn Marino }
3239*ef5ccd6cSJohn Marino
3240*ef5ccd6cSJohn Marino default:
3241*ef5ccd6cSJohn Marino goto BadEncoding;
3242*ef5ccd6cSJohn Marino }
3243*ef5ccd6cSJohn Marino }
3244*ef5ccd6cSJohn Marino if (slice_state == SIMPLE_INDEX)
3245*ef5ccd6cSJohn Marino return;
3246*ef5ccd6cSJohn Marino
3247*ef5ccd6cSJohn Marino BadEncoding:
3248*ef5ccd6cSJohn Marino error (_("Internal error in encoding of renaming declaration"));
3249*ef5ccd6cSJohn Marino }
3250*ef5ccd6cSJohn Marino
3251*ef5ccd6cSJohn Marino static struct block*
block_lookup(struct block * context,char * raw_name)3252*ef5ccd6cSJohn Marino block_lookup (struct block *context, char *raw_name)
3253*ef5ccd6cSJohn Marino {
3254*ef5ccd6cSJohn Marino char *name;
3255*ef5ccd6cSJohn Marino struct ada_symbol_info *syms;
3256*ef5ccd6cSJohn Marino int nsyms;
3257*ef5ccd6cSJohn Marino struct symtab *symtab;
3258*ef5ccd6cSJohn Marino
3259*ef5ccd6cSJohn Marino if (raw_name[0] == '\'')
3260*ef5ccd6cSJohn Marino {
3261*ef5ccd6cSJohn Marino raw_name += 1;
3262*ef5ccd6cSJohn Marino name = raw_name;
3263*ef5ccd6cSJohn Marino }
3264*ef5ccd6cSJohn Marino else
3265*ef5ccd6cSJohn Marino name = ada_encode (raw_name);
3266*ef5ccd6cSJohn Marino
3267*ef5ccd6cSJohn Marino nsyms = ada_lookup_symbol_list (name, context, VAR_DOMAIN, &syms);
3268*ef5ccd6cSJohn Marino if (context == NULL
3269*ef5ccd6cSJohn Marino && (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK))
3270*ef5ccd6cSJohn Marino symtab = lookup_symtab (name);
3271*ef5ccd6cSJohn Marino else
3272*ef5ccd6cSJohn Marino symtab = NULL;
3273*ef5ccd6cSJohn Marino
3274*ef5ccd6cSJohn Marino if (symtab != NULL)
3275*ef5ccd6cSJohn Marino return BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), STATIC_BLOCK);
3276*ef5ccd6cSJohn Marino else if (nsyms == 0 || SYMBOL_CLASS (syms[0].sym) != LOC_BLOCK)
3277*ef5ccd6cSJohn Marino {
3278*ef5ccd6cSJohn Marino if (context == NULL)
3279*ef5ccd6cSJohn Marino error (_("No file or function \"%s\"."), raw_name);
3280*ef5ccd6cSJohn Marino else
3281*ef5ccd6cSJohn Marino error (_("No function \"%s\" in specified context."), raw_name);
3282*ef5ccd6cSJohn Marino }
3283*ef5ccd6cSJohn Marino else
3284*ef5ccd6cSJohn Marino {
3285*ef5ccd6cSJohn Marino if (nsyms > 1)
3286*ef5ccd6cSJohn Marino warning (_("Function name \"%s\" ambiguous here"), raw_name);
3287*ef5ccd6cSJohn Marino return SYMBOL_BLOCK_VALUE (syms[0].sym);
3288*ef5ccd6cSJohn Marino }
3289*ef5ccd6cSJohn Marino }
3290*ef5ccd6cSJohn Marino
3291*ef5ccd6cSJohn Marino static struct symbol*
select_possible_type_sym(struct ada_symbol_info * syms,int nsyms)3292*ef5ccd6cSJohn Marino select_possible_type_sym (struct ada_symbol_info *syms, int nsyms)
3293*ef5ccd6cSJohn Marino {
3294*ef5ccd6cSJohn Marino int i;
3295*ef5ccd6cSJohn Marino int preferred_index;
3296*ef5ccd6cSJohn Marino struct type *preferred_type;
3297*ef5ccd6cSJohn Marino
3298*ef5ccd6cSJohn Marino preferred_index = -1; preferred_type = NULL;
3299*ef5ccd6cSJohn Marino for (i = 0; i < nsyms; i += 1)
3300*ef5ccd6cSJohn Marino switch (SYMBOL_CLASS (syms[i].sym))
3301*ef5ccd6cSJohn Marino {
3302*ef5ccd6cSJohn Marino case LOC_TYPEDEF:
3303*ef5ccd6cSJohn Marino if (ada_prefer_type (SYMBOL_TYPE (syms[i].sym), preferred_type))
3304*ef5ccd6cSJohn Marino {
3305*ef5ccd6cSJohn Marino preferred_index = i;
3306*ef5ccd6cSJohn Marino preferred_type = SYMBOL_TYPE (syms[i].sym);
3307*ef5ccd6cSJohn Marino }
3308*ef5ccd6cSJohn Marino break;
3309*ef5ccd6cSJohn Marino case LOC_REGISTER:
3310*ef5ccd6cSJohn Marino case LOC_ARG:
3311*ef5ccd6cSJohn Marino case LOC_REF_ARG:
3312*ef5ccd6cSJohn Marino case LOC_REGPARM_ADDR:
3313*ef5ccd6cSJohn Marino case LOC_LOCAL:
3314*ef5ccd6cSJohn Marino case LOC_COMPUTED:
3315*ef5ccd6cSJohn Marino return NULL;
3316*ef5ccd6cSJohn Marino default:
3317*ef5ccd6cSJohn Marino break;
3318*ef5ccd6cSJohn Marino }
3319*ef5ccd6cSJohn Marino if (preferred_type == NULL)
3320*ef5ccd6cSJohn Marino return NULL;
3321*ef5ccd6cSJohn Marino return syms[preferred_index].sym;
3322*ef5ccd6cSJohn Marino }
3323*ef5ccd6cSJohn Marino
3324*ef5ccd6cSJohn Marino static struct type*
find_primitive_type(char * name)3325*ef5ccd6cSJohn Marino find_primitive_type (char *name)
3326*ef5ccd6cSJohn Marino {
3327*ef5ccd6cSJohn Marino struct type *type;
3328*ef5ccd6cSJohn Marino type = language_lookup_primitive_type_by_name (parse_language,
3329*ef5ccd6cSJohn Marino parse_gdbarch,
3330*ef5ccd6cSJohn Marino name);
3331*ef5ccd6cSJohn Marino if (type == NULL && strcmp ("system__address", name) == 0)
3332*ef5ccd6cSJohn Marino type = type_system_address ();
3333*ef5ccd6cSJohn Marino
3334*ef5ccd6cSJohn Marino if (type != NULL)
3335*ef5ccd6cSJohn Marino {
3336*ef5ccd6cSJohn Marino /* Check to see if we have a regular definition of this
3337*ef5ccd6cSJohn Marino type that just didn't happen to have been read yet. */
3338*ef5ccd6cSJohn Marino struct symbol *sym;
3339*ef5ccd6cSJohn Marino char *expanded_name =
3340*ef5ccd6cSJohn Marino (char *) alloca (strlen (name) + sizeof ("standard__"));
3341*ef5ccd6cSJohn Marino strcpy (expanded_name, "standard__");
3342*ef5ccd6cSJohn Marino strcat (expanded_name, name);
3343*ef5ccd6cSJohn Marino sym = ada_lookup_symbol (expanded_name, NULL, VAR_DOMAIN, NULL);
3344*ef5ccd6cSJohn Marino if (sym != NULL && SYMBOL_CLASS (sym) == LOC_TYPEDEF)
3345*ef5ccd6cSJohn Marino type = SYMBOL_TYPE (sym);
3346*ef5ccd6cSJohn Marino }
3347*ef5ccd6cSJohn Marino
3348*ef5ccd6cSJohn Marino return type;
3349*ef5ccd6cSJohn Marino }
3350*ef5ccd6cSJohn Marino
3351*ef5ccd6cSJohn Marino static int
chop_selector(char * name,int end)3352*ef5ccd6cSJohn Marino chop_selector (char *name, int end)
3353*ef5ccd6cSJohn Marino {
3354*ef5ccd6cSJohn Marino int i;
3355*ef5ccd6cSJohn Marino for (i = end - 1; i > 0; i -= 1)
3356*ef5ccd6cSJohn Marino if (name[i] == '.' || (name[i] == '_' && name[i+1] == '_'))
3357*ef5ccd6cSJohn Marino return i;
3358*ef5ccd6cSJohn Marino return -1;
3359*ef5ccd6cSJohn Marino }
3360*ef5ccd6cSJohn Marino
3361*ef5ccd6cSJohn Marino /* If NAME is a string beginning with a separator (either '__', or
3362*ef5ccd6cSJohn Marino '.'), chop this separator and return the result; else, return
3363*ef5ccd6cSJohn Marino NAME. */
3364*ef5ccd6cSJohn Marino
3365*ef5ccd6cSJohn Marino static char *
chop_separator(char * name)3366*ef5ccd6cSJohn Marino chop_separator (char *name)
3367*ef5ccd6cSJohn Marino {
3368*ef5ccd6cSJohn Marino if (*name == '.')
3369*ef5ccd6cSJohn Marino return name + 1;
3370*ef5ccd6cSJohn Marino
3371*ef5ccd6cSJohn Marino if (name[0] == '_' && name[1] == '_')
3372*ef5ccd6cSJohn Marino return name + 2;
3373*ef5ccd6cSJohn Marino
3374*ef5ccd6cSJohn Marino return name;
3375*ef5ccd6cSJohn Marino }
3376*ef5ccd6cSJohn Marino
3377*ef5ccd6cSJohn Marino /* Given that SELS is a string of the form (<sep><identifier>)*, where
3378*ef5ccd6cSJohn Marino <sep> is '__' or '.', write the indicated sequence of
3379*ef5ccd6cSJohn Marino STRUCTOP_STRUCT expression operators. */
3380*ef5ccd6cSJohn Marino static void
write_selectors(char * sels)3381*ef5ccd6cSJohn Marino write_selectors (char *sels)
3382*ef5ccd6cSJohn Marino {
3383*ef5ccd6cSJohn Marino while (*sels != '\0')
3384*ef5ccd6cSJohn Marino {
3385*ef5ccd6cSJohn Marino struct stoken field_name;
3386*ef5ccd6cSJohn Marino char *p = chop_separator (sels);
3387*ef5ccd6cSJohn Marino sels = p;
3388*ef5ccd6cSJohn Marino while (*sels != '\0' && *sels != '.'
3389*ef5ccd6cSJohn Marino && (sels[0] != '_' || sels[1] != '_'))
3390*ef5ccd6cSJohn Marino sels += 1;
3391*ef5ccd6cSJohn Marino field_name.length = sels - p;
3392*ef5ccd6cSJohn Marino field_name.ptr = p;
3393*ef5ccd6cSJohn Marino write_exp_op_with_string (STRUCTOP_STRUCT, field_name);
3394*ef5ccd6cSJohn Marino }
3395*ef5ccd6cSJohn Marino }
3396*ef5ccd6cSJohn Marino
3397*ef5ccd6cSJohn Marino /* Write a variable access (OP_VAR_VALUE) to ambiguous encoded name
3398*ef5ccd6cSJohn Marino NAME[0..LEN-1], in block context BLOCK, to be resolved later. Writes
3399*ef5ccd6cSJohn Marino a temporary symbol that is valid until the next call to ada_parse.
3400*ef5ccd6cSJohn Marino */
3401*ef5ccd6cSJohn Marino static void
write_ambiguous_var(const struct block * block,char * name,int len)3402*ef5ccd6cSJohn Marino write_ambiguous_var (const struct block *block, char *name, int len)
3403*ef5ccd6cSJohn Marino {
3404*ef5ccd6cSJohn Marino struct symbol *sym =
3405*ef5ccd6cSJohn Marino obstack_alloc (&temp_parse_space, sizeof (struct symbol));
3406*ef5ccd6cSJohn Marino memset (sym, 0, sizeof (struct symbol));
3407*ef5ccd6cSJohn Marino SYMBOL_DOMAIN (sym) = UNDEF_DOMAIN;
3408*ef5ccd6cSJohn Marino SYMBOL_LINKAGE_NAME (sym) = obstack_copy0 (&temp_parse_space, name, len);
3409*ef5ccd6cSJohn Marino SYMBOL_LANGUAGE (sym) = language_ada;
3410*ef5ccd6cSJohn Marino
3411*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_VAR_VALUE);
3412*ef5ccd6cSJohn Marino write_exp_elt_block (block);
3413*ef5ccd6cSJohn Marino write_exp_elt_sym (sym);
3414*ef5ccd6cSJohn Marino write_exp_elt_opcode (OP_VAR_VALUE);
3415*ef5ccd6cSJohn Marino }
3416*ef5ccd6cSJohn Marino
3417*ef5ccd6cSJohn Marino /* A convenient wrapper around ada_get_field_index that takes
3418*ef5ccd6cSJohn Marino a non NUL-terminated FIELD_NAME0 and a FIELD_NAME_LEN instead
3419*ef5ccd6cSJohn Marino of a NUL-terminated field name. */
3420*ef5ccd6cSJohn Marino
3421*ef5ccd6cSJohn Marino static int
ada_nget_field_index(const struct type * type,const char * field_name0,int field_name_len,int maybe_missing)3422*ef5ccd6cSJohn Marino ada_nget_field_index (const struct type *type, const char *field_name0,
3423*ef5ccd6cSJohn Marino int field_name_len, int maybe_missing)
3424*ef5ccd6cSJohn Marino {
3425*ef5ccd6cSJohn Marino char *field_name = alloca ((field_name_len + 1) * sizeof (char));
3426*ef5ccd6cSJohn Marino
3427*ef5ccd6cSJohn Marino strncpy (field_name, field_name0, field_name_len);
3428*ef5ccd6cSJohn Marino field_name[field_name_len] = '\0';
3429*ef5ccd6cSJohn Marino return ada_get_field_index (type, field_name, maybe_missing);
3430*ef5ccd6cSJohn Marino }
3431*ef5ccd6cSJohn Marino
3432*ef5ccd6cSJohn Marino /* If encoded_field_name is the name of a field inside symbol SYM,
3433*ef5ccd6cSJohn Marino then return the type of that field. Otherwise, return NULL.
3434*ef5ccd6cSJohn Marino
3435*ef5ccd6cSJohn Marino This function is actually recursive, so if ENCODED_FIELD_NAME
3436*ef5ccd6cSJohn Marino doesn't match one of the fields of our symbol, then try to see
3437*ef5ccd6cSJohn Marino if ENCODED_FIELD_NAME could not be a succession of field names
3438*ef5ccd6cSJohn Marino (in other words, the user entered an expression of the form
3439*ef5ccd6cSJohn Marino TYPE_NAME.FIELD1.FIELD2.FIELD3), in which case we evaluate
3440*ef5ccd6cSJohn Marino each field name sequentially to obtain the desired field type.
3441*ef5ccd6cSJohn Marino In case of failure, we return NULL. */
3442*ef5ccd6cSJohn Marino
3443*ef5ccd6cSJohn Marino static struct type *
get_symbol_field_type(struct symbol * sym,char * encoded_field_name)3444*ef5ccd6cSJohn Marino get_symbol_field_type (struct symbol *sym, char *encoded_field_name)
3445*ef5ccd6cSJohn Marino {
3446*ef5ccd6cSJohn Marino char *field_name = encoded_field_name;
3447*ef5ccd6cSJohn Marino char *subfield_name;
3448*ef5ccd6cSJohn Marino struct type *type = SYMBOL_TYPE (sym);
3449*ef5ccd6cSJohn Marino int fieldno;
3450*ef5ccd6cSJohn Marino
3451*ef5ccd6cSJohn Marino if (type == NULL || field_name == NULL)
3452*ef5ccd6cSJohn Marino return NULL;
3453*ef5ccd6cSJohn Marino type = check_typedef (type);
3454*ef5ccd6cSJohn Marino
3455*ef5ccd6cSJohn Marino while (field_name[0] != '\0')
3456*ef5ccd6cSJohn Marino {
3457*ef5ccd6cSJohn Marino field_name = chop_separator (field_name);
3458*ef5ccd6cSJohn Marino
3459*ef5ccd6cSJohn Marino fieldno = ada_get_field_index (type, field_name, 1);
3460*ef5ccd6cSJohn Marino if (fieldno >= 0)
3461*ef5ccd6cSJohn Marino return TYPE_FIELD_TYPE (type, fieldno);
3462*ef5ccd6cSJohn Marino
3463*ef5ccd6cSJohn Marino subfield_name = field_name;
3464*ef5ccd6cSJohn Marino while (*subfield_name != '\0' && *subfield_name != '.'
3465*ef5ccd6cSJohn Marino && (subfield_name[0] != '_' || subfield_name[1] != '_'))
3466*ef5ccd6cSJohn Marino subfield_name += 1;
3467*ef5ccd6cSJohn Marino
3468*ef5ccd6cSJohn Marino if (subfield_name[0] == '\0')
3469*ef5ccd6cSJohn Marino return NULL;
3470*ef5ccd6cSJohn Marino
3471*ef5ccd6cSJohn Marino fieldno = ada_nget_field_index (type, field_name,
3472*ef5ccd6cSJohn Marino subfield_name - field_name, 1);
3473*ef5ccd6cSJohn Marino if (fieldno < 0)
3474*ef5ccd6cSJohn Marino return NULL;
3475*ef5ccd6cSJohn Marino
3476*ef5ccd6cSJohn Marino type = TYPE_FIELD_TYPE (type, fieldno);
3477*ef5ccd6cSJohn Marino field_name = subfield_name;
3478*ef5ccd6cSJohn Marino }
3479*ef5ccd6cSJohn Marino
3480*ef5ccd6cSJohn Marino return NULL;
3481*ef5ccd6cSJohn Marino }
3482*ef5ccd6cSJohn Marino
3483*ef5ccd6cSJohn Marino /* Look up NAME0 (an unencoded identifier or dotted name) in BLOCK (or
3484*ef5ccd6cSJohn Marino expression_block_context if NULL). If it denotes a type, return
3485*ef5ccd6cSJohn Marino that type. Otherwise, write expression code to evaluate it as an
3486*ef5ccd6cSJohn Marino object and return NULL. In this second case, NAME0 will, in general,
3487*ef5ccd6cSJohn Marino have the form <name>(.<selector_name>)*, where <name> is an object
3488*ef5ccd6cSJohn Marino or renaming encoded in the debugging data. Calls error if no
3489*ef5ccd6cSJohn Marino prefix <name> matches a name in the debugging data (i.e., matches
3490*ef5ccd6cSJohn Marino either a complete name or, as a wild-card match, the final
3491*ef5ccd6cSJohn Marino identifier). */
3492*ef5ccd6cSJohn Marino
3493*ef5ccd6cSJohn Marino static struct type*
write_var_or_type(const struct block * block,struct stoken name0)3494*ef5ccd6cSJohn Marino write_var_or_type (const struct block *block, struct stoken name0)
3495*ef5ccd6cSJohn Marino {
3496*ef5ccd6cSJohn Marino int depth;
3497*ef5ccd6cSJohn Marino char *encoded_name;
3498*ef5ccd6cSJohn Marino int name_len;
3499*ef5ccd6cSJohn Marino
3500*ef5ccd6cSJohn Marino if (block == NULL)
3501*ef5ccd6cSJohn Marino block = expression_context_block;
3502*ef5ccd6cSJohn Marino
3503*ef5ccd6cSJohn Marino encoded_name = ada_encode (name0.ptr);
3504*ef5ccd6cSJohn Marino name_len = strlen (encoded_name);
3505*ef5ccd6cSJohn Marino encoded_name = obstack_copy0 (&temp_parse_space, encoded_name, name_len);
3506*ef5ccd6cSJohn Marino for (depth = 0; depth < MAX_RENAMING_CHAIN_LENGTH; depth += 1)
3507*ef5ccd6cSJohn Marino {
3508*ef5ccd6cSJohn Marino int tail_index;
3509*ef5ccd6cSJohn Marino
3510*ef5ccd6cSJohn Marino tail_index = name_len;
3511*ef5ccd6cSJohn Marino while (tail_index > 0)
3512*ef5ccd6cSJohn Marino {
3513*ef5ccd6cSJohn Marino int nsyms;
3514*ef5ccd6cSJohn Marino struct ada_symbol_info *syms;
3515*ef5ccd6cSJohn Marino struct symbol *type_sym;
3516*ef5ccd6cSJohn Marino struct symbol *renaming_sym;
3517*ef5ccd6cSJohn Marino const char* renaming;
3518*ef5ccd6cSJohn Marino int renaming_len;
3519*ef5ccd6cSJohn Marino const char* renaming_expr;
3520*ef5ccd6cSJohn Marino int terminator = encoded_name[tail_index];
3521*ef5ccd6cSJohn Marino
3522*ef5ccd6cSJohn Marino encoded_name[tail_index] = '\0';
3523*ef5ccd6cSJohn Marino nsyms = ada_lookup_symbol_list (encoded_name, block,
3524*ef5ccd6cSJohn Marino VAR_DOMAIN, &syms);
3525*ef5ccd6cSJohn Marino encoded_name[tail_index] = terminator;
3526*ef5ccd6cSJohn Marino
3527*ef5ccd6cSJohn Marino /* A single symbol may rename a package or object. */
3528*ef5ccd6cSJohn Marino
3529*ef5ccd6cSJohn Marino /* This should go away when we move entirely to new version.
3530*ef5ccd6cSJohn Marino FIXME pnh 7/20/2007. */
3531*ef5ccd6cSJohn Marino if (nsyms == 1)
3532*ef5ccd6cSJohn Marino {
3533*ef5ccd6cSJohn Marino struct symbol *ren_sym =
3534*ef5ccd6cSJohn Marino ada_find_renaming_symbol (syms[0].sym, syms[0].block);
3535*ef5ccd6cSJohn Marino
3536*ef5ccd6cSJohn Marino if (ren_sym != NULL)
3537*ef5ccd6cSJohn Marino syms[0].sym = ren_sym;
3538*ef5ccd6cSJohn Marino }
3539*ef5ccd6cSJohn Marino
3540*ef5ccd6cSJohn Marino type_sym = select_possible_type_sym (syms, nsyms);
3541*ef5ccd6cSJohn Marino
3542*ef5ccd6cSJohn Marino if (type_sym != NULL)
3543*ef5ccd6cSJohn Marino renaming_sym = type_sym;
3544*ef5ccd6cSJohn Marino else if (nsyms == 1)
3545*ef5ccd6cSJohn Marino renaming_sym = syms[0].sym;
3546*ef5ccd6cSJohn Marino else
3547*ef5ccd6cSJohn Marino renaming_sym = NULL;
3548*ef5ccd6cSJohn Marino
3549*ef5ccd6cSJohn Marino switch (ada_parse_renaming (renaming_sym, &renaming,
3550*ef5ccd6cSJohn Marino &renaming_len, &renaming_expr))
3551*ef5ccd6cSJohn Marino {
3552*ef5ccd6cSJohn Marino case ADA_NOT_RENAMING:
3553*ef5ccd6cSJohn Marino break;
3554*ef5ccd6cSJohn Marino case ADA_PACKAGE_RENAMING:
3555*ef5ccd6cSJohn Marino case ADA_EXCEPTION_RENAMING:
3556*ef5ccd6cSJohn Marino case ADA_SUBPROGRAM_RENAMING:
3557*ef5ccd6cSJohn Marino {
3558*ef5ccd6cSJohn Marino char *new_name
3559*ef5ccd6cSJohn Marino = obstack_alloc (&temp_parse_space,
3560*ef5ccd6cSJohn Marino renaming_len + name_len - tail_index + 1);
3561*ef5ccd6cSJohn Marino strncpy (new_name, renaming, renaming_len);
3562*ef5ccd6cSJohn Marino strcpy (new_name + renaming_len, encoded_name + tail_index);
3563*ef5ccd6cSJohn Marino encoded_name = new_name;
3564*ef5ccd6cSJohn Marino name_len = renaming_len + name_len - tail_index;
3565*ef5ccd6cSJohn Marino goto TryAfterRenaming;
3566*ef5ccd6cSJohn Marino }
3567*ef5ccd6cSJohn Marino case ADA_OBJECT_RENAMING:
3568*ef5ccd6cSJohn Marino write_object_renaming (block, renaming, renaming_len,
3569*ef5ccd6cSJohn Marino renaming_expr, MAX_RENAMING_CHAIN_LENGTH);
3570*ef5ccd6cSJohn Marino write_selectors (encoded_name + tail_index);
3571*ef5ccd6cSJohn Marino return NULL;
3572*ef5ccd6cSJohn Marino default:
3573*ef5ccd6cSJohn Marino internal_error (__FILE__, __LINE__,
3574*ef5ccd6cSJohn Marino _("impossible value from ada_parse_renaming"));
3575*ef5ccd6cSJohn Marino }
3576*ef5ccd6cSJohn Marino
3577*ef5ccd6cSJohn Marino if (type_sym != NULL)
3578*ef5ccd6cSJohn Marino {
3579*ef5ccd6cSJohn Marino struct type *field_type;
3580*ef5ccd6cSJohn Marino
3581*ef5ccd6cSJohn Marino if (tail_index == name_len)
3582*ef5ccd6cSJohn Marino return SYMBOL_TYPE (type_sym);
3583*ef5ccd6cSJohn Marino
3584*ef5ccd6cSJohn Marino /* We have some extraneous characters after the type name.
3585*ef5ccd6cSJohn Marino If this is an expression "TYPE_NAME.FIELD0.[...].FIELDN",
3586*ef5ccd6cSJohn Marino then try to get the type of FIELDN. */
3587*ef5ccd6cSJohn Marino field_type
3588*ef5ccd6cSJohn Marino = get_symbol_field_type (type_sym, encoded_name + tail_index);
3589*ef5ccd6cSJohn Marino if (field_type != NULL)
3590*ef5ccd6cSJohn Marino return field_type;
3591*ef5ccd6cSJohn Marino else
3592*ef5ccd6cSJohn Marino error (_("Invalid attempt to select from type: \"%s\"."),
3593*ef5ccd6cSJohn Marino name0.ptr);
3594*ef5ccd6cSJohn Marino }
3595*ef5ccd6cSJohn Marino else if (tail_index == name_len && nsyms == 0)
3596*ef5ccd6cSJohn Marino {
3597*ef5ccd6cSJohn Marino struct type *type = find_primitive_type (encoded_name);
3598*ef5ccd6cSJohn Marino
3599*ef5ccd6cSJohn Marino if (type != NULL)
3600*ef5ccd6cSJohn Marino return type;
3601*ef5ccd6cSJohn Marino }
3602*ef5ccd6cSJohn Marino
3603*ef5ccd6cSJohn Marino if (nsyms == 1)
3604*ef5ccd6cSJohn Marino {
3605*ef5ccd6cSJohn Marino write_var_from_sym (block, syms[0].block, syms[0].sym);
3606*ef5ccd6cSJohn Marino write_selectors (encoded_name + tail_index);
3607*ef5ccd6cSJohn Marino return NULL;
3608*ef5ccd6cSJohn Marino }
3609*ef5ccd6cSJohn Marino else if (nsyms == 0)
3610*ef5ccd6cSJohn Marino {
3611*ef5ccd6cSJohn Marino struct minimal_symbol *msym
3612*ef5ccd6cSJohn Marino = ada_lookup_simple_minsym (encoded_name);
3613*ef5ccd6cSJohn Marino if (msym != NULL)
3614*ef5ccd6cSJohn Marino {
3615*ef5ccd6cSJohn Marino write_exp_msymbol (msym);
3616*ef5ccd6cSJohn Marino /* Maybe cause error here rather than later? FIXME? */
3617*ef5ccd6cSJohn Marino write_selectors (encoded_name + tail_index);
3618*ef5ccd6cSJohn Marino return NULL;
3619*ef5ccd6cSJohn Marino }
3620*ef5ccd6cSJohn Marino
3621*ef5ccd6cSJohn Marino if (tail_index == name_len
3622*ef5ccd6cSJohn Marino && strncmp (encoded_name, "standard__",
3623*ef5ccd6cSJohn Marino sizeof ("standard__") - 1) == 0)
3624*ef5ccd6cSJohn Marino error (_("No definition of \"%s\" found."), name0.ptr);
3625*ef5ccd6cSJohn Marino
3626*ef5ccd6cSJohn Marino tail_index = chop_selector (encoded_name, tail_index);
3627*ef5ccd6cSJohn Marino }
3628*ef5ccd6cSJohn Marino else
3629*ef5ccd6cSJohn Marino {
3630*ef5ccd6cSJohn Marino write_ambiguous_var (block, encoded_name, tail_index);
3631*ef5ccd6cSJohn Marino write_selectors (encoded_name + tail_index);
3632*ef5ccd6cSJohn Marino return NULL;
3633*ef5ccd6cSJohn Marino }
3634*ef5ccd6cSJohn Marino }
3635*ef5ccd6cSJohn Marino
3636*ef5ccd6cSJohn Marino if (!have_full_symbols () && !have_partial_symbols () && block == NULL)
3637*ef5ccd6cSJohn Marino error (_("No symbol table is loaded. Use the \"file\" command."));
3638*ef5ccd6cSJohn Marino if (block == expression_context_block)
3639*ef5ccd6cSJohn Marino error (_("No definition of \"%s\" in current context."), name0.ptr);
3640*ef5ccd6cSJohn Marino else
3641*ef5ccd6cSJohn Marino error (_("No definition of \"%s\" in specified context."), name0.ptr);
3642*ef5ccd6cSJohn Marino
3643*ef5ccd6cSJohn Marino TryAfterRenaming: ;
3644*ef5ccd6cSJohn Marino }
3645*ef5ccd6cSJohn Marino
3646*ef5ccd6cSJohn Marino error (_("Could not find renamed symbol \"%s\""), name0.ptr);
3647*ef5ccd6cSJohn Marino
3648*ef5ccd6cSJohn Marino }
3649*ef5ccd6cSJohn Marino
3650*ef5ccd6cSJohn Marino /* Write a left side of a component association (e.g., NAME in NAME =>
3651*ef5ccd6cSJohn Marino exp). If NAME has the form of a selected component, write it as an
3652*ef5ccd6cSJohn Marino ordinary expression. If it is a simple variable that unambiguously
3653*ef5ccd6cSJohn Marino corresponds to exactly one symbol that does not denote a type or an
3654*ef5ccd6cSJohn Marino object renaming, also write it normally as an OP_VAR_VALUE.
3655*ef5ccd6cSJohn Marino Otherwise, write it as an OP_NAME.
3656*ef5ccd6cSJohn Marino
3657*ef5ccd6cSJohn Marino Unfortunately, we don't know at this point whether NAME is supposed
3658*ef5ccd6cSJohn Marino to denote a record component name or the value of an array index.
3659*ef5ccd6cSJohn Marino Therefore, it is not appropriate to disambiguate an ambiguous name
3660*ef5ccd6cSJohn Marino as we normally would, nor to replace a renaming with its referent.
3661*ef5ccd6cSJohn Marino As a result, in the (one hopes) rare case that one writes an
3662*ef5ccd6cSJohn Marino aggregate such as (R => 42) where R renames an object or is an
3663*ef5ccd6cSJohn Marino ambiguous name, one must write instead ((R) => 42). */
3664*ef5ccd6cSJohn Marino
3665*ef5ccd6cSJohn Marino static void
write_name_assoc(struct stoken name)3666*ef5ccd6cSJohn Marino write_name_assoc (struct stoken name)
3667*ef5ccd6cSJohn Marino {
3668*ef5ccd6cSJohn Marino if (strchr (name.ptr, '.') == NULL)
3669*ef5ccd6cSJohn Marino {
3670*ef5ccd6cSJohn Marino struct ada_symbol_info *syms;
3671*ef5ccd6cSJohn Marino int nsyms = ada_lookup_symbol_list (name.ptr, expression_context_block,
3672*ef5ccd6cSJohn Marino VAR_DOMAIN, &syms);
3673*ef5ccd6cSJohn Marino if (nsyms != 1 || SYMBOL_CLASS (syms[0].sym) == LOC_TYPEDEF)
3674*ef5ccd6cSJohn Marino write_exp_op_with_string (OP_NAME, name);
3675*ef5ccd6cSJohn Marino else
3676*ef5ccd6cSJohn Marino write_var_from_sym (NULL, syms[0].block, syms[0].sym);
3677*ef5ccd6cSJohn Marino }
3678*ef5ccd6cSJohn Marino else
3679*ef5ccd6cSJohn Marino if (write_var_or_type (NULL, name) != NULL)
3680*ef5ccd6cSJohn Marino error (_("Invalid use of type."));
3681*ef5ccd6cSJohn Marino }
3682*ef5ccd6cSJohn Marino
3683*ef5ccd6cSJohn Marino /* Convert the character literal whose ASCII value would be VAL to the
3684*ef5ccd6cSJohn Marino appropriate value of type TYPE, if there is a translation.
3685*ef5ccd6cSJohn Marino Otherwise return VAL. Hence, in an enumeration type ('A', 'B'),
3686*ef5ccd6cSJohn Marino the literal 'A' (VAL == 65), returns 0. */
3687*ef5ccd6cSJohn Marino
3688*ef5ccd6cSJohn Marino static LONGEST
convert_char_literal(struct type * type,LONGEST val)3689*ef5ccd6cSJohn Marino convert_char_literal (struct type *type, LONGEST val)
3690*ef5ccd6cSJohn Marino {
3691*ef5ccd6cSJohn Marino char name[7];
3692*ef5ccd6cSJohn Marino int f;
3693*ef5ccd6cSJohn Marino
3694*ef5ccd6cSJohn Marino if (type == NULL)
3695*ef5ccd6cSJohn Marino return val;
3696*ef5ccd6cSJohn Marino type = check_typedef (type);
3697*ef5ccd6cSJohn Marino if (TYPE_CODE (type) != TYPE_CODE_ENUM)
3698*ef5ccd6cSJohn Marino return val;
3699*ef5ccd6cSJohn Marino
3700*ef5ccd6cSJohn Marino xsnprintf (name, sizeof (name), "QU%02x", (int) val);
3701*ef5ccd6cSJohn Marino for (f = 0; f < TYPE_NFIELDS (type); f += 1)
3702*ef5ccd6cSJohn Marino {
3703*ef5ccd6cSJohn Marino if (strcmp (name, TYPE_FIELD_NAME (type, f)) == 0)
3704*ef5ccd6cSJohn Marino return TYPE_FIELD_ENUMVAL (type, f);
3705*ef5ccd6cSJohn Marino }
3706*ef5ccd6cSJohn Marino return val;
3707*ef5ccd6cSJohn Marino }
3708*ef5ccd6cSJohn Marino
3709*ef5ccd6cSJohn Marino static struct type *
type_int(void)3710*ef5ccd6cSJohn Marino type_int (void)
3711*ef5ccd6cSJohn Marino {
3712*ef5ccd6cSJohn Marino return parse_type->builtin_int;
3713*ef5ccd6cSJohn Marino }
3714*ef5ccd6cSJohn Marino
3715*ef5ccd6cSJohn Marino static struct type *
type_long(void)3716*ef5ccd6cSJohn Marino type_long (void)
3717*ef5ccd6cSJohn Marino {
3718*ef5ccd6cSJohn Marino return parse_type->builtin_long;
3719*ef5ccd6cSJohn Marino }
3720*ef5ccd6cSJohn Marino
3721*ef5ccd6cSJohn Marino static struct type *
type_long_long(void)3722*ef5ccd6cSJohn Marino type_long_long (void)
3723*ef5ccd6cSJohn Marino {
3724*ef5ccd6cSJohn Marino return parse_type->builtin_long_long;
3725*ef5ccd6cSJohn Marino }
3726*ef5ccd6cSJohn Marino
3727*ef5ccd6cSJohn Marino static struct type *
type_float(void)3728*ef5ccd6cSJohn Marino type_float (void)
3729*ef5ccd6cSJohn Marino {
3730*ef5ccd6cSJohn Marino return parse_type->builtin_float;
3731*ef5ccd6cSJohn Marino }
3732*ef5ccd6cSJohn Marino
3733*ef5ccd6cSJohn Marino static struct type *
type_double(void)3734*ef5ccd6cSJohn Marino type_double (void)
3735*ef5ccd6cSJohn Marino {
3736*ef5ccd6cSJohn Marino return parse_type->builtin_double;
3737*ef5ccd6cSJohn Marino }
3738*ef5ccd6cSJohn Marino
3739*ef5ccd6cSJohn Marino static struct type *
type_long_double(void)3740*ef5ccd6cSJohn Marino type_long_double (void)
3741*ef5ccd6cSJohn Marino {
3742*ef5ccd6cSJohn Marino return parse_type->builtin_long_double;
3743*ef5ccd6cSJohn Marino }
3744*ef5ccd6cSJohn Marino
3745*ef5ccd6cSJohn Marino static struct type *
type_char(void)3746*ef5ccd6cSJohn Marino type_char (void)
3747*ef5ccd6cSJohn Marino {
3748*ef5ccd6cSJohn Marino return language_string_char_type (parse_language, parse_gdbarch);
3749*ef5ccd6cSJohn Marino }
3750*ef5ccd6cSJohn Marino
3751*ef5ccd6cSJohn Marino static struct type *
type_boolean(void)3752*ef5ccd6cSJohn Marino type_boolean (void)
3753*ef5ccd6cSJohn Marino {
3754*ef5ccd6cSJohn Marino return parse_type->builtin_bool;
3755*ef5ccd6cSJohn Marino }
3756*ef5ccd6cSJohn Marino
3757*ef5ccd6cSJohn Marino static struct type *
type_system_address(void)3758*ef5ccd6cSJohn Marino type_system_address (void)
3759*ef5ccd6cSJohn Marino {
3760*ef5ccd6cSJohn Marino struct type *type
3761*ef5ccd6cSJohn Marino = language_lookup_primitive_type_by_name (parse_language,
3762*ef5ccd6cSJohn Marino parse_gdbarch,
3763*ef5ccd6cSJohn Marino "system__address");
3764*ef5ccd6cSJohn Marino return type != NULL ? type : parse_type->builtin_data_ptr;
3765*ef5ccd6cSJohn Marino }
3766*ef5ccd6cSJohn Marino
3767*ef5ccd6cSJohn Marino /* Provide a prototype to silence -Wmissing-prototypes. */
3768*ef5ccd6cSJohn Marino extern initialize_file_ftype _initialize_ada_exp;
3769*ef5ccd6cSJohn Marino
3770*ef5ccd6cSJohn Marino void
_initialize_ada_exp(void)3771*ef5ccd6cSJohn Marino _initialize_ada_exp (void)
3772*ef5ccd6cSJohn Marino {
3773*ef5ccd6cSJohn Marino obstack_init (&temp_parse_space);
3774*ef5ccd6cSJohn Marino }
3775*ef5ccd6cSJohn Marino
3776*ef5ccd6cSJohn Marino /* FIXME: hilfingr/2004-10-05: Hack to remove warning. The function
3777*ef5ccd6cSJohn Marino string_to_operator is supposed to be used for cases where one
3778*ef5ccd6cSJohn Marino calls an operator function with prefix notation, as in
3779*ef5ccd6cSJohn Marino "+" (a, b), but at some point, this code seems to have gone
3780*ef5ccd6cSJohn Marino missing. */
3781*ef5ccd6cSJohn Marino
3782*ef5ccd6cSJohn Marino struct stoken (*dummy_string_to_ada_operator) (struct stoken)
3783*ef5ccd6cSJohn Marino = string_to_operator;
3784*ef5ccd6cSJohn Marino
3785