1 |
dpavlin |
1 |
/* A Bison parser, made by GNU Bison 1.875d. */ |
2 |
|
|
|
3 |
|
|
/* Skeleton parser for Yacc-like parsing with Bison, |
4 |
|
|
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. |
5 |
|
|
|
6 |
|
|
This program is free software; you can redistribute it and/or modify |
7 |
|
|
it under the terms of the GNU General Public License as published by |
8 |
|
|
the Free Software Foundation; either version 2, or (at your option) |
9 |
|
|
any later version. |
10 |
|
|
|
11 |
|
|
This program is distributed in the hope that it will be useful, |
12 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
|
|
GNU General Public License for more details. |
15 |
|
|
|
16 |
|
|
You should have received a copy of the GNU General Public License |
17 |
|
|
along with this program; if not, write to the Free Software |
18 |
|
|
Foundation, Inc., 59 Temple Place - Suite 330, |
19 |
|
|
Boston, MA 02111-1307, USA. */ |
20 |
|
|
|
21 |
|
|
/* As a special exception, when this file is copied by Bison into a |
22 |
|
|
Bison output file, you may use that output file without restriction. |
23 |
|
|
This special exception was added by the Free Software Foundation |
24 |
|
|
in version 1.24 of Bison. */ |
25 |
|
|
|
26 |
|
|
/* Written by Richard Stallman by simplifying the original so called |
27 |
|
|
``semantic'' parser. */ |
28 |
|
|
|
29 |
|
|
/* All symbols defined below should begin with yy or YY, to avoid |
30 |
|
|
infringing on user name space. This should be done even for local |
31 |
|
|
variables, as they might otherwise be expanded by user macros. |
32 |
|
|
There are some unavoidable exceptions within include files to |
33 |
|
|
define necessary library symbols; they are noted "INFRINGES ON |
34 |
|
|
USER NAME SPACE" below. */ |
35 |
|
|
|
36 |
|
|
/* Identify Bison output. */ |
37 |
|
|
#define YYBISON 1 |
38 |
|
|
|
39 |
|
|
/* Skeleton name. */ |
40 |
|
|
#define YYSKELETON_NAME "yacc.c" |
41 |
|
|
|
42 |
|
|
/* Pure parsers. */ |
43 |
|
|
#define YYPURE 1 |
44 |
|
|
|
45 |
|
|
/* Using locations. */ |
46 |
|
|
#define YYLSP_NEEDED 0 |
47 |
|
|
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
/* Tokens. */ |
51 |
|
|
#ifndef YYTOKENTYPE |
52 |
|
|
# define YYTOKENTYPE |
53 |
|
|
/* Put the tokens into the symbol table, so that GDB and other debuggers |
54 |
|
|
know about them. */ |
55 |
|
|
enum yytokentype { |
56 |
|
|
EVAL_INT = 258, |
57 |
|
|
EVAL_GPR = 259, |
58 |
|
|
EVAL_FPR = 260, |
59 |
|
|
EVAL_REG_PC = 261, |
60 |
|
|
EVAL_REG_CR = 262, |
61 |
|
|
EVAL_REG_LR = 263, |
62 |
|
|
EVAL_REG_CTR = 264, |
63 |
|
|
EVAL_REG_XER = 265, |
64 |
|
|
EVAL_REG_MSR = 266, |
65 |
|
|
EVAL_REG_SRR0 = 267, |
66 |
|
|
EVAL_REG_SRR1 = 268, |
67 |
|
|
EVAL_STR = 269, |
68 |
|
|
EVAL_FLOAT = 270, |
69 |
|
|
EVAL_IDENT = 271, |
70 |
|
|
EVAL_PRINT = 272, |
71 |
|
|
EVAL_SETREG = 273, |
72 |
|
|
EVAL_REGS = 274, |
73 |
|
|
EVAL_FLOATS = 275, |
74 |
|
|
EVAL_BREAK = 276, |
75 |
|
|
EVAL_LIST_BREAK = 277, |
76 |
|
|
EVAL_STEP = 278, |
77 |
|
|
EVAL_NEXT = 279, |
78 |
|
|
EVAL_CONTINUE = 280, |
79 |
|
|
EVAL_QUIT = 281, |
80 |
|
|
EVAL_E2P = 282, |
81 |
|
|
EVAL_INSPECT_BYTE = 283, |
82 |
|
|
EVAL_INSPECT_HALF = 284, |
83 |
|
|
EVAL_INSPECT_WORD = 285, |
84 |
|
|
EVAL_INSPECT_DWORD = 286, |
85 |
|
|
EVAL_INSPECT_STRING = 287, |
86 |
|
|
EVAL_INSPECT_MEM = 288, |
87 |
|
|
EVAL_WATCH = 289, |
88 |
|
|
EVAL_WATCH_BYTE = 290, |
89 |
|
|
EVAL_WATCH_HALF = 291, |
90 |
|
|
EVAL_WATCH_WORD = 292, |
91 |
|
|
EVAL_WATCH_DWORD = 293, |
92 |
|
|
EVAL_DELETE_WATCH = 294, |
93 |
|
|
EVAL_DUMP = 295, |
94 |
|
|
EVAL_DISASM = 296, |
95 |
|
|
EVAL_HELP = 297, |
96 |
|
|
EVAL_LAND = 298, |
97 |
|
|
EVAL_LXOR = 299, |
98 |
|
|
EVAL_LOR = 300, |
99 |
|
|
EVAL_EQ = 301, |
100 |
|
|
EVAL_NE = 302, |
101 |
|
|
EVAL_LT = 303, |
102 |
|
|
EVAL_LE = 304, |
103 |
|
|
EVAL_GT = 305, |
104 |
|
|
EVAL_GE = 306, |
105 |
|
|
EVAL_SHL = 307, |
106 |
|
|
EVAL_SHR = 308, |
107 |
|
|
NEG = 309, |
108 |
|
|
EVAL_POW = 310 |
109 |
|
|
}; |
110 |
|
|
#endif |
111 |
|
|
#define EVAL_INT 258 |
112 |
|
|
#define EVAL_GPR 259 |
113 |
|
|
#define EVAL_FPR 260 |
114 |
|
|
#define EVAL_REG_PC 261 |
115 |
|
|
#define EVAL_REG_CR 262 |
116 |
|
|
#define EVAL_REG_LR 263 |
117 |
|
|
#define EVAL_REG_CTR 264 |
118 |
|
|
#define EVAL_REG_XER 265 |
119 |
|
|
#define EVAL_REG_MSR 266 |
120 |
|
|
#define EVAL_REG_SRR0 267 |
121 |
|
|
#define EVAL_REG_SRR1 268 |
122 |
|
|
#define EVAL_STR 269 |
123 |
|
|
#define EVAL_FLOAT 270 |
124 |
|
|
#define EVAL_IDENT 271 |
125 |
|
|
#define EVAL_PRINT 272 |
126 |
|
|
#define EVAL_SETREG 273 |
127 |
|
|
#define EVAL_REGS 274 |
128 |
|
|
#define EVAL_FLOATS 275 |
129 |
|
|
#define EVAL_BREAK 276 |
130 |
|
|
#define EVAL_LIST_BREAK 277 |
131 |
|
|
#define EVAL_STEP 278 |
132 |
|
|
#define EVAL_NEXT 279 |
133 |
|
|
#define EVAL_CONTINUE 280 |
134 |
|
|
#define EVAL_QUIT 281 |
135 |
|
|
#define EVAL_E2P 282 |
136 |
|
|
#define EVAL_INSPECT_BYTE 283 |
137 |
|
|
#define EVAL_INSPECT_HALF 284 |
138 |
|
|
#define EVAL_INSPECT_WORD 285 |
139 |
|
|
#define EVAL_INSPECT_DWORD 286 |
140 |
|
|
#define EVAL_INSPECT_STRING 287 |
141 |
|
|
#define EVAL_INSPECT_MEM 288 |
142 |
|
|
#define EVAL_WATCH 289 |
143 |
|
|
#define EVAL_WATCH_BYTE 290 |
144 |
|
|
#define EVAL_WATCH_HALF 291 |
145 |
|
|
#define EVAL_WATCH_WORD 292 |
146 |
|
|
#define EVAL_WATCH_DWORD 293 |
147 |
|
|
#define EVAL_DELETE_WATCH 294 |
148 |
|
|
#define EVAL_DUMP 295 |
149 |
|
|
#define EVAL_DISASM 296 |
150 |
|
|
#define EVAL_HELP 297 |
151 |
|
|
#define EVAL_LAND 298 |
152 |
|
|
#define EVAL_LXOR 299 |
153 |
|
|
#define EVAL_LOR 300 |
154 |
|
|
#define EVAL_EQ 301 |
155 |
|
|
#define EVAL_NE 302 |
156 |
|
|
#define EVAL_LT 303 |
157 |
|
|
#define EVAL_LE 304 |
158 |
|
|
#define EVAL_GT 305 |
159 |
|
|
#define EVAL_GE 306 |
160 |
|
|
#define EVAL_SHL 307 |
161 |
|
|
#define EVAL_SHR 308 |
162 |
|
|
#define NEG 309 |
163 |
|
|
#define EVAL_POW 310 |
164 |
|
|
|
165 |
|
|
|
166 |
|
|
|
167 |
|
|
|
168 |
|
|
/* Copy the first part of user declarations. */ |
169 |
|
|
#line 4 "debugparse.y" |
170 |
|
|
|
171 |
|
|
|
172 |
|
|
#define YYPARSE_PARAM resultptr |
173 |
|
|
|
174 |
|
|
#include "debugtype.h" |
175 |
|
|
#include "parsehelper.h" |
176 |
|
|
|
177 |
|
|
void yyerror (char *s) |
178 |
|
|
{ |
179 |
|
|
set_eval_error(s); |
180 |
|
|
} |
181 |
|
|
|
182 |
|
|
|
183 |
|
|
|
184 |
|
|
/* Enabling traces. */ |
185 |
|
|
#ifndef YYDEBUG |
186 |
|
|
# define YYDEBUG 0 |
187 |
|
|
#endif |
188 |
|
|
|
189 |
|
|
/* Enabling verbose error messages. */ |
190 |
|
|
#ifdef YYERROR_VERBOSE |
191 |
|
|
# undef YYERROR_VERBOSE |
192 |
|
|
# define YYERROR_VERBOSE 1 |
193 |
|
|
#else |
194 |
|
|
# define YYERROR_VERBOSE 0 |
195 |
|
|
#endif |
196 |
|
|
|
197 |
|
|
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) |
198 |
|
|
#line 18 "debugparse.y" |
199 |
|
|
typedef union YYSTYPE { |
200 |
|
|
struct eval_command command; |
201 |
|
|
struct eval_scalar scalar; |
202 |
|
|
eval_commandtype commandtoken; |
203 |
|
|
char *ident; |
204 |
|
|
struct eval_scalarlist scalars; |
205 |
|
|
} YYSTYPE; |
206 |
|
|
/* Line 191 of yacc.c. */ |
207 |
|
|
#line 208 "debugparse.c" |
208 |
|
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
209 |
|
|
# define YYSTYPE_IS_DECLARED 1 |
210 |
|
|
# define YYSTYPE_IS_TRIVIAL 1 |
211 |
|
|
#endif |
212 |
|
|
|
213 |
|
|
|
214 |
|
|
|
215 |
|
|
/* Copy the second part of user declarations. */ |
216 |
|
|
|
217 |
|
|
|
218 |
|
|
/* Line 214 of yacc.c. */ |
219 |
|
|
#line 220 "debugparse.c" |
220 |
|
|
|
221 |
|
|
#if ! defined (yyoverflow) || YYERROR_VERBOSE |
222 |
|
|
|
223 |
|
|
# ifndef YYFREE |
224 |
|
|
# define YYFREE free |
225 |
|
|
# endif |
226 |
|
|
# ifndef YYMALLOC |
227 |
|
|
# define YYMALLOC malloc |
228 |
|
|
# endif |
229 |
|
|
|
230 |
|
|
/* The parser invokes alloca or malloc; define the necessary symbols. */ |
231 |
|
|
|
232 |
|
|
# ifdef YYSTACK_USE_ALLOCA |
233 |
|
|
# if YYSTACK_USE_ALLOCA |
234 |
|
|
# define YYSTACK_ALLOC alloca |
235 |
|
|
# endif |
236 |
|
|
# else |
237 |
|
|
# if defined (alloca) || defined (_ALLOCA_H) |
238 |
|
|
# define YYSTACK_ALLOC alloca |
239 |
|
|
# else |
240 |
|
|
# ifdef __GNUC__ |
241 |
|
|
# define YYSTACK_ALLOC __builtin_alloca |
242 |
|
|
# endif |
243 |
|
|
# endif |
244 |
|
|
# endif |
245 |
|
|
|
246 |
|
|
# ifdef YYSTACK_ALLOC |
247 |
|
|
/* Pacify GCC's `empty if-body' warning. */ |
248 |
|
|
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
249 |
|
|
# else |
250 |
|
|
# if defined (__STDC__) || defined (__cplusplus) |
251 |
|
|
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
252 |
|
|
# define YYSIZE_T size_t |
253 |
|
|
# endif |
254 |
|
|
# define YYSTACK_ALLOC YYMALLOC |
255 |
|
|
# define YYSTACK_FREE YYFREE |
256 |
|
|
# endif |
257 |
|
|
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ |
258 |
|
|
|
259 |
|
|
|
260 |
|
|
#if (! defined (yyoverflow) \ |
261 |
|
|
&& (! defined (__cplusplus) \ |
262 |
|
|
|| (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) |
263 |
|
|
|
264 |
|
|
/* A type that is properly aligned for any stack member. */ |
265 |
|
|
union yyalloc |
266 |
|
|
{ |
267 |
|
|
short int yyss; |
268 |
|
|
YYSTYPE yyvs; |
269 |
|
|
}; |
270 |
|
|
|
271 |
|
|
/* The size of the maximum gap between one aligned stack and the next. */ |
272 |
|
|
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
273 |
|
|
|
274 |
|
|
/* The size of an array large to enough to hold all stacks, each with |
275 |
|
|
N elements. */ |
276 |
|
|
# define YYSTACK_BYTES(N) \ |
277 |
|
|
((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ |
278 |
|
|
+ YYSTACK_GAP_MAXIMUM) |
279 |
|
|
|
280 |
|
|
/* Copy COUNT objects from FROM to TO. The source and destination do |
281 |
|
|
not overlap. */ |
282 |
|
|
# ifndef YYCOPY |
283 |
|
|
# if defined (__GNUC__) && 1 < __GNUC__ |
284 |
|
|
# define YYCOPY(To, From, Count) \ |
285 |
|
|
__builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
286 |
|
|
# else |
287 |
|
|
# define YYCOPY(To, From, Count) \ |
288 |
|
|
do \ |
289 |
|
|
{ \ |
290 |
|
|
register YYSIZE_T yyi; \ |
291 |
|
|
for (yyi = 0; yyi < (Count); yyi++) \ |
292 |
|
|
(To)[yyi] = (From)[yyi]; \ |
293 |
|
|
} \ |
294 |
|
|
while (0) |
295 |
|
|
# endif |
296 |
|
|
# endif |
297 |
|
|
|
298 |
|
|
/* Relocate STACK from its old location to the new one. The |
299 |
|
|
local variables YYSIZE and YYSTACKSIZE give the old and new number of |
300 |
|
|
elements in the stack, and YYPTR gives the new location of the |
301 |
|
|
stack. Advance YYPTR to a properly aligned location for the next |
302 |
|
|
stack. */ |
303 |
|
|
# define YYSTACK_RELOCATE(Stack) \ |
304 |
|
|
do \ |
305 |
|
|
{ \ |
306 |
|
|
YYSIZE_T yynewbytes; \ |
307 |
|
|
YYCOPY (&yyptr->Stack, Stack, yysize); \ |
308 |
|
|
Stack = &yyptr->Stack; \ |
309 |
|
|
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
310 |
|
|
yyptr += yynewbytes / sizeof (*yyptr); \ |
311 |
|
|
} \ |
312 |
|
|
while (0) |
313 |
|
|
|
314 |
|
|
#endif |
315 |
|
|
|
316 |
|
|
#if defined (__STDC__) || defined (__cplusplus) |
317 |
|
|
typedef signed char yysigned_char; |
318 |
|
|
#else |
319 |
|
|
typedef short int yysigned_char; |
320 |
|
|
#endif |
321 |
|
|
|
322 |
|
|
/* YYFINAL -- State number of the termination state. */ |
323 |
|
|
#define YYFINAL 73 |
324 |
|
|
/* YYLAST -- Last index in YYTABLE. */ |
325 |
|
|
#define YYLAST 486 |
326 |
|
|
|
327 |
|
|
/* YYNTOKENS -- Number of terminals. */ |
328 |
|
|
#define YYNTOKENS 72 |
329 |
|
|
/* YYNNTS -- Number of nonterminals. */ |
330 |
|
|
#define YYNNTS 10 |
331 |
|
|
/* YYNRULES -- Number of rules. */ |
332 |
|
|
#define YYNRULES 78 |
333 |
|
|
/* YYNRULES -- Number of states. */ |
334 |
|
|
#define YYNSTATES 143 |
335 |
|
|
|
336 |
|
|
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
337 |
|
|
#define YYUNDEFTOK 2 |
338 |
|
|
#define YYMAXUTOK 310 |
339 |
|
|
|
340 |
|
|
#define YYTRANSLATE(YYX) \ |
341 |
|
|
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
342 |
|
|
|
343 |
|
|
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
344 |
|
|
static const unsigned char yytranslate[] = |
345 |
|
|
{ |
346 |
|
|
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
347 |
|
|
68, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
348 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
349 |
|
|
2, 2, 2, 2, 2, 2, 2, 65, 52, 2, |
350 |
|
|
70, 71, 63, 62, 43, 61, 46, 64, 2, 2, |
351 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 45, 2, |
352 |
|
|
2, 69, 2, 44, 2, 2, 2, 2, 2, 2, |
353 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
354 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
355 |
|
|
2, 2, 2, 2, 51, 2, 2, 2, 2, 2, |
356 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
357 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
358 |
|
|
2, 2, 2, 2, 50, 2, 2, 2, 2, 2, |
359 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
360 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
361 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
362 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
363 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
364 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
365 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
366 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
367 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
368 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
369 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
370 |
|
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
371 |
|
|
2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
372 |
|
|
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
373 |
|
|
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
374 |
|
|
25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
375 |
|
|
35, 36, 37, 38, 39, 40, 41, 42, 47, 48, |
376 |
|
|
49, 53, 54, 55, 56, 57, 58, 59, 60, 66, |
377 |
|
|
67 |
378 |
|
|
}; |
379 |
|
|
|
380 |
|
|
#if YYDEBUG |
381 |
|
|
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
382 |
|
|
YYRHS. */ |
383 |
|
|
static const unsigned char yyprhs[] = |
384 |
|
|
{ |
385 |
|
|
0, 0, 3, 5, 8, 11, 14, 16, 18, 23, |
386 |
|
|
27, 29, 32, 35, 37, 39, 42, 45, 48, 51, |
387 |
|
|
54, 57, 61, 65, 69, 73, 77, 81, 84, 88, |
388 |
|
|
92, 95, 96, 98, 99, 102, 104, 106, 108, 110, |
389 |
|
|
112, 114, 116, 118, 120, 122, 124, 126, 128, 130, |
390 |
|
|
134, 138, 142, 146, 150, 154, 158, 162, 166, 170, |
391 |
|
|
174, 178, 182, 186, 190, 194, 198, 202, 206, 210, |
392 |
|
|
213, 217, 223, 227, 232, 233, 235, 237, 241 |
393 |
|
|
}; |
394 |
|
|
|
395 |
|
|
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
396 |
|
|
static const yysigned_char yyrhs[] = |
397 |
|
|
{ |
398 |
|
|
73, 0, -1, 68, -1, 74, 68, -1, 78, 68, |
399 |
|
|
-1, 17, 78, -1, 19, -1, 20, -1, 18, 77, |
400 |
|
|
69, 78, -1, 21, 78, 76, -1, 22, -1, 23, |
401 |
|
|
75, -1, 24, 75, -1, 25, -1, 26, -1, 27, |
402 |
|
|
78, -1, 28, 78, -1, 29, 78, -1, 30, 78, |
403 |
|
|
-1, 31, 78, -1, 32, 78, -1, 33, 78, 76, |
404 |
|
|
-1, 34, 78, 76, -1, 35, 78, 76, -1, 36, |
405 |
|
|
78, 76, -1, 37, 78, 76, -1, 38, 78, 76, |
406 |
|
|
-1, 39, 78, -1, 40, 78, 76, -1, 41, 75, |
407 |
|
|
76, -1, 42, 75, -1, -1, 78, -1, -1, 43, |
408 |
|
|
78, -1, 4, -1, 5, -1, 6, -1, 7, -1, |
409 |
|
|
8, -1, 9, -1, 10, -1, 11, -1, 12, -1, |
410 |
|
|
13, -1, 3, -1, 77, -1, 15, -1, 14, -1, |
411 |
|
|
78, 63, 78, -1, 78, 64, 78, -1, 78, 65, |
412 |
|
|
78, -1, 78, 62, 78, -1, 78, 61, 78, -1, |
413 |
|
|
78, 52, 78, -1, 78, 50, 78, -1, 78, 51, |
414 |
|
|
78, -1, 78, 67, 78, -1, 78, 59, 78, -1, |
415 |
|
|
78, 60, 78, -1, 78, 53, 78, -1, 78, 54, |
416 |
|
|
78, -1, 78, 57, 78, -1, 78, 58, 78, -1, |
417 |
|
|
78, 55, 78, -1, 78, 56, 78, -1, 78, 47, |
418 |
|
|
78, -1, 78, 48, 78, -1, 78, 49, 78, -1, |
419 |
|
|
61, 78, -1, 70, 78, 71, -1, 78, 44, 78, |
420 |
|
|
45, 78, -1, 78, 46, 78, -1, 81, 70, 79, |
421 |
|
|
71, -1, -1, 80, -1, 78, -1, 80, 43, 80, |
422 |
|
|
-1, 16, -1 |
423 |
|
|
}; |
424 |
|
|
|
425 |
|
|
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
426 |
|
|
static const unsigned char yyrline[] = |
427 |
|
|
{ |
428 |
|
|
0, 102, 102, 103, 104, 107, 108, 109, 110, 111, |
429 |
|
|
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, |
430 |
|
|
122, 123, 124, 125, 126, 127, 128, 129, 130, 131, |
431 |
|
|
132, 135, 140, 143, 148, 152, 153, 154, 155, 156, |
432 |
|
|
157, 158, 159, 160, 161, 164, 165, 166, 167, 168, |
433 |
|
|
169, 170, 171, 172, 173, 174, 175, 176, 177, 178, |
434 |
|
|
179, 180, 181, 182, 183, 184, 185, 186, 187, 188, |
435 |
|
|
189, 190, 191, 192, 199, 205, 208, 209, 217 |
436 |
|
|
}; |
437 |
|
|
#endif |
438 |
|
|
|
439 |
|
|
#if YYDEBUG || YYERROR_VERBOSE |
440 |
|
|
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
441 |
|
|
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
442 |
|
|
static const char *const yytname[] = |
443 |
|
|
{ |
444 |
|
|
"$end", "error", "$undefined", "EVAL_INT", "EVAL_GPR", "EVAL_FPR", |
445 |
|
|
"EVAL_REG_PC", "EVAL_REG_CR", "EVAL_REG_LR", "EVAL_REG_CTR", |
446 |
|
|
"EVAL_REG_XER", "EVAL_REG_MSR", "EVAL_REG_SRR0", "EVAL_REG_SRR1", |
447 |
|
|
"EVAL_STR", "EVAL_FLOAT", "EVAL_IDENT", "EVAL_PRINT", "EVAL_SETREG", |
448 |
|
|
"EVAL_REGS", "EVAL_FLOATS", "EVAL_BREAK", "EVAL_LIST_BREAK", "EVAL_STEP", |
449 |
|
|
"EVAL_NEXT", "EVAL_CONTINUE", "EVAL_QUIT", "EVAL_E2P", |
450 |
|
|
"EVAL_INSPECT_BYTE", "EVAL_INSPECT_HALF", "EVAL_INSPECT_WORD", |
451 |
|
|
"EVAL_INSPECT_DWORD", "EVAL_INSPECT_STRING", "EVAL_INSPECT_MEM", |
452 |
|
|
"EVAL_WATCH", "EVAL_WATCH_BYTE", "EVAL_WATCH_HALF", "EVAL_WATCH_WORD", |
453 |
|
|
"EVAL_WATCH_DWORD", "EVAL_DELETE_WATCH", "EVAL_DUMP", "EVAL_DISASM", |
454 |
|
|
"EVAL_HELP", "','", "'?'", "':'", "'.'", "EVAL_LAND", "EVAL_LXOR", |
455 |
|
|
"EVAL_LOR", "'|'", "'^'", "'&'", "EVAL_EQ", "EVAL_NE", "EVAL_LT", |
456 |
|
|
"EVAL_LE", "EVAL_GT", "EVAL_GE", "EVAL_SHL", "EVAL_SHR", "'-'", "'+'", |
457 |
|
|
"'*'", "'/'", "'%'", "NEG", "EVAL_POW", "'\\n'", "'='", "'('", "')'", |
458 |
|
|
"$accept", "input", "command", "optional_scalar1", "optional_scalar2", |
459 |
|
|
"reg", "scalar", "scalarlist_or_null", "scalarlist", "identifier", 0 |
460 |
|
|
}; |
461 |
|
|
#endif |
462 |
|
|
|
463 |
|
|
# ifdef YYPRINT |
464 |
|
|
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
465 |
|
|
token YYLEX-NUM. */ |
466 |
|
|
static const unsigned short int yytoknum[] = |
467 |
|
|
{ |
468 |
|
|
0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
469 |
|
|
265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
470 |
|
|
275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
471 |
|
|
285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
472 |
|
|
295, 296, 297, 44, 63, 58, 46, 298, 299, 300, |
473 |
|
|
124, 94, 38, 301, 302, 303, 304, 305, 306, 307, |
474 |
|
|
308, 45, 43, 42, 47, 37, 309, 310, 10, 61, |
475 |
|
|
40, 41 |
476 |
|
|
}; |
477 |
|
|
# endif |
478 |
|
|
|
479 |
|
|
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
480 |
|
|
static const unsigned char yyr1[] = |
481 |
|
|
{ |
482 |
|
|
0, 72, 73, 73, 73, 74, 74, 74, 74, 74, |
483 |
|
|
74, 74, 74, 74, 74, 74, 74, 74, 74, 74, |
484 |
|
|
74, 74, 74, 74, 74, 74, 74, 74, 74, 74, |
485 |
|
|
74, 75, 75, 76, 76, 77, 77, 77, 77, 77, |
486 |
|
|
77, 77, 77, 77, 77, 78, 78, 78, 78, 78, |
487 |
|
|
78, 78, 78, 78, 78, 78, 78, 78, 78, 78, |
488 |
|
|
78, 78, 78, 78, 78, 78, 78, 78, 78, 78, |
489 |
|
|
78, 78, 78, 78, 79, 79, 80, 80, 81 |
490 |
|
|
}; |
491 |
|
|
|
492 |
|
|
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
493 |
|
|
static const unsigned char yyr2[] = |
494 |
|
|
{ |
495 |
|
|
0, 2, 1, 2, 2, 2, 1, 1, 4, 3, |
496 |
|
|
1, 2, 2, 1, 1, 2, 2, 2, 2, 2, |
497 |
|
|
2, 3, 3, 3, 3, 3, 3, 2, 3, 3, |
498 |
|
|
2, 0, 1, 0, 2, 1, 1, 1, 1, 1, |
499 |
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 3, |
500 |
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, |
501 |
|
|
3, 3, 3, 3, 3, 3, 3, 3, 3, 2, |
502 |
|
|
3, 5, 3, 4, 0, 1, 1, 3, 1 |
503 |
|
|
}; |
504 |
|
|
|
505 |
|
|
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
506 |
|
|
STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
507 |
|
|
means the default is an error. */ |
508 |
|
|
static const unsigned char yydefact[] = |
509 |
|
|
{ |
510 |
|
|
0, 45, 35, 36, 37, 38, 39, 40, 41, 42, |
511 |
|
|
43, 44, 48, 47, 78, 0, 0, 6, 7, 0, |
512 |
|
|
10, 31, 31, 13, 14, 0, 0, 0, 0, 0, |
513 |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 31, |
514 |
|
|
31, 0, 2, 0, 0, 0, 46, 0, 0, 5, |
515 |
|
|
0, 33, 11, 32, 12, 15, 16, 17, 18, 19, |
516 |
|
|
20, 33, 33, 33, 33, 33, 33, 27, 33, 33, |
517 |
|
|
30, 69, 0, 1, 3, 0, 0, 0, 0, 0, |
518 |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
519 |
|
|
0, 0, 0, 0, 0, 0, 0, 4, 74, 0, |
520 |
|
|
0, 9, 21, 22, 23, 24, 25, 26, 28, 29, |
521 |
|
|
70, 0, 72, 66, 67, 68, 55, 56, 54, 60, |
522 |
|
|
61, 64, 65, 62, 63, 58, 59, 53, 52, 49, |
523 |
|
|
50, 51, 57, 76, 0, 75, 8, 34, 0, 73, |
524 |
|
|
0, 71, 77 |
525 |
|
|
}; |
526 |
|
|
|
527 |
|
|
/* YYDEFGOTO[NTERM-NUM]. */ |
528 |
|
|
static const short int yydefgoto[] = |
529 |
|
|
{ |
530 |
|
|
-1, 44, 45, 52, 101, 46, 53, 134, 135, 48 |
531 |
|
|
}; |
532 |
|
|
|
533 |
|
|
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
534 |
|
|
STATE-NUM. */ |
535 |
|
|
#define YYPACT_NINF -70 |
536 |
|
|
static const short int yypact[] = |
537 |
|
|
{ |
538 |
|
|
138, -70, -70, -70, -70, -70, -70, -70, -70, -70, |
539 |
|
|
-70, -70, -70, -70, -70, -2, 447, -70, -70, -2, |
540 |
|
|
-70, -2, -2, -70, -70, -2, -2, -2, -2, -2, |
541 |
|
|
-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, |
542 |
|
|
-2, -2, -70, -2, 21, -46, -70, 163, -30, 235, |
543 |
|
|
-45, 189, -70, 235, -70, 235, 235, 235, 235, 235, |
544 |
|
|
235, 189, 189, 189, 189, 189, 189, 235, 189, -20, |
545 |
|
|
-70, -25, 57, -70, -70, -2, -2, -2, -2, -2, |
546 |
|
|
-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, |
547 |
|
|
-2, -2, -2, -2, -2, -2, -2, -70, -2, -2, |
548 |
|
|
-2, -70, -70, -70, -70, -70, -70, -70, -70, -70, |
549 |
|
|
-70, 213, 256, 133, 275, 293, 310, 326, 341, 356, |
550 |
|
|
370, 383, -12, 72, 2, 402, 419, -47, -47, -25, |
551 |
|
|
-25, -25, -70, 235, -17, 15, 235, 235, -2, -70, |
552 |
|
|
-2, 235, -70 |
553 |
|
|
}; |
554 |
|
|
|
555 |
|
|
/* YYPGOTO[NTERM-NUM]. */ |
556 |
|
|
static const short int yypgoto[] = |
557 |
|
|
{ |
558 |
|
|
-70, -70, -70, 17, 409, 54, 0, -70, -69, -70 |
559 |
|
|
}; |
560 |
|
|
|
561 |
|
|
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
562 |
|
|
positive, shift that token. If negative, reduce the rule which |
563 |
|
|
number is the opposite. If zero, do what YYDEFACT says. |
564 |
|
|
If YYTABLE_NINF, syntax error. */ |
565 |
|
|
#define YYTABLE_NINF -1 |
566 |
|
|
static const short int yytable[] = |
567 |
|
|
{ |
568 |
|
|
47, 1, 2, 3, 4, 5, 6, 7, 8, 9, |
569 |
|
|
10, 11, 12, 13, 14, 49, 93, 94, 95, 51, |
570 |
|
|
96, 73, 74, 100, 99, 55, 56, 57, 58, 59, |
571 |
|
|
60, 61, 62, 63, 64, 65, 66, 67, 68, 54, |
572 |
|
|
98, 71, 96, 72, -1, 87, 88, 89, 90, 91, |
573 |
|
|
92, 93, 94, 95, 139, 96, 69, 70, 140, 41, |
574 |
|
|
-1, 89, 90, 91, 92, 93, 94, 95, 43, 96, |
575 |
|
|
50, 142, 0, 0, 0, 111, 112, 113, 114, 115, |
576 |
|
|
116, 117, 118, 119, 120, 121, 122, 123, 124, 125, |
577 |
|
|
126, 127, 128, 129, 130, 131, 132, 0, 133, 136, |
578 |
|
|
137, 75, 0, 76, 77, 78, 79, 80, 81, 82, |
579 |
|
|
83, 84, 85, 86, 87, 88, 89, 90, 91, 92, |
580 |
|
|
93, 94, 95, 0, 96, 0, 0, 0, 110, -1, |
581 |
|
|
88, 89, 90, 91, 92, 93, 94, 95, 141, 96, |
582 |
|
|
133, 1, 2, 3, 4, 5, 6, 7, 8, 9, |
583 |
|
|
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, |
584 |
|
|
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, |
585 |
|
|
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, |
586 |
|
|
40, 78, 79, 80, 81, 82, 83, 84, 85, 86, |
587 |
|
|
87, 88, 89, 90, 91, 92, 93, 94, 95, 41, |
588 |
|
|
96, 0, 0, 0, 0, 0, 42, 75, 43, 76, |
589 |
|
|
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, |
590 |
|
|
87, 88, 89, 90, 91, 92, 93, 94, 95, 0, |
591 |
|
|
96, 97, 100, 75, 0, 76, 77, 78, 79, 80, |
592 |
|
|
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, |
593 |
|
|
91, 92, 93, 94, 95, 0, 96, 75, 138, 76, |
594 |
|
|
77, 78, 79, 80, 81, 82, 83, 84, 85, 86, |
595 |
|
|
87, 88, 89, 90, 91, 92, 93, 94, 95, 75, |
596 |
|
|
96, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
597 |
|
|
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, |
598 |
|
|
95, 0, 96, 77, 78, 79, 80, 81, 82, 83, |
599 |
|
|
84, 85, 86, 87, 88, 89, 90, 91, 92, 93, |
600 |
|
|
94, 95, 0, 96, 79, 80, 81, 82, 83, 84, |
601 |
|
|
85, 86, 87, 88, 89, 90, 91, 92, 93, 94, |
602 |
|
|
95, 0, 96, 80, 81, 82, 83, 84, 85, 86, |
603 |
|
|
87, 88, 89, 90, 91, 92, 93, 94, 95, 0, |
604 |
|
|
96, 81, 82, 83, 84, 85, 86, 87, 88, 89, |
605 |
|
|
90, 91, 92, 93, 94, 95, 0, 96, 82, 83, |
606 |
|
|
84, 85, 86, 87, 88, 89, 90, 91, 92, 93, |
607 |
|
|
94, 95, 0, 96, 83, 84, 85, 86, 87, 88, |
608 |
|
|
89, 90, 91, 92, 93, 94, 95, 0, 96, -1, |
609 |
|
|
84, 85, 86, 87, 88, 89, 90, 91, 92, 93, |
610 |
|
|
94, 95, 0, 96, -1, 85, 86, 87, 88, 89, |
611 |
|
|
90, 91, 92, 93, 94, 95, 0, 96, -1, 86, |
612 |
|
|
87, 88, 89, 90, 91, 92, 93, 94, 95, 0, |
613 |
|
|
96, 2, 3, 4, 5, 6, 7, 8, 9, 10, |
614 |
|
|
11, -1, 90, 91, 92, 93, 94, 95, 0, 96, |
615 |
|
|
102, 103, 104, 105, 106, 107, 0, 108, 109, -1, |
616 |
|
|
91, 92, 93, 94, 95, 0, 96 |
617 |
|
|
}; |
618 |
|
|
|
619 |
|
|
static const short int yycheck[] = |
620 |
|
|
{ |
621 |
|
|
0, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
622 |
|
|
12, 13, 14, 15, 16, 15, 63, 64, 65, 19, |
623 |
|
|
67, 0, 68, 43, 69, 25, 26, 27, 28, 29, |
624 |
|
|
30, 31, 32, 33, 34, 35, 36, 37, 38, 22, |
625 |
|
|
70, 41, 67, 43, 56, 57, 58, 59, 60, 61, |
626 |
|
|
62, 63, 64, 65, 71, 67, 39, 40, 43, 61, |
627 |
|
|
58, 59, 60, 61, 62, 63, 64, 65, 70, 67, |
628 |
|
|
16, 140, -1, -1, -1, 75, 76, 77, 78, 79, |
629 |
|
|
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, |
630 |
|
|
90, 91, 92, 93, 94, 95, 96, -1, 98, 99, |
631 |
|
|
100, 44, -1, 46, 47, 48, 49, 50, 51, 52, |
632 |
|
|
53, 54, 55, 56, 57, 58, 59, 60, 61, 62, |
633 |
|
|
63, 64, 65, -1, 67, -1, -1, -1, 71, 57, |
634 |
|
|
58, 59, 60, 61, 62, 63, 64, 65, 138, 67, |
635 |
|
|
140, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
636 |
|
|
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
637 |
|
|
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, |
638 |
|
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, |
639 |
|
|
42, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
640 |
|
|
57, 58, 59, 60, 61, 62, 63, 64, 65, 61, |
641 |
|
|
67, -1, -1, -1, -1, -1, 68, 44, 70, 46, |
642 |
|
|
47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
643 |
|
|
57, 58, 59, 60, 61, 62, 63, 64, 65, -1, |
644 |
|
|
67, 68, 43, 44, -1, 46, 47, 48, 49, 50, |
645 |
|
|
51, 52, 53, 54, 55, 56, 57, 58, 59, 60, |
646 |
|
|
61, 62, 63, 64, 65, -1, 67, 44, 45, 46, |
647 |
|
|
47, 48, 49, 50, 51, 52, 53, 54, 55, 56, |
648 |
|
|
57, 58, 59, 60, 61, 62, 63, 64, 65, 44, |
649 |
|
|
67, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
650 |
|
|
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
651 |
|
|
65, -1, 67, 47, 48, 49, 50, 51, 52, 53, |
652 |
|
|
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, |
653 |
|
|
64, 65, -1, 67, 49, 50, 51, 52, 53, 54, |
654 |
|
|
55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
655 |
|
|
65, -1, 67, 50, 51, 52, 53, 54, 55, 56, |
656 |
|
|
57, 58, 59, 60, 61, 62, 63, 64, 65, -1, |
657 |
|
|
67, 51, 52, 53, 54, 55, 56, 57, 58, 59, |
658 |
|
|
60, 61, 62, 63, 64, 65, -1, 67, 52, 53, |
659 |
|
|
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, |
660 |
|
|
64, 65, -1, 67, 53, 54, 55, 56, 57, 58, |
661 |
|
|
59, 60, 61, 62, 63, 64, 65, -1, 67, 53, |
662 |
|
|
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, |
663 |
|
|
64, 65, -1, 67, 54, 55, 56, 57, 58, 59, |
664 |
|
|
60, 61, 62, 63, 64, 65, -1, 67, 55, 56, |
665 |
|
|
57, 58, 59, 60, 61, 62, 63, 64, 65, -1, |
666 |
|
|
67, 4, 5, 6, 7, 8, 9, 10, 11, 12, |
667 |
|
|
13, 59, 60, 61, 62, 63, 64, 65, -1, 67, |
668 |
|
|
61, 62, 63, 64, 65, 66, -1, 68, 69, 60, |
669 |
|
|
61, 62, 63, 64, 65, -1, 67 |
670 |
|
|
}; |
671 |
|
|
|
672 |
|
|
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
673 |
|
|
symbol of state STATE-NUM. */ |
674 |
|
|
static const unsigned char yystos[] = |
675 |
|
|
{ |
676 |
|
|
0, 3, 4, 5, 6, 7, 8, 9, 10, 11, |
677 |
|
|
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, |
678 |
|
|
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, |
679 |
|
|
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, |
680 |
|
|
42, 61, 68, 70, 73, 74, 77, 78, 81, 78, |
681 |
|
|
77, 78, 75, 78, 75, 78, 78, 78, 78, 78, |
682 |
|
|
78, 78, 78, 78, 78, 78, 78, 78, 78, 75, |
683 |
|
|
75, 78, 78, 0, 68, 44, 46, 47, 48, 49, |
684 |
|
|
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, |
685 |
|
|
60, 61, 62, 63, 64, 65, 67, 68, 70, 69, |
686 |
|
|
43, 76, 76, 76, 76, 76, 76, 76, 76, 76, |
687 |
|
|
71, 78, 78, 78, 78, 78, 78, 78, 78, 78, |
688 |
|
|
78, 78, 78, 78, 78, 78, 78, 78, 78, 78, |
689 |
|
|
78, 78, 78, 78, 79, 80, 78, 78, 45, 71, |
690 |
|
|
43, 78, 80 |
691 |
|
|
}; |
692 |
|
|
|
693 |
|
|
#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) |
694 |
|
|
# define YYSIZE_T __SIZE_TYPE__ |
695 |
|
|
#endif |
696 |
|
|
#if ! defined (YYSIZE_T) && defined (size_t) |
697 |
|
|
# define YYSIZE_T size_t |
698 |
|
|
#endif |
699 |
|
|
#if ! defined (YYSIZE_T) |
700 |
|
|
# if defined (__STDC__) || defined (__cplusplus) |
701 |
|
|
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
702 |
|
|
# define YYSIZE_T size_t |
703 |
|
|
# endif |
704 |
|
|
#endif |
705 |
|
|
#if ! defined (YYSIZE_T) |
706 |
|
|
# define YYSIZE_T unsigned int |
707 |
|
|
#endif |
708 |
|
|
|
709 |
|
|
#define yyerrok (yyerrstatus = 0) |
710 |
|
|
#define yyclearin (yychar = YYEMPTY) |
711 |
|
|
#define YYEMPTY (-2) |
712 |
|
|
#define YYEOF 0 |
713 |
|
|
|
714 |
|
|
#define YYACCEPT goto yyacceptlab |
715 |
|
|
#define YYABORT goto yyabortlab |
716 |
|
|
#define YYERROR goto yyerrorlab |
717 |
|
|
|
718 |
|
|
|
719 |
|
|
/* Like YYERROR except do call yyerror. This remains here temporarily |
720 |
|
|
to ease the transition to the new meaning of YYERROR, for GCC. |
721 |
|
|
Once GCC version 2 has supplanted version 1, this can go. */ |
722 |
|
|
|
723 |
|
|
#define YYFAIL goto yyerrlab |
724 |
|
|
|
725 |
|
|
#define YYRECOVERING() (!!yyerrstatus) |
726 |
|
|
|
727 |
|
|
#define YYBACKUP(Token, Value) \ |
728 |
|
|
do \ |
729 |
|
|
if (yychar == YYEMPTY && yylen == 1) \ |
730 |
|
|
{ \ |
731 |
|
|
yychar = (Token); \ |
732 |
|
|
yylval = (Value); \ |
733 |
|
|
yytoken = YYTRANSLATE (yychar); \ |
734 |
|
|
YYPOPSTACK; \ |
735 |
|
|
goto yybackup; \ |
736 |
|
|
} \ |
737 |
|
|
else \ |
738 |
|
|
{ \ |
739 |
|
|
yyerror ("syntax error: cannot back up");\ |
740 |
|
|
YYERROR; \ |
741 |
|
|
} \ |
742 |
|
|
while (0) |
743 |
|
|
|
744 |
|
|
#define YYTERROR 1 |
745 |
|
|
#define YYERRCODE 256 |
746 |
|
|
|
747 |
|
|
/* YYLLOC_DEFAULT -- Compute the default location (before the actions |
748 |
|
|
are run). */ |
749 |
|
|
|
750 |
|
|
#ifndef YYLLOC_DEFAULT |
751 |
|
|
# define YYLLOC_DEFAULT(Current, Rhs, N) \ |
752 |
|
|
((Current).first_line = (Rhs)[1].first_line, \ |
753 |
|
|
(Current).first_column = (Rhs)[1].first_column, \ |
754 |
|
|
(Current).last_line = (Rhs)[N].last_line, \ |
755 |
|
|
(Current).last_column = (Rhs)[N].last_column) |
756 |
|
|
#endif |
757 |
|
|
|
758 |
|
|
/* YYLEX -- calling `yylex' with the right arguments. */ |
759 |
|
|
|
760 |
|
|
#ifdef YYLEX_PARAM |
761 |
|
|
# define YYLEX yylex (&yylval, YYLEX_PARAM) |
762 |
|
|
#else |
763 |
|
|
# define YYLEX yylex (&yylval) |
764 |
|
|
#endif |
765 |
|
|
|
766 |
|
|
/* Enable debugging if requested. */ |
767 |
|
|
#if YYDEBUG |
768 |
|
|
|
769 |
|
|
# ifndef YYFPRINTF |
770 |
|
|
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
771 |
|
|
# define YYFPRINTF fprintf |
772 |
|
|
# endif |
773 |
|
|
|
774 |
|
|
# define YYDPRINTF(Args) \ |
775 |
|
|
do { \ |
776 |
|
|
if (yydebug) \ |
777 |
|
|
YYFPRINTF Args; \ |
778 |
|
|
} while (0) |
779 |
|
|
|
780 |
|
|
# define YYDSYMPRINT(Args) \ |
781 |
|
|
do { \ |
782 |
|
|
if (yydebug) \ |
783 |
|
|
yysymprint Args; \ |
784 |
|
|
} while (0) |
785 |
|
|
|
786 |
|
|
# define YYDSYMPRINTF(Title, Token, Value, Location) \ |
787 |
|
|
do { \ |
788 |
|
|
if (yydebug) \ |
789 |
|
|
{ \ |
790 |
|
|
YYFPRINTF (stderr, "%s ", Title); \ |
791 |
|
|
yysymprint (stderr, \ |
792 |
|
|
Token, Value); \ |
793 |
|
|
YYFPRINTF (stderr, "\n"); \ |
794 |
|
|
} \ |
795 |
|
|
} while (0) |
796 |
|
|
|
797 |
|
|
/*------------------------------------------------------------------. |
798 |
|
|
| yy_stack_print -- Print the state stack from its BOTTOM up to its | |
799 |
|
|
| TOP (included). | |
800 |
|
|
`------------------------------------------------------------------*/ |
801 |
|
|
|
802 |
|
|
#if defined (__STDC__) || defined (__cplusplus) |
803 |
|
|
static void |
804 |
|
|
yy_stack_print (short int *bottom, short int *top) |
805 |
|
|
#else |
806 |
|
|
static void |
807 |
|
|
yy_stack_print (bottom, top) |
808 |
|
|
short int *bottom; |
809 |
|
|
short int *top; |
810 |
|
|
#endif |
811 |
|
|
{ |
812 |
|
|
YYFPRINTF (stderr, "Stack now"); |
813 |
|
|
for (/* Nothing. */; bottom <= top; ++bottom) |
814 |
|
|
YYFPRINTF (stderr, " %d", *bottom); |
815 |
|
|
YYFPRINTF (stderr, "\n"); |
816 |
|
|
} |
817 |
|
|
|
818 |
|
|
# define YY_STACK_PRINT(Bottom, Top) \ |
819 |
|
|
do { \ |
820 |
|
|
if (yydebug) \ |
821 |
|
|
yy_stack_print ((Bottom), (Top)); \ |
822 |
|
|
} while (0) |
823 |
|
|
|
824 |
|
|
|
825 |
|
|
/*------------------------------------------------. |
826 |
|
|
| Report that the YYRULE is going to be reduced. | |
827 |
|
|
`------------------------------------------------*/ |
828 |
|
|
|
829 |
|
|
#if defined (__STDC__) || defined (__cplusplus) |
830 |
|
|
static void |
831 |
|
|
yy_reduce_print (int yyrule) |
832 |
|
|
#else |
833 |
|
|
static void |
834 |
|
|
yy_reduce_print (yyrule) |
835 |
|
|
int yyrule; |
836 |
|
|
#endif |
837 |
|
|
{ |
838 |
|
|
int yyi; |
839 |
|
|
unsigned int yylno = yyrline[yyrule]; |
840 |
|
|
YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", |
841 |
|
|
yyrule - 1, yylno); |
842 |
|
|
/* Print the symbols being reduced, and their result. */ |
843 |
|
|
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) |
844 |
|
|
YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); |
845 |
|
|
YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); |
846 |
|
|
} |
847 |
|
|
|
848 |
|
|
# define YY_REDUCE_PRINT(Rule) \ |
849 |
|
|
do { \ |
850 |
|
|
if (yydebug) \ |
851 |
|
|
yy_reduce_print (Rule); \ |
852 |
|
|
} while (0) |
853 |
|
|
|
854 |
|
|
/* Nonzero means print parse trace. It is left uninitialized so that |
855 |
|
|
multiple parsers can coexist. */ |
856 |
|
|
int yydebug; |
857 |
|
|
#else /* !YYDEBUG */ |
858 |
|
|
# define YYDPRINTF(Args) |
859 |
|
|
# define YYDSYMPRINT(Args) |
860 |
|
|
# define YYDSYMPRINTF(Title, Token, Value, Location) |
861 |
|
|
# define YY_STACK_PRINT(Bottom, Top) |
862 |
|
|
# define YY_REDUCE_PRINT(Rule) |
863 |
|
|
#endif /* !YYDEBUG */ |
864 |
|
|
|
865 |
|
|
|
866 |
|
|
/* YYINITDEPTH -- initial size of the parser's stacks. */ |
867 |
|
|
#ifndef YYINITDEPTH |
868 |
|
|
# define YYINITDEPTH 200 |
869 |
|
|
#endif |
870 |
|
|
|
871 |
|
|
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
872 |
|
|
if the built-in stack extension method is used). |
873 |
|
|
|
874 |
|
|
Do not make this value too large; the results are undefined if |
875 |
|
|
SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) |
876 |
|
|
evaluated with infinite-precision integer arithmetic. */ |
877 |
|
|
|
878 |
|
|
#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 |
879 |
|
|
# undef YYMAXDEPTH |
880 |
|
|
#endif |
881 |
|
|
|
882 |
|
|
#ifndef YYMAXDEPTH |
883 |
|
|
# define YYMAXDEPTH 10000 |
884 |
|
|
#endif |
885 |
|
|
|
886 |
|
|
|
887 |
|
|
|
888 |
|
|
#if YYERROR_VERBOSE |
889 |
|
|
|
890 |
|
|
# ifndef yystrlen |
891 |
|
|
# if defined (__GLIBC__) && defined (_STRING_H) |
892 |
|
|
# define yystrlen strlen |
893 |
|
|
# else |
894 |
|
|
/* Return the length of YYSTR. */ |
895 |
|
|
static YYSIZE_T |
896 |
|
|
# if defined (__STDC__) || defined (__cplusplus) |
897 |
|
|
yystrlen (const char *yystr) |
898 |
|
|
# else |
899 |
|
|
yystrlen (yystr) |
900 |
|
|
const char *yystr; |
901 |
|
|
# endif |
902 |
|
|
{ |
903 |
|
|
register const char *yys = yystr; |
904 |
|
|
|
905 |
|
|
while (*yys++ != '\0') |
906 |
|
|
continue; |
907 |
|
|
|
908 |
|
|
return yys - yystr - 1; |
909 |
|
|
} |
910 |
|
|
# endif |
911 |
|
|
# endif |
912 |
|
|
|
913 |
|
|
# ifndef yystpcpy |
914 |
|
|
# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) |
915 |
|
|
# define yystpcpy stpcpy |
916 |
|
|
# else |
917 |
|
|
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
918 |
|
|
YYDEST. */ |
919 |
|
|
static char * |
920 |
|
|
# if defined (__STDC__) || defined (__cplusplus) |
921 |
|
|
yystpcpy (char *yydest, const char *yysrc) |
922 |
|
|
# else |
923 |
|
|
yystpcpy (yydest, yysrc) |
924 |
|
|
char *yydest; |
925 |
|
|
const char *yysrc; |
926 |
|
|
# endif |
927 |
|
|
{ |
928 |
|
|
register char *yyd = yydest; |
929 |
|
|
register const char *yys = yysrc; |
930 |
|
|
|
931 |
|
|
while ((*yyd++ = *yys++) != '\0') |
932 |
|
|
continue; |
933 |
|
|
|
934 |
|
|
return yyd - 1; |
935 |
|
|
} |
936 |
|
|
# endif |
937 |
|
|
# endif |
938 |
|
|
|
939 |
|
|
#endif /* !YYERROR_VERBOSE */ |
940 |
|
|
|
941 |
|
|
|
942 |
|
|
|
943 |
|
|
#if YYDEBUG |
944 |
|
|
/*--------------------------------. |
945 |
|
|
| Print this symbol on YYOUTPUT. | |
946 |
|
|
`--------------------------------*/ |
947 |
|
|
|
948 |
|
|
#if defined (__STDC__) || defined (__cplusplus) |
949 |
|
|
static void |
950 |
|
|
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) |
951 |
|
|
#else |
952 |
|
|
static void |
953 |
|
|
yysymprint (yyoutput, yytype, yyvaluep) |
954 |
|
|
FILE *yyoutput; |
955 |
|
|
int yytype; |
956 |
|
|
YYSTYPE *yyvaluep; |
957 |
|
|
#endif |
958 |
|
|
{ |
959 |
|
|
/* Pacify ``unused variable'' warnings. */ |
960 |
|
|
(void) yyvaluep; |
961 |
|
|
|
962 |
|
|
if (yytype < YYNTOKENS) |
963 |
|
|
{ |
964 |
|
|
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
965 |
|
|
# ifdef YYPRINT |
966 |
|
|
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
967 |
|
|
# endif |
968 |
|
|
} |
969 |
|
|
else |
970 |
|
|
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
971 |
|
|
|
972 |
|
|
switch (yytype) |
973 |
|
|
{ |
974 |
|
|
default: |
975 |
|
|
break; |
976 |
|
|
} |
977 |
|
|
YYFPRINTF (yyoutput, ")"); |
978 |
|
|
} |
979 |
|
|
|
980 |
|
|
#endif /* ! YYDEBUG */ |
981 |
|
|
/*-----------------------------------------------. |
982 |
|
|
| Release the memory associated to this symbol. | |
983 |
|
|
`-----------------------------------------------*/ |
984 |
|
|
|
985 |
|
|
#if defined (__STDC__) || defined (__cplusplus) |
986 |
|
|
static void |
987 |
|
|
yydestruct (int yytype, YYSTYPE *yyvaluep) |
988 |
|
|
#else |
989 |
|
|
static void |
990 |
|
|
yydestruct (yytype, yyvaluep) |
991 |
|
|
int yytype; |
992 |
|
|
YYSTYPE *yyvaluep; |
993 |
|
|
#endif |
994 |
|
|
{ |
995 |
|
|
/* Pacify ``unused variable'' warnings. */ |
996 |
|
|
(void) yyvaluep; |
997 |
|
|
|
998 |
|
|
switch (yytype) |
999 |
|
|
{ |
1000 |
|
|
|
1001 |
|
|
default: |
1002 |
|
|
break; |
1003 |
|
|
} |
1004 |
|
|
} |
1005 |
|
|
|
1006 |
|
|
|
1007 |
|
|
/* Prevent warnings from -Wmissing-prototypes. */ |
1008 |
|
|
|
1009 |
|
|
#ifdef YYPARSE_PARAM |
1010 |
|
|
# if defined (__STDC__) || defined (__cplusplus) |
1011 |
|
|
int yyparse (void *YYPARSE_PARAM); |
1012 |
|
|
# else |
1013 |
|
|
int yyparse (); |
1014 |
|
|
# endif |
1015 |
|
|
#else /* ! YYPARSE_PARAM */ |
1016 |
|
|
#if defined (__STDC__) || defined (__cplusplus) |
1017 |
|
|
int yyparse (void); |
1018 |
|
|
#else |
1019 |
|
|
int yyparse (); |
1020 |
|
|
#endif |
1021 |
|
|
#endif /* ! YYPARSE_PARAM */ |
1022 |
|
|
|
1023 |
|
|
|
1024 |
|
|
|
1025 |
|
|
|
1026 |
|
|
|
1027 |
|
|
|
1028 |
|
|
/*----------. |
1029 |
|
|
| yyparse. | |
1030 |
|
|
`----------*/ |
1031 |
|
|
|
1032 |
|
|
#ifdef YYPARSE_PARAM |
1033 |
|
|
# if defined (__STDC__) || defined (__cplusplus) |
1034 |
|
|
int yyparse (void *YYPARSE_PARAM) |
1035 |
|
|
# else |
1036 |
|
|
int yyparse (YYPARSE_PARAM) |
1037 |
|
|
void *YYPARSE_PARAM; |
1038 |
|
|
# endif |
1039 |
|
|
#else /* ! YYPARSE_PARAM */ |
1040 |
|
|
#if defined (__STDC__) || defined (__cplusplus) |
1041 |
|
|
int |
1042 |
|
|
yyparse (void) |
1043 |
|
|
#else |
1044 |
|
|
int |
1045 |
|
|
yyparse () |
1046 |
|
|
|
1047 |
|
|
#endif |
1048 |
|
|
#endif |
1049 |
|
|
{ |
1050 |
|
|
/* The lookahead symbol. */ |
1051 |
|
|
int yychar; |
1052 |
|
|
|
1053 |
|
|
/* The semantic value of the lookahead symbol. */ |
1054 |
|
|
YYSTYPE yylval; |
1055 |
|
|
|
1056 |
|
|
/* Number of syntax errors so far. */ |
1057 |
|
|
int yynerrs; |
1058 |
|
|
|
1059 |
|
|
register int yystate; |
1060 |
|
|
register int yyn; |
1061 |
|
|
int yyresult; |
1062 |
|
|
/* Number of tokens to shift before error messages enabled. */ |
1063 |
|
|
int yyerrstatus; |
1064 |
|
|
/* Lookahead token as an internal (translated) token number. */ |
1065 |
|
|
int yytoken = 0; |
1066 |
|
|
|
1067 |
|
|
/* Three stacks and their tools: |
1068 |
|
|
`yyss': related to states, |
1069 |
|
|
`yyvs': related to semantic values, |
1070 |
|
|
`yyls': related to locations. |
1071 |
|
|
|
1072 |
|
|
Refer to the stacks thru separate pointers, to allow yyoverflow |
1073 |
|
|
to reallocate them elsewhere. */ |
1074 |
|
|
|
1075 |
|
|
/* The state stack. */ |
1076 |
|
|
short int yyssa[YYINITDEPTH]; |
1077 |
|
|
short int *yyss = yyssa; |
1078 |
|
|
register short int *yyssp; |
1079 |
|
|
|
1080 |
|
|
/* The semantic value stack. */ |
1081 |
|
|
YYSTYPE yyvsa[YYINITDEPTH]; |
1082 |
|
|
YYSTYPE *yyvs = yyvsa; |
1083 |
|
|
register YYSTYPE *yyvsp; |
1084 |
|
|
|
1085 |
|
|
|
1086 |
|
|
|
1087 |
|
|
#define YYPOPSTACK (yyvsp--, yyssp--) |
1088 |
|
|
|
1089 |
|
|
YYSIZE_T yystacksize = YYINITDEPTH; |
1090 |
|
|
|
1091 |
|
|
/* The variables used to return semantic value and location from the |
1092 |
|
|
action routines. */ |
1093 |
|
|
YYSTYPE yyval; |
1094 |
|
|
|
1095 |
|
|
|
1096 |
|
|
/* When reducing, the number of symbols on the RHS of the reduced |
1097 |
|
|
rule. */ |
1098 |
|
|
int yylen; |
1099 |
|
|
|
1100 |
|
|
YYDPRINTF ((stderr, "Starting parse\n")); |
1101 |
|
|
|
1102 |
|
|
yystate = 0; |
1103 |
|
|
yyerrstatus = 0; |
1104 |
|
|
yynerrs = 0; |
1105 |
|
|
yychar = YYEMPTY; /* Cause a token to be read. */ |
1106 |
|
|
|
1107 |
|
|
/* Initialize stack pointers. |
1108 |
|
|
Waste one element of value and location stack |
1109 |
|
|
so that they stay on the same level as the state stack. |
1110 |
|
|
The wasted elements are never initialized. */ |
1111 |
|
|
|
1112 |
|
|
yyssp = yyss; |
1113 |
|
|
yyvsp = yyvs; |
1114 |
|
|
|
1115 |
|
|
|
1116 |
|
|
goto yysetstate; |
1117 |
|
|
|
1118 |
|
|
/*------------------------------------------------------------. |
1119 |
|
|
| yynewstate -- Push a new state, which is found in yystate. | |
1120 |
|
|
`------------------------------------------------------------*/ |
1121 |
|
|
yynewstate: |
1122 |
|
|
/* In all cases, when you get here, the value and location stacks |
1123 |
|
|
have just been pushed. so pushing a state here evens the stacks. |
1124 |
|
|
*/ |
1125 |
|
|
yyssp++; |
1126 |
|
|
|
1127 |
|
|
yysetstate: |
1128 |
|
|
*yyssp = yystate; |
1129 |
|
|
|
1130 |
|
|
if (yyss + yystacksize - 1 <= yyssp) |
1131 |
|
|
{ |
1132 |
|
|
/* Get the current used size of the three stacks, in elements. */ |
1133 |
|
|
YYSIZE_T yysize = yyssp - yyss + 1; |
1134 |
|
|
|
1135 |
|
|
#ifdef yyoverflow |
1136 |
|
|
{ |
1137 |
|
|
/* Give user a chance to reallocate the stack. Use copies of |
1138 |
|
|
these so that the &'s don't force the real ones into |
1139 |
|
|
memory. */ |
1140 |
|
|
YYSTYPE *yyvs1 = yyvs; |
1141 |
|
|
short int *yyss1 = yyss; |
1142 |
|
|
|
1143 |
|
|
|
1144 |
|
|
/* Each stack pointer address is followed by the size of the |
1145 |
|
|
data in use in that stack, in bytes. This used to be a |
1146 |
|
|
conditional around just the two extra args, but that might |
1147 |
|
|
be undefined if yyoverflow is a macro. */ |
1148 |
|
|
yyoverflow ("parser stack overflow", |
1149 |
|
|
&yyss1, yysize * sizeof (*yyssp), |
1150 |
|
|
&yyvs1, yysize * sizeof (*yyvsp), |
1151 |
|
|
|
1152 |
|
|
&yystacksize); |
1153 |
|
|
|
1154 |
|
|
yyss = yyss1; |
1155 |
|
|
yyvs = yyvs1; |
1156 |
|
|
} |
1157 |
|
|
#else /* no yyoverflow */ |
1158 |
|
|
# ifndef YYSTACK_RELOCATE |
1159 |
|
|
goto yyoverflowlab; |
1160 |
|
|
# else |
1161 |
|
|
/* Extend the stack our own way. */ |
1162 |
|
|
if (YYMAXDEPTH <= yystacksize) |
1163 |
|
|
goto yyoverflowlab; |
1164 |
|
|
yystacksize *= 2; |
1165 |
|
|
if (YYMAXDEPTH < yystacksize) |
1166 |
|
|
yystacksize = YYMAXDEPTH; |
1167 |
|
|
|
1168 |
|
|
{ |
1169 |
|
|
short int *yyss1 = yyss; |
1170 |
|
|
union yyalloc *yyptr = |
1171 |
|
|
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
1172 |
|
|
if (! yyptr) |
1173 |
|
|
goto yyoverflowlab; |
1174 |
|
|
YYSTACK_RELOCATE (yyss); |
1175 |
|
|
YYSTACK_RELOCATE (yyvs); |
1176 |
|
|
|
1177 |
|
|
# undef YYSTACK_RELOCATE |
1178 |
|
|
if (yyss1 != yyssa) |
1179 |
|
|
YYSTACK_FREE (yyss1); |
1180 |
|
|
} |
1181 |
|
|
# endif |
1182 |
|
|
#endif /* no yyoverflow */ |
1183 |
|
|
|
1184 |
|
|
yyssp = yyss + yysize - 1; |
1185 |
|
|
yyvsp = yyvs + yysize - 1; |
1186 |
|
|
|
1187 |
|
|
|
1188 |
|
|
YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
1189 |
|
|
(unsigned long int) yystacksize)); |
1190 |
|
|
|
1191 |
|
|
if (yyss + yystacksize - 1 <= yyssp) |
1192 |
|
|
YYABORT; |
1193 |
|
|
} |
1194 |
|
|
|
1195 |
|
|
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
1196 |
|
|
|
1197 |
|
|
goto yybackup; |
1198 |
|
|
|
1199 |
|
|
/*-----------. |
1200 |
|
|
| yybackup. | |
1201 |
|
|
`-----------*/ |
1202 |
|
|
yybackup: |
1203 |
|
|
|
1204 |
|
|
/* Do appropriate processing given the current state. */ |
1205 |
|
|
/* Read a lookahead token if we need one and don't already have one. */ |
1206 |
|
|
/* yyresume: */ |
1207 |
|
|
|
1208 |
|
|
/* First try to decide what to do without reference to lookahead token. */ |
1209 |
|
|
|
1210 |
|
|
yyn = yypact[yystate]; |
1211 |
|
|
if (yyn == YYPACT_NINF) |
1212 |
|
|
goto yydefault; |
1213 |
|
|
|
1214 |
|
|
/* Not known => get a lookahead token if don't already have one. */ |
1215 |
|
|
|
1216 |
|
|
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
1217 |
|
|
if (yychar == YYEMPTY) |
1218 |
|
|
{ |
1219 |
|
|
YYDPRINTF ((stderr, "Reading a token: ")); |
1220 |
|
|
yychar = YYLEX; |
1221 |
|
|
} |
1222 |
|
|
|
1223 |
|
|
if (yychar <= YYEOF) |
1224 |
|
|
{ |
1225 |
|
|
yychar = yytoken = YYEOF; |
1226 |
|
|
YYDPRINTF ((stderr, "Now at end of input.\n")); |
1227 |
|
|
} |
1228 |
|
|
else |
1229 |
|
|
{ |
1230 |
|
|
yytoken = YYTRANSLATE (yychar); |
1231 |
|
|
YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); |
1232 |
|
|
} |
1233 |
|
|
|
1234 |
|
|
/* If the proper action on seeing token YYTOKEN is to reduce or to |
1235 |
|
|
detect an error, take that action. */ |
1236 |
|
|
yyn += yytoken; |
1237 |
|
|
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
1238 |
|
|
goto yydefault; |
1239 |
|
|
yyn = yytable[yyn]; |
1240 |
|
|
if (yyn <= 0) |
1241 |
|
|
{ |
1242 |
|
|
if (yyn == 0 || yyn == YYTABLE_NINF) |
1243 |
|
|
goto yyerrlab; |
1244 |
|
|
yyn = -yyn; |
1245 |
|
|
goto yyreduce; |
1246 |
|
|
} |
1247 |
|
|
|
1248 |
|
|
if (yyn == YYFINAL) |
1249 |
|
|
YYACCEPT; |
1250 |
|
|
|
1251 |
|
|
/* Shift the lookahead token. */ |
1252 |
|
|
YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); |
1253 |
|
|
|
1254 |
|
|
/* Discard the token being shifted unless it is eof. */ |
1255 |
|
|
if (yychar != YYEOF) |
1256 |
|
|
yychar = YYEMPTY; |
1257 |
|
|
|
1258 |
|
|
*++yyvsp = yylval; |
1259 |
|
|
|
1260 |
|
|
|
1261 |
|
|
/* Count tokens shifted since error; after three, turn off error |
1262 |
|
|
status. */ |
1263 |
|
|
if (yyerrstatus) |
1264 |
|
|
yyerrstatus--; |
1265 |
|
|
|
1266 |
|
|
yystate = yyn; |
1267 |
|
|
goto yynewstate; |
1268 |
|
|
|
1269 |
|
|
|
1270 |
|
|
/*-----------------------------------------------------------. |
1271 |
|
|
| yydefault -- do the default action for the current state. | |
1272 |
|
|
`-----------------------------------------------------------*/ |
1273 |
|
|
yydefault: |
1274 |
|
|
yyn = yydefact[yystate]; |
1275 |
|
|
if (yyn == 0) |
1276 |
|
|
goto yyerrlab; |
1277 |
|
|
goto yyreduce; |
1278 |
|
|
|
1279 |
|
|
|
1280 |
|
|
/*-----------------------------. |
1281 |
|
|
| yyreduce -- Do a reduction. | |
1282 |
|
|
`-----------------------------*/ |
1283 |
|
|
yyreduce: |
1284 |
|
|
/* yyn is the number of a rule to reduce with. */ |
1285 |
|
|
yylen = yyr2[yyn]; |
1286 |
|
|
|
1287 |
|
|
/* If YYLEN is nonzero, implement the default value of the action: |
1288 |
|
|
`$$ = $1'. |
1289 |
|
|
|
1290 |
|
|
Otherwise, the following line sets YYVAL to garbage. |
1291 |
|
|
This behavior is undocumented and Bison |
1292 |
|
|
users should not rely upon it. Assigning to YYVAL |
1293 |
|
|
unconditionally makes the parser a bit smaller, and it avoids a |
1294 |
|
|
GCC warning that YYVAL may be used uninitialized. */ |
1295 |
|
|
yyval = yyvsp[1-yylen]; |
1296 |
|
|
|
1297 |
|
|
|
1298 |
|
|
YY_REDUCE_PRINT (yyn); |
1299 |
|
|
switch (yyn) |
1300 |
|
|
{ |
1301 |
|
|
case 2: |
1302 |
|
|
#line 102 "debugparse.y" |
1303 |
|
|
{ create_command((struct eval_command*)resultptr, COMMAND_NOP, 0); } |
1304 |
|
|
break; |
1305 |
|
|
|
1306 |
|
|
case 3: |
1307 |
|
|
#line 103 "debugparse.y" |
1308 |
|
|
{ *(struct eval_command*)resultptr = yyvsp[-1].command; } |
1309 |
|
|
break; |
1310 |
|
|
|
1311 |
|
|
case 4: |
1312 |
|
|
#line 104 "debugparse.y" |
1313 |
|
|
{ create_command((struct eval_command*)resultptr, COMMAND_PRINT, 1, &yyvsp[-1].scalar); } |
1314 |
|
|
break; |
1315 |
|
|
|
1316 |
|
|
case 5: |
1317 |
|
|
#line 107 "debugparse.y" |
1318 |
|
|
{ create_command(&yyval.command, COMMAND_PRINT, 1, &yyvsp[0].scalar); } |
1319 |
|
|
break; |
1320 |
|
|
|
1321 |
|
|
case 6: |
1322 |
|
|
#line 108 "debugparse.y" |
1323 |
|
|
{ create_command(&yyval.command, COMMAND_REGS, 0); } |
1324 |
|
|
break; |
1325 |
|
|
|
1326 |
|
|
case 7: |
1327 |
|
|
#line 109 "debugparse.y" |
1328 |
|
|
{ create_command(&yyval.command, COMMAND_FLOATS, 0); } |
1329 |
|
|
break; |
1330 |
|
|
|
1331 |
|
|
case 8: |
1332 |
|
|
#line 110 "debugparse.y" |
1333 |
|
|
{ create_command(&yyval.command, COMMAND_SETREG, 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1334 |
|
|
break; |
1335 |
|
|
|
1336 |
|
|
case 9: |
1337 |
|
|
#line 111 "debugparse.y" |
1338 |
|
|
{ create_command(&yyval.command, COMMAND_BREAK, 2, &yyvsp[-1].scalar, &yyvsp[0].scalar); } |
1339 |
|
|
break; |
1340 |
|
|
|
1341 |
|
|
case 10: |
1342 |
|
|
#line 112 "debugparse.y" |
1343 |
|
|
{ create_command(&yyval.command, COMMAND_LIST_BREAK, 0); } |
1344 |
|
|
break; |
1345 |
|
|
|
1346 |
|
|
case 11: |
1347 |
|
|
#line 113 "debugparse.y" |
1348 |
|
|
{ create_command(&yyval.command, COMMAND_STEP, 1, &yyvsp[0].scalar); } |
1349 |
|
|
break; |
1350 |
|
|
|
1351 |
|
|
case 12: |
1352 |
|
|
#line 114 "debugparse.y" |
1353 |
|
|
{ create_command(&yyval.command, COMMAND_NEXT, 1, &yyvsp[0].scalar); } |
1354 |
|
|
break; |
1355 |
|
|
|
1356 |
|
|
case 13: |
1357 |
|
|
#line 115 "debugparse.y" |
1358 |
|
|
{ create_command(&yyval.command, COMMAND_CONTINUE, 0); } |
1359 |
|
|
break; |
1360 |
|
|
|
1361 |
|
|
case 14: |
1362 |
|
|
#line 116 "debugparse.y" |
1363 |
|
|
{ create_command(&yyval.command, COMMAND_QUIT, 0); } |
1364 |
|
|
break; |
1365 |
|
|
|
1366 |
|
|
case 15: |
1367 |
|
|
#line 117 "debugparse.y" |
1368 |
|
|
{ create_command(&yyval.command, COMMAND_E2P, 1, &yyvsp[0].scalar); } |
1369 |
|
|
break; |
1370 |
|
|
|
1371 |
|
|
case 16: |
1372 |
|
|
#line 118 "debugparse.y" |
1373 |
|
|
{ create_command(&yyval.command, COMMAND_INSPECT_BYTE, 1, &yyvsp[0].scalar); } |
1374 |
|
|
break; |
1375 |
|
|
|
1376 |
|
|
case 17: |
1377 |
|
|
#line 119 "debugparse.y" |
1378 |
|
|
{ create_command(&yyval.command, COMMAND_INSPECT_HALF, 1, &yyvsp[0].scalar); } |
1379 |
|
|
break; |
1380 |
|
|
|
1381 |
|
|
case 18: |
1382 |
|
|
#line 120 "debugparse.y" |
1383 |
|
|
{ create_command(&yyval.command, COMMAND_INSPECT_WORD, 1, &yyvsp[0].scalar); } |
1384 |
|
|
break; |
1385 |
|
|
|
1386 |
|
|
case 19: |
1387 |
|
|
#line 121 "debugparse.y" |
1388 |
|
|
{ create_command(&yyval.command, COMMAND_INSPECT_DWORD, 1, &yyvsp[0].scalar); } |
1389 |
|
|
break; |
1390 |
|
|
|
1391 |
|
|
case 20: |
1392 |
|
|
#line 122 "debugparse.y" |
1393 |
|
|
{ create_command(&yyval.command, COMMAND_INSPECT_STRING, 1, &yyvsp[0].scalar); } |
1394 |
|
|
break; |
1395 |
|
|
|
1396 |
|
|
case 21: |
1397 |
|
|
#line 123 "debugparse.y" |
1398 |
|
|
{ create_command(&yyval.command, COMMAND_INSPECT_MEM, 1, &yyvsp[-1].scalar); } |
1399 |
|
|
break; |
1400 |
|
|
|
1401 |
|
|
case 22: |
1402 |
|
|
#line 124 "debugparse.y" |
1403 |
|
|
{ create_command(&yyval.command, COMMAND_WATCH, 2, &yyvsp[-1].scalar, &yyvsp[0].scalar); } |
1404 |
|
|
break; |
1405 |
|
|
|
1406 |
|
|
case 23: |
1407 |
|
|
#line 125 "debugparse.y" |
1408 |
|
|
{ create_command(&yyval.command, COMMAND_WATCH_BYTE, 2, &yyvsp[-1].scalar, &yyvsp[0].scalar); } |
1409 |
|
|
break; |
1410 |
|
|
|
1411 |
|
|
case 24: |
1412 |
|
|
#line 126 "debugparse.y" |
1413 |
|
|
{ create_command(&yyval.command, COMMAND_WATCH_HALF, 2, &yyvsp[-1].scalar, &yyvsp[0].scalar); } |
1414 |
|
|
break; |
1415 |
|
|
|
1416 |
|
|
case 25: |
1417 |
|
|
#line 127 "debugparse.y" |
1418 |
|
|
{ create_command(&yyval.command, COMMAND_WATCH_WORD, 2, &yyvsp[-1].scalar, &yyvsp[0].scalar); } |
1419 |
|
|
break; |
1420 |
|
|
|
1421 |
|
|
case 26: |
1422 |
|
|
#line 128 "debugparse.y" |
1423 |
|
|
{ create_command(&yyval.command, COMMAND_WATCH_DWORD, 2, &yyvsp[-1].scalar, &yyvsp[0].scalar); } |
1424 |
|
|
break; |
1425 |
|
|
|
1426 |
|
|
case 27: |
1427 |
|
|
#line 129 "debugparse.y" |
1428 |
|
|
{ create_command(&yyval.command, COMMAND_DELETE_WATCH, 1, &yyvsp[0].scalar); } |
1429 |
|
|
break; |
1430 |
|
|
|
1431 |
|
|
case 28: |
1432 |
|
|
#line 130 "debugparse.y" |
1433 |
|
|
{ create_command(&yyval.command, COMMAND_DUMP, 2, &yyvsp[-1].scalar, &yyvsp[0].scalar); } |
1434 |
|
|
break; |
1435 |
|
|
|
1436 |
|
|
case 29: |
1437 |
|
|
#line 131 "debugparse.y" |
1438 |
|
|
{ create_command(&yyval.command, COMMAND_DISASM, 2, &yyvsp[-1].scalar, &yyvsp[0].scalar); } |
1439 |
|
|
break; |
1440 |
|
|
|
1441 |
|
|
case 30: |
1442 |
|
|
#line 132 "debugparse.y" |
1443 |
|
|
{ create_command(&yyval.command, COMMAND_HELP, 0); } |
1444 |
|
|
break; |
1445 |
|
|
|
1446 |
|
|
case 31: |
1447 |
|
|
#line 135 "debugparse.y" |
1448 |
|
|
{ |
1449 |
|
|
struct eval_scalar s; |
1450 |
|
|
s.type = SCALAR_EMPTY; |
1451 |
|
|
yyval.scalar = s; |
1452 |
|
|
} |
1453 |
|
|
break; |
1454 |
|
|
|
1455 |
|
|
case 32: |
1456 |
|
|
#line 140 "debugparse.y" |
1457 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1458 |
|
|
break; |
1459 |
|
|
|
1460 |
|
|
case 33: |
1461 |
|
|
#line 143 "debugparse.y" |
1462 |
|
|
{ |
1463 |
|
|
struct eval_scalar s; |
1464 |
|
|
s.type = SCALAR_EMPTY; |
1465 |
|
|
yyval.scalar = s; |
1466 |
|
|
} |
1467 |
|
|
break; |
1468 |
|
|
|
1469 |
|
|
case 34: |
1470 |
|
|
#line 148 "debugparse.y" |
1471 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1472 |
|
|
break; |
1473 |
|
|
|
1474 |
|
|
case 35: |
1475 |
|
|
#line 152 "debugparse.y" |
1476 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1477 |
|
|
break; |
1478 |
|
|
|
1479 |
|
|
case 36: |
1480 |
|
|
#line 153 "debugparse.y" |
1481 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1482 |
|
|
break; |
1483 |
|
|
|
1484 |
|
|
case 37: |
1485 |
|
|
#line 154 "debugparse.y" |
1486 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1487 |
|
|
break; |
1488 |
|
|
|
1489 |
|
|
case 38: |
1490 |
|
|
#line 155 "debugparse.y" |
1491 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1492 |
|
|
break; |
1493 |
|
|
|
1494 |
|
|
case 39: |
1495 |
|
|
#line 156 "debugparse.y" |
1496 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1497 |
|
|
break; |
1498 |
|
|
|
1499 |
|
|
case 40: |
1500 |
|
|
#line 157 "debugparse.y" |
1501 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1502 |
|
|
break; |
1503 |
|
|
|
1504 |
|
|
case 41: |
1505 |
|
|
#line 158 "debugparse.y" |
1506 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1507 |
|
|
break; |
1508 |
|
|
|
1509 |
|
|
case 42: |
1510 |
|
|
#line 159 "debugparse.y" |
1511 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1512 |
|
|
break; |
1513 |
|
|
|
1514 |
|
|
case 43: |
1515 |
|
|
#line 160 "debugparse.y" |
1516 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1517 |
|
|
break; |
1518 |
|
|
|
1519 |
|
|
case 44: |
1520 |
|
|
#line 161 "debugparse.y" |
1521 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1522 |
|
|
break; |
1523 |
|
|
|
1524 |
|
|
case 45: |
1525 |
|
|
#line 164 "debugparse.y" |
1526 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1527 |
|
|
break; |
1528 |
|
|
|
1529 |
|
|
case 46: |
1530 |
|
|
#line 165 "debugparse.y" |
1531 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1532 |
|
|
break; |
1533 |
|
|
|
1534 |
|
|
case 47: |
1535 |
|
|
#line 166 "debugparse.y" |
1536 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1537 |
|
|
break; |
1538 |
|
|
|
1539 |
|
|
case 48: |
1540 |
|
|
#line 167 "debugparse.y" |
1541 |
|
|
{ yyval.scalar = yyvsp[0].scalar; } |
1542 |
|
|
break; |
1543 |
|
|
|
1544 |
|
|
case 49: |
1545 |
|
|
#line 168 "debugparse.y" |
1546 |
|
|
{ create_func_call(&yyval.scalar, "*", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1547 |
|
|
break; |
1548 |
|
|
|
1549 |
|
|
case 50: |
1550 |
|
|
#line 169 "debugparse.y" |
1551 |
|
|
{ create_func_call(&yyval.scalar, "/", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1552 |
|
|
break; |
1553 |
|
|
|
1554 |
|
|
case 51: |
1555 |
|
|
#line 170 "debugparse.y" |
1556 |
|
|
{ create_func_call(&yyval.scalar, "%", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1557 |
|
|
break; |
1558 |
|
|
|
1559 |
|
|
case 52: |
1560 |
|
|
#line 171 "debugparse.y" |
1561 |
|
|
{ create_func_call(&yyval.scalar, "+", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1562 |
|
|
break; |
1563 |
|
|
|
1564 |
|
|
case 53: |
1565 |
|
|
#line 172 "debugparse.y" |
1566 |
|
|
{ create_func_call(&yyval.scalar, "-", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1567 |
|
|
break; |
1568 |
|
|
|
1569 |
|
|
case 54: |
1570 |
|
|
#line 173 "debugparse.y" |
1571 |
|
|
{ create_func_call(&yyval.scalar, "&", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1572 |
|
|
break; |
1573 |
|
|
|
1574 |
|
|
case 55: |
1575 |
|
|
#line 174 "debugparse.y" |
1576 |
|
|
{ create_func_call(&yyval.scalar, "|", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1577 |
|
|
break; |
1578 |
|
|
|
1579 |
|
|
case 56: |
1580 |
|
|
#line 175 "debugparse.y" |
1581 |
|
|
{ create_func_call(&yyval.scalar, "^", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1582 |
|
|
break; |
1583 |
|
|
|
1584 |
|
|
case 57: |
1585 |
|
|
#line 176 "debugparse.y" |
1586 |
|
|
{ create_func_call(&yyval.scalar, "**", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1587 |
|
|
break; |
1588 |
|
|
|
1589 |
|
|
case 58: |
1590 |
|
|
#line 177 "debugparse.y" |
1591 |
|
|
{ create_func_call(&yyval.scalar, "<<", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1592 |
|
|
break; |
1593 |
|
|
|
1594 |
|
|
case 59: |
1595 |
|
|
#line 178 "debugparse.y" |
1596 |
|
|
{ create_func_call(&yyval.scalar, ">>", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1597 |
|
|
break; |
1598 |
|
|
|
1599 |
|
|
case 60: |
1600 |
|
|
#line 179 "debugparse.y" |
1601 |
|
|
{ create_func_call(&yyval.scalar, "==", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1602 |
|
|
break; |
1603 |
|
|
|
1604 |
|
|
case 61: |
1605 |
|
|
#line 180 "debugparse.y" |
1606 |
|
|
{ create_func_call(&yyval.scalar, "!=", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1607 |
|
|
break; |
1608 |
|
|
|
1609 |
|
|
case 62: |
1610 |
|
|
#line 181 "debugparse.y" |
1611 |
|
|
{ create_func_call(&yyval.scalar, ">", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1612 |
|
|
break; |
1613 |
|
|
|
1614 |
|
|
case 63: |
1615 |
|
|
#line 182 "debugparse.y" |
1616 |
|
|
{ create_func_call(&yyval.scalar, ">=", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1617 |
|
|
break; |
1618 |
|
|
|
1619 |
|
|
case 64: |
1620 |
|
|
#line 183 "debugparse.y" |
1621 |
|
|
{ create_func_call(&yyval.scalar, "<", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1622 |
|
|
break; |
1623 |
|
|
|
1624 |
|
|
case 65: |
1625 |
|
|
#line 184 "debugparse.y" |
1626 |
|
|
{ create_func_call(&yyval.scalar, "<=", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1627 |
|
|
break; |
1628 |
|
|
|
1629 |
|
|
case 66: |
1630 |
|
|
#line 185 "debugparse.y" |
1631 |
|
|
{ create_func_call(&yyval.scalar, "&&", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1632 |
|
|
break; |
1633 |
|
|
|
1634 |
|
|
case 67: |
1635 |
|
|
#line 186 "debugparse.y" |
1636 |
|
|
{ create_func_call(&yyval.scalar, "||", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1637 |
|
|
break; |
1638 |
|
|
|
1639 |
|
|
case 68: |
1640 |
|
|
#line 187 "debugparse.y" |
1641 |
|
|
{ create_func_call(&yyval.scalar, "^^", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1642 |
|
|
break; |
1643 |
|
|
|
1644 |
|
|
case 69: |
1645 |
|
|
#line 188 "debugparse.y" |
1646 |
|
|
{ create_func_call(&yyval.scalar, "-", 1, &yyvsp[0].scalar); } |
1647 |
|
|
break; |
1648 |
|
|
|
1649 |
|
|
case 70: |
1650 |
|
|
#line 189 "debugparse.y" |
1651 |
|
|
{ yyval.scalar = yyvsp[-1].scalar; } |
1652 |
|
|
break; |
1653 |
|
|
|
1654 |
|
|
case 71: |
1655 |
|
|
#line 190 "debugparse.y" |
1656 |
|
|
{ create_func_call(&yyval.scalar, "?:", 3, &yyvsp[-4].scalar, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1657 |
|
|
break; |
1658 |
|
|
|
1659 |
|
|
case 72: |
1660 |
|
|
#line 191 "debugparse.y" |
1661 |
|
|
{ create_func_call(&yyval.scalar, ".", 2, &yyvsp[-2].scalar, &yyvsp[0].scalar); } |
1662 |
|
|
break; |
1663 |
|
|
|
1664 |
|
|
case 73: |
1665 |
|
|
#line 193 "debugparse.y" |
1666 |
|
|
{ create_func_call_list(&yyval.scalar, yyvsp[-3].ident, &yyvsp[-1].scalars); } |
1667 |
|
|
break; |
1668 |
|
|
|
1669 |
|
|
case 74: |
1670 |
|
|
#line 199 "debugparse.y" |
1671 |
|
|
{ |
1672 |
|
|
struct eval_scalarlist s; |
1673 |
|
|
s.count = 0; |
1674 |
|
|
s.scalars = NULL; |
1675 |
|
|
yyval.scalars = s; |
1676 |
|
|
} |
1677 |
|
|
break; |
1678 |
|
|
|
1679 |
|
|
case 75: |
1680 |
|
|
#line 205 "debugparse.y" |
1681 |
|
|
{ yyval.scalars = yyvsp[0].scalars; } |
1682 |
|
|
break; |
1683 |
|
|
|
1684 |
|
|
case 76: |
1685 |
|
|
#line 208 "debugparse.y" |
1686 |
|
|
{ scalarlist_set(&yyval.scalars, &yyvsp[0].scalar); } |
1687 |
|
|
break; |
1688 |
|
|
|
1689 |
|
|
case 77: |
1690 |
|
|
#line 210 "debugparse.y" |
1691 |
|
|
{ |
1692 |
|
|
scalarlist_concat(&yyval.scalars, &yyvsp[-2].scalars, &yyvsp[0].scalars); |
1693 |
|
|
scalarlist_destroy_flat(&yyvsp[-2].scalars); |
1694 |
|
|
scalarlist_destroy_flat(&yyvsp[0].scalars); |
1695 |
|
|
} |
1696 |
|
|
break; |
1697 |
|
|
|
1698 |
|
|
case 78: |
1699 |
|
|
#line 217 "debugparse.y" |
1700 |
|
|
{ yyval.ident = yyvsp[0].ident; } |
1701 |
|
|
break; |
1702 |
|
|
|
1703 |
|
|
|
1704 |
|
|
} |
1705 |
|
|
|
1706 |
|
|
/* Line 1010 of yacc.c. */ |
1707 |
|
|
#line 1708 "debugparse.c" |
1708 |
|
|
|
1709 |
|
|
yyvsp -= yylen; |
1710 |
|
|
yyssp -= yylen; |
1711 |
|
|
|
1712 |
|
|
|
1713 |
|
|
YY_STACK_PRINT (yyss, yyssp); |
1714 |
|
|
|
1715 |
|
|
*++yyvsp = yyval; |
1716 |
|
|
|
1717 |
|
|
|
1718 |
|
|
/* Now `shift' the result of the reduction. Determine what state |
1719 |
|
|
that goes to, based on the state we popped back to and the rule |
1720 |
|
|
number reduced by. */ |
1721 |
|
|
|
1722 |
|
|
yyn = yyr1[yyn]; |
1723 |
|
|
|
1724 |
|
|
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
1725 |
|
|
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
1726 |
|
|
yystate = yytable[yystate]; |
1727 |
|
|
else |
1728 |
|
|
yystate = yydefgoto[yyn - YYNTOKENS]; |
1729 |
|
|
|
1730 |
|
|
goto yynewstate; |
1731 |
|
|
|
1732 |
|
|
|
1733 |
|
|
/*------------------------------------. |
1734 |
|
|
| yyerrlab -- here on detecting error | |
1735 |
|
|
`------------------------------------*/ |
1736 |
|
|
yyerrlab: |
1737 |
|
|
/* If not already recovering from an error, report this error. */ |
1738 |
|
|
if (!yyerrstatus) |
1739 |
|
|
{ |
1740 |
|
|
++yynerrs; |
1741 |
|
|
#if YYERROR_VERBOSE |
1742 |
|
|
yyn = yypact[yystate]; |
1743 |
|
|
|
1744 |
|
|
if (YYPACT_NINF < yyn && yyn < YYLAST) |
1745 |
|
|
{ |
1746 |
|
|
YYSIZE_T yysize = 0; |
1747 |
|
|
int yytype = YYTRANSLATE (yychar); |
1748 |
|
|
const char* yyprefix; |
1749 |
|
|
char *yymsg; |
1750 |
|
|
int yyx; |
1751 |
|
|
|
1752 |
|
|
/* Start YYX at -YYN if negative to avoid negative indexes in |
1753 |
|
|
YYCHECK. */ |
1754 |
|
|
int yyxbegin = yyn < 0 ? -yyn : 0; |
1755 |
|
|
|
1756 |
|
|
/* Stay within bounds of both yycheck and yytname. */ |
1757 |
|
|
int yychecklim = YYLAST - yyn; |
1758 |
|
|
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
1759 |
|
|
int yycount = 0; |
1760 |
|
|
|
1761 |
|
|
yyprefix = ", expecting "; |
1762 |
|
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
1763 |
|
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
1764 |
|
|
{ |
1765 |
|
|
yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); |
1766 |
|
|
yycount += 1; |
1767 |
|
|
if (yycount == 5) |
1768 |
|
|
{ |
1769 |
|
|
yysize = 0; |
1770 |
|
|
break; |
1771 |
|
|
} |
1772 |
|
|
} |
1773 |
|
|
yysize += (sizeof ("syntax error, unexpected ") |
1774 |
|
|
+ yystrlen (yytname[yytype])); |
1775 |
|
|
yymsg = (char *) YYSTACK_ALLOC (yysize); |
1776 |
|
|
if (yymsg != 0) |
1777 |
|
|
{ |
1778 |
|
|
char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); |
1779 |
|
|
yyp = yystpcpy (yyp, yytname[yytype]); |
1780 |
|
|
|
1781 |
|
|
if (yycount < 5) |
1782 |
|
|
{ |
1783 |
|
|
yyprefix = ", expecting "; |
1784 |
|
|
for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
1785 |
|
|
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
1786 |
|
|
{ |
1787 |
|
|
yyp = yystpcpy (yyp, yyprefix); |
1788 |
|
|
yyp = yystpcpy (yyp, yytname[yyx]); |
1789 |
|
|
yyprefix = " or "; |
1790 |
|
|
} |
1791 |
|
|
} |
1792 |
|
|
yyerror (yymsg); |
1793 |
|
|
YYSTACK_FREE (yymsg); |
1794 |
|
|
} |
1795 |
|
|
else |
1796 |
|
|
yyerror ("syntax error; also virtual memory exhausted"); |
1797 |
|
|
} |
1798 |
|
|
else |
1799 |
|
|
#endif /* YYERROR_VERBOSE */ |
1800 |
|
|
yyerror ("syntax error"); |
1801 |
|
|
} |
1802 |
|
|
|
1803 |
|
|
|
1804 |
|
|
|
1805 |
|
|
if (yyerrstatus == 3) |
1806 |
|
|
{ |
1807 |
|
|
/* If just tried and failed to reuse lookahead token after an |
1808 |
|
|
error, discard it. */ |
1809 |
|
|
|
1810 |
|
|
if (yychar <= YYEOF) |
1811 |
|
|
{ |
1812 |
|
|
/* If at end of input, pop the error token, |
1813 |
|
|
then the rest of the stack, then return failure. */ |
1814 |
|
|
if (yychar == YYEOF) |
1815 |
|
|
for (;;) |
1816 |
|
|
{ |
1817 |
|
|
YYPOPSTACK; |
1818 |
|
|
if (yyssp == yyss) |
1819 |
|
|
YYABORT; |
1820 |
|
|
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); |
1821 |
|
|
yydestruct (yystos[*yyssp], yyvsp); |
1822 |
|
|
} |
1823 |
|
|
} |
1824 |
|
|
else |
1825 |
|
|
{ |
1826 |
|
|
YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); |
1827 |
|
|
yydestruct (yytoken, &yylval); |
1828 |
|
|
yychar = YYEMPTY; |
1829 |
|
|
|
1830 |
|
|
} |
1831 |
|
|
} |
1832 |
|
|
|
1833 |
|
|
/* Else will try to reuse lookahead token after shifting the error |
1834 |
|
|
token. */ |
1835 |
|
|
goto yyerrlab1; |
1836 |
|
|
|
1837 |
|
|
|
1838 |
|
|
/*---------------------------------------------------. |
1839 |
|
|
| yyerrorlab -- error raised explicitly by YYERROR. | |
1840 |
|
|
`---------------------------------------------------*/ |
1841 |
|
|
yyerrorlab: |
1842 |
|
|
|
1843 |
|
|
#ifdef __GNUC__ |
1844 |
|
|
/* Pacify GCC when the user code never invokes YYERROR and the label |
1845 |
|
|
yyerrorlab therefore never appears in user code. */ |
1846 |
|
|
if (0) |
1847 |
|
|
goto yyerrorlab; |
1848 |
|
|
#endif |
1849 |
|
|
|
1850 |
|
|
yyvsp -= yylen; |
1851 |
|
|
yyssp -= yylen; |
1852 |
|
|
yystate = *yyssp; |
1853 |
|
|
goto yyerrlab1; |
1854 |
|
|
|
1855 |
|
|
|
1856 |
|
|
/*-------------------------------------------------------------. |
1857 |
|
|
| yyerrlab1 -- common code for both syntax error and YYERROR. | |
1858 |
|
|
`-------------------------------------------------------------*/ |
1859 |
|
|
yyerrlab1: |
1860 |
|
|
yyerrstatus = 3; /* Each real token shifted decrements this. */ |
1861 |
|
|
|
1862 |
|
|
for (;;) |
1863 |
|
|
{ |
1864 |
|
|
yyn = yypact[yystate]; |
1865 |
|
|
if (yyn != YYPACT_NINF) |
1866 |
|
|
{ |
1867 |
|
|
yyn += YYTERROR; |
1868 |
|
|
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
1869 |
|
|
{ |
1870 |
|
|
yyn = yytable[yyn]; |
1871 |
|
|
if (0 < yyn) |
1872 |
|
|
break; |
1873 |
|
|
} |
1874 |
|
|
} |
1875 |
|
|
|
1876 |
|
|
/* Pop the current state because it cannot handle the error token. */ |
1877 |
|
|
if (yyssp == yyss) |
1878 |
|
|
YYABORT; |
1879 |
|
|
|
1880 |
|
|
YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); |
1881 |
|
|
yydestruct (yystos[yystate], yyvsp); |
1882 |
|
|
YYPOPSTACK; |
1883 |
|
|
yystate = *yyssp; |
1884 |
|
|
YY_STACK_PRINT (yyss, yyssp); |
1885 |
|
|
} |
1886 |
|
|
|
1887 |
|
|
if (yyn == YYFINAL) |
1888 |
|
|
YYACCEPT; |
1889 |
|
|
|
1890 |
|
|
YYDPRINTF ((stderr, "Shifting error token, ")); |
1891 |
|
|
|
1892 |
|
|
*++yyvsp = yylval; |
1893 |
|
|
|
1894 |
|
|
|
1895 |
|
|
yystate = yyn; |
1896 |
|
|
goto yynewstate; |
1897 |
|
|
|
1898 |
|
|
|
1899 |
|
|
/*-------------------------------------. |
1900 |
|
|
| yyacceptlab -- YYACCEPT comes here. | |
1901 |
|
|
`-------------------------------------*/ |
1902 |
|
|
yyacceptlab: |
1903 |
|
|
yyresult = 0; |
1904 |
|
|
goto yyreturn; |
1905 |
|
|
|
1906 |
|
|
/*-----------------------------------. |
1907 |
|
|
| yyabortlab -- YYABORT comes here. | |
1908 |
|
|
`-----------------------------------*/ |
1909 |
|
|
yyabortlab: |
1910 |
|
|
yyresult = 1; |
1911 |
|
|
goto yyreturn; |
1912 |
|
|
|
1913 |
|
|
#ifndef yyoverflow |
1914 |
|
|
/*----------------------------------------------. |
1915 |
|
|
| yyoverflowlab -- parser overflow comes here. | |
1916 |
|
|
`----------------------------------------------*/ |
1917 |
|
|
yyoverflowlab: |
1918 |
|
|
yyerror ("parser stack overflow"); |
1919 |
|
|
yyresult = 2; |
1920 |
|
|
/* Fall through. */ |
1921 |
|
|
#endif |
1922 |
|
|
|
1923 |
|
|
yyreturn: |
1924 |
|
|
#ifndef yyoverflow |
1925 |
|
|
if (yyss != yyssa) |
1926 |
|
|
YYSTACK_FREE (yyss); |
1927 |
|
|
#endif |
1928 |
|
|
return yyresult; |
1929 |
|
|
} |
1930 |
|
|
|
1931 |
|
|
|
1932 |
|
|
#line 220 "debugparse.y" |
1933 |
|
|
|
1934 |
|
|
|