1 | /* A Bison parser, made by GNU Bison 2.3. */ |
---|
2 | |
---|
3 | /* Skeleton implementation for Bison's Yacc-like parsers in C |
---|
4 | |
---|
5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 |
---|
6 | Free Software Foundation, Inc. |
---|
7 | |
---|
8 | This program is free software; you can redistribute it and/or modify |
---|
9 | it under the terms of the GNU General Public License as published by |
---|
10 | the Free Software Foundation; either version 2, or (at your option) |
---|
11 | any later version. |
---|
12 | |
---|
13 | This program is distributed in the hope that it will be useful, |
---|
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | GNU General Public License for more details. |
---|
17 | |
---|
18 | You should have received a copy of the GNU General Public License |
---|
19 | along with this program; if not, write to the Free Software |
---|
20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, |
---|
21 | Boston, MA 02110-1301, USA. */ |
---|
22 | |
---|
23 | /* As a special exception, you may create a larger work that contains |
---|
24 | part or all of the Bison parser skeleton and distribute that work |
---|
25 | under terms of your choice, so long as that work isn't itself a |
---|
26 | parser generator using the skeleton or a modified version thereof |
---|
27 | as a parser skeleton. Alternatively, if you modify or redistribute |
---|
28 | the parser skeleton itself, you may (at your option) remove this |
---|
29 | special exception, which will cause the skeleton and the resulting |
---|
30 | Bison output files to be licensed under the GNU General Public |
---|
31 | License without this special exception. |
---|
32 | |
---|
33 | This special exception was added by the Free Software Foundation in |
---|
34 | version 2.2 of Bison. */ |
---|
35 | |
---|
36 | /* C LALR(1) parser skeleton written by Richard Stallman, by |
---|
37 | simplifying the original so-called "semantic" parser. */ |
---|
38 | |
---|
39 | /* All symbols defined below should begin with yy or YY, to avoid |
---|
40 | infringing on user name space. This should be done even for local |
---|
41 | variables, as they might otherwise be expanded by user macros. |
---|
42 | There are some unavoidable exceptions within include files to |
---|
43 | define necessary library symbols; they are noted "INFRINGES ON |
---|
44 | USER NAME SPACE" below. */ |
---|
45 | |
---|
46 | /* Identify Bison output. */ |
---|
47 | #define YYBISON 1 |
---|
48 | |
---|
49 | /* Bison version. */ |
---|
50 | #define YYBISON_VERSION "2.3" |
---|
51 | |
---|
52 | /* Skeleton name. */ |
---|
53 | #define YYSKELETON_NAME "yacc.c" |
---|
54 | |
---|
55 | /* Pure parsers. */ |
---|
56 | #define YYPURE 1 |
---|
57 | |
---|
58 | /* Using locations. */ |
---|
59 | #define YYLSP_NEEDED 0 |
---|
60 | |
---|
61 | |
---|
62 | |
---|
63 | /* Tokens. */ |
---|
64 | #ifndef YYTOKENTYPE |
---|
65 | # define YYTOKENTYPE |
---|
66 | /* Put the tokens into the symbol table, so that GDB and other debuggers |
---|
67 | know about them. */ |
---|
68 | enum yytokentype { |
---|
69 | DOTDOT = 258, |
---|
70 | EQUAL_EQUAL = 259, |
---|
71 | GE = 260, |
---|
72 | LE = 261, |
---|
73 | MINUSMINUS = 262, |
---|
74 | NOT = 263, |
---|
75 | NOTEQUAL = 264, |
---|
76 | PLUSPLUS = 265, |
---|
77 | COLONCOLON = 266, |
---|
78 | GRING_CMD = 267, |
---|
79 | INTMAT_CMD = 268, |
---|
80 | PROC_CMD = 269, |
---|
81 | RING_CMD = 270, |
---|
82 | BEGIN_RING = 271, |
---|
83 | IDEAL_CMD = 272, |
---|
84 | MAP_CMD = 273, |
---|
85 | MATRIX_CMD = 274, |
---|
86 | MODUL_CMD = 275, |
---|
87 | NUMBER_CMD = 276, |
---|
88 | POLY_CMD = 277, |
---|
89 | RESOLUTION_CMD = 278, |
---|
90 | VECTOR_CMD = 279, |
---|
91 | BETTI_CMD = 280, |
---|
92 | COEFFS_CMD = 281, |
---|
93 | COEF_CMD = 282, |
---|
94 | CONTRACT_CMD = 283, |
---|
95 | DEGREE_CMD = 284, |
---|
96 | DEG_CMD = 285, |
---|
97 | DIFF_CMD = 286, |
---|
98 | DIM_CMD = 287, |
---|
99 | DIVISION_CMD = 288, |
---|
100 | ELIMINATION_CMD = 289, |
---|
101 | E_CMD = 290, |
---|
102 | FAREY_CMD = 291, |
---|
103 | FETCH_CMD = 292, |
---|
104 | FREEMODULE_CMD = 293, |
---|
105 | KEEPRING_CMD = 294, |
---|
106 | HILBERT_CMD = 295, |
---|
107 | HOMOG_CMD = 296, |
---|
108 | IMAP_CMD = 297, |
---|
109 | INDEPSET_CMD = 298, |
---|
110 | INTERRED_CMD = 299, |
---|
111 | INTERSECT_CMD = 300, |
---|
112 | JACOB_CMD = 301, |
---|
113 | JET_CMD = 302, |
---|
114 | KBASE_CMD = 303, |
---|
115 | KOSZUL_CMD = 304, |
---|
116 | LEADCOEF_CMD = 305, |
---|
117 | LEADEXP_CMD = 306, |
---|
118 | LEAD_CMD = 307, |
---|
119 | LEADMONOM_CMD = 308, |
---|
120 | LIFTSTD_CMD = 309, |
---|
121 | LIFT_CMD = 310, |
---|
122 | MAXID_CMD = 311, |
---|
123 | MINBASE_CMD = 312, |
---|
124 | MINOR_CMD = 313, |
---|
125 | MINRES_CMD = 314, |
---|
126 | MODULO_CMD = 315, |
---|
127 | MONOM_CMD = 316, |
---|
128 | MRES_CMD = 317, |
---|
129 | MULTIPLICITY_CMD = 318, |
---|
130 | ORD_CMD = 319, |
---|
131 | PAR_CMD = 320, |
---|
132 | PARDEG_CMD = 321, |
---|
133 | PREIMAGE_CMD = 322, |
---|
134 | QUOTIENT_CMD = 323, |
---|
135 | QHWEIGHT_CMD = 324, |
---|
136 | REDUCE_CMD = 325, |
---|
137 | REGULARITY_CMD = 326, |
---|
138 | RES_CMD = 327, |
---|
139 | SIMPLIFY_CMD = 328, |
---|
140 | SORTVEC_CMD = 329, |
---|
141 | SRES_CMD = 330, |
---|
142 | STD_CMD = 331, |
---|
143 | SUBST_CMD = 332, |
---|
144 | SYZYGY_CMD = 333, |
---|
145 | VAR_CMD = 334, |
---|
146 | VDIM_CMD = 335, |
---|
147 | WEDGE_CMD = 336, |
---|
148 | WEIGHT_CMD = 337, |
---|
149 | VALTVARS = 338, |
---|
150 | VMAXDEG = 339, |
---|
151 | VMAXMULT = 340, |
---|
152 | VNOETHER = 341, |
---|
153 | VMINPOLY = 342, |
---|
154 | END_RING = 343, |
---|
155 | CMD_1 = 344, |
---|
156 | CMD_2 = 345, |
---|
157 | CMD_3 = 346, |
---|
158 | CMD_12 = 347, |
---|
159 | CMD_13 = 348, |
---|
160 | CMD_23 = 349, |
---|
161 | CMD_123 = 350, |
---|
162 | CMD_M = 351, |
---|
163 | ROOT_DECL = 352, |
---|
164 | ROOT_DECL_LIST = 353, |
---|
165 | RING_DECL = 354, |
---|
166 | EXAMPLE_CMD = 355, |
---|
167 | EXPORT_CMD = 356, |
---|
168 | HELP_CMD = 357, |
---|
169 | KILL_CMD = 358, |
---|
170 | LIB_CMD = 359, |
---|
171 | LISTVAR_CMD = 360, |
---|
172 | SETRING_CMD = 361, |
---|
173 | TYPE_CMD = 362, |
---|
174 | STRINGTOK = 363, |
---|
175 | BLOCKTOK = 364, |
---|
176 | INT_CONST = 365, |
---|
177 | UNKNOWN_IDENT = 366, |
---|
178 | RINGVAR = 367, |
---|
179 | PROC_DEF = 368, |
---|
180 | BREAK_CMD = 369, |
---|
181 | CONTINUE_CMD = 370, |
---|
182 | ELSE_CMD = 371, |
---|
183 | EVAL = 372, |
---|
184 | QUOTE = 373, |
---|
185 | FOR_CMD = 374, |
---|
186 | IF_CMD = 375, |
---|
187 | SYS_BREAK = 376, |
---|
188 | WHILE_CMD = 377, |
---|
189 | RETURN = 378, |
---|
190 | PARAMETER = 379, |
---|
191 | SYSVAR = 380, |
---|
192 | UMINUS = 381 |
---|
193 | }; |
---|
194 | #endif |
---|
195 | /* Tokens. */ |
---|
196 | #define DOTDOT 258 |
---|
197 | #define EQUAL_EQUAL 259 |
---|
198 | #define GE 260 |
---|
199 | #define LE 261 |
---|
200 | #define MINUSMINUS 262 |
---|
201 | #define NOT 263 |
---|
202 | #define NOTEQUAL 264 |
---|
203 | #define PLUSPLUS 265 |
---|
204 | #define COLONCOLON 266 |
---|
205 | #define GRING_CMD 267 |
---|
206 | #define INTMAT_CMD 268 |
---|
207 | #define PROC_CMD 269 |
---|
208 | #define RING_CMD 270 |
---|
209 | #define BEGIN_RING 271 |
---|
210 | #define IDEAL_CMD 272 |
---|
211 | #define MAP_CMD 273 |
---|
212 | #define MATRIX_CMD 274 |
---|
213 | #define MODUL_CMD 275 |
---|
214 | #define NUMBER_CMD 276 |
---|
215 | #define POLY_CMD 277 |
---|
216 | #define RESOLUTION_CMD 278 |
---|
217 | #define VECTOR_CMD 279 |
---|
218 | #define BETTI_CMD 280 |
---|
219 | #define COEFFS_CMD 281 |
---|
220 | #define COEF_CMD 282 |
---|
221 | #define CONTRACT_CMD 283 |
---|
222 | #define DEGREE_CMD 284 |
---|
223 | #define DEG_CMD 285 |
---|
224 | #define DIFF_CMD 286 |
---|
225 | #define DIM_CMD 287 |
---|
226 | #define DIVISION_CMD 288 |
---|
227 | #define ELIMINATION_CMD 289 |
---|
228 | #define E_CMD 290 |
---|
229 | #define FAREY_CMD 291 |
---|
230 | #define FETCH_CMD 292 |
---|
231 | #define FREEMODULE_CMD 293 |
---|
232 | #define KEEPRING_CMD 294 |
---|
233 | #define HILBERT_CMD 295 |
---|
234 | #define HOMOG_CMD 296 |
---|
235 | #define IMAP_CMD 297 |
---|
236 | #define INDEPSET_CMD 298 |
---|
237 | #define INTERRED_CMD 299 |
---|
238 | #define INTERSECT_CMD 300 |
---|
239 | #define JACOB_CMD 301 |
---|
240 | #define JET_CMD 302 |
---|
241 | #define KBASE_CMD 303 |
---|
242 | #define KOSZUL_CMD 304 |
---|
243 | #define LEADCOEF_CMD 305 |
---|
244 | #define LEADEXP_CMD 306 |
---|
245 | #define LEAD_CMD 307 |
---|
246 | #define LEADMONOM_CMD 308 |
---|
247 | #define LIFTSTD_CMD 309 |
---|
248 | #define LIFT_CMD 310 |
---|
249 | #define MAXID_CMD 311 |
---|
250 | #define MINBASE_CMD 312 |
---|
251 | #define MINOR_CMD 313 |
---|
252 | #define MINRES_CMD 314 |
---|
253 | #define MODULO_CMD 315 |
---|
254 | #define MONOM_CMD 316 |
---|
255 | #define MRES_CMD 317 |
---|
256 | #define MULTIPLICITY_CMD 318 |
---|
257 | #define ORD_CMD 319 |
---|
258 | #define PAR_CMD 320 |
---|
259 | #define PARDEG_CMD 321 |
---|
260 | #define PREIMAGE_CMD 322 |
---|
261 | #define QUOTIENT_CMD 323 |
---|
262 | #define QHWEIGHT_CMD 324 |
---|
263 | #define REDUCE_CMD 325 |
---|
264 | #define REGULARITY_CMD 326 |
---|
265 | #define RES_CMD 327 |
---|
266 | #define SIMPLIFY_CMD 328 |
---|
267 | #define SORTVEC_CMD 329 |
---|
268 | #define SRES_CMD 330 |
---|
269 | #define STD_CMD 331 |
---|
270 | #define SUBST_CMD 332 |
---|
271 | #define SYZYGY_CMD 333 |
---|
272 | #define VAR_CMD 334 |
---|
273 | #define VDIM_CMD 335 |
---|
274 | #define WEDGE_CMD 336 |
---|
275 | #define WEIGHT_CMD 337 |
---|
276 | #define VALTVARS 338 |
---|
277 | #define VMAXDEG 339 |
---|
278 | #define VMAXMULT 340 |
---|
279 | #define VNOETHER 341 |
---|
280 | #define VMINPOLY 342 |
---|
281 | #define END_RING 343 |
---|
282 | #define CMD_1 344 |
---|
283 | #define CMD_2 345 |
---|
284 | #define CMD_3 346 |
---|
285 | #define CMD_12 347 |
---|
286 | #define CMD_13 348 |
---|
287 | #define CMD_23 349 |
---|
288 | #define CMD_123 350 |
---|
289 | #define CMD_M 351 |
---|
290 | #define ROOT_DECL 352 |
---|
291 | #define ROOT_DECL_LIST 353 |
---|
292 | #define RING_DECL 354 |
---|
293 | #define EXAMPLE_CMD 355 |
---|
294 | #define EXPORT_CMD 356 |
---|
295 | #define HELP_CMD 357 |
---|
296 | #define KILL_CMD 358 |
---|
297 | #define LIB_CMD 359 |
---|
298 | #define LISTVAR_CMD 360 |
---|
299 | #define SETRING_CMD 361 |
---|
300 | #define TYPE_CMD 362 |
---|
301 | #define STRINGTOK 363 |
---|
302 | #define BLOCKTOK 364 |
---|
303 | #define INT_CONST 365 |
---|
304 | #define UNKNOWN_IDENT 366 |
---|
305 | #define RINGVAR 367 |
---|
306 | #define PROC_DEF 368 |
---|
307 | #define BREAK_CMD 369 |
---|
308 | #define CONTINUE_CMD 370 |
---|
309 | #define ELSE_CMD 371 |
---|
310 | #define EVAL 372 |
---|
311 | #define QUOTE 373 |
---|
312 | #define FOR_CMD 374 |
---|
313 | #define IF_CMD 375 |
---|
314 | #define SYS_BREAK 376 |
---|
315 | #define WHILE_CMD 377 |
---|
316 | #define RETURN 378 |
---|
317 | #define PARAMETER 379 |
---|
318 | #define SYSVAR 380 |
---|
319 | #define UMINUS 381 |
---|
320 | |
---|
321 | |
---|
322 | |
---|
323 | |
---|
324 | /* Copy the first part of user declarations. */ |
---|
325 | #line 8 "grammar.y" |
---|
326 | |
---|
327 | |
---|
328 | #include <stdio.h> |
---|
329 | #include <stddef.h> |
---|
330 | #include <stdlib.h> |
---|
331 | #include <stdarg.h> |
---|
332 | #include <string.h> |
---|
333 | |
---|
334 | #include <kernel/mod2.h> |
---|
335 | #include <omalloc/mylimits.h> |
---|
336 | #include <omalloc/omalloc.h> |
---|
337 | #include <Singular/tok.h> |
---|
338 | #include <kernel/options.h> |
---|
339 | #include <Singular/stype.h> |
---|
340 | #include <Singular/ipid.h> |
---|
341 | #include <kernel/intvec.h> |
---|
342 | #include <kernel/febase.h> |
---|
343 | #include <kernel/matpol.h> |
---|
344 | #include <kernel/ring.h> |
---|
345 | #include <kernel/kstd1.h> |
---|
346 | #include <Singular/subexpr.h> |
---|
347 | #include <Singular/ipshell.h> |
---|
348 | #include <Singular/ipconv.h> |
---|
349 | #include <Singular/sdb.h> |
---|
350 | #include <kernel/ideals.h> |
---|
351 | #include <kernel/numbers.h> |
---|
352 | #include <kernel/polys.h> |
---|
353 | #include <kernel/stairc.h> |
---|
354 | #include <kernel/timer.h> |
---|
355 | #include <Singular/cntrlc.h> |
---|
356 | #include <kernel/maps.h> |
---|
357 | #include <kernel/syz.h> |
---|
358 | #include <Singular/lists.h> |
---|
359 | #include <kernel/longrat.h> |
---|
360 | #include <Singular/libparse.h> |
---|
361 | |
---|
362 | #if 0 |
---|
363 | void debug_list(leftv v) |
---|
364 | { |
---|
365 | idhdl r=basePackHdl; |
---|
366 | idhdl h; |
---|
367 | BOOLEAN found=FALSE; |
---|
368 | const char *nn=v->name; |
---|
369 | h=IDROOT->get(nn,myynest); |
---|
370 | if (h!=NULL) |
---|
371 | { |
---|
372 | Print("Curr::%s, (%s)\n",nn,Tok2Cmdname((int)IDTYP(h))); |
---|
373 | found=TRUE; |
---|
374 | } |
---|
375 | else Print("`%s` not found in IDROOT\n",nn); |
---|
376 | while (r!=NULL) |
---|
377 | { |
---|
378 | if ((IDTYP(r)==PACKAGE_CMD) |
---|
379 | || (IDTYP(r)==RING_CMD) |
---|
380 | || (IDTYP(r)==QRING_CMD)) |
---|
381 | { |
---|
382 | h=IDPACKAGE(r)->idroot->get(nn,myynest); |
---|
383 | if (h!=NULL) |
---|
384 | { |
---|
385 | Print("%s::%s, (%s)\n",r->id,nn,Tok2Cmdname((int)IDTYP(h))); |
---|
386 | found=TRUE; |
---|
387 | } |
---|
388 | else Print("%s::%s not found\n",r->id,nn); |
---|
389 | } |
---|
390 | if (r==basePackHdl) r=IDPACKAGE(r)->idroot; |
---|
391 | r=r->next; |
---|
392 | if (r==basePackHdl) break; |
---|
393 | } |
---|
394 | if (!found) |
---|
395 | { |
---|
396 | listall(TRUE); |
---|
397 | } |
---|
398 | } |
---|
399 | #endif |
---|
400 | |
---|
401 | /* From the bison docu: |
---|
402 | |
---|
403 | By defining the macro `YYMAXDEPTH', you can control how deep the |
---|
404 | parser stack can become before a stack overflow occurs. Define the |
---|
405 | macro with a value that is an integer. This value is the maximum number |
---|
406 | of tokens that can be shifted (and not reduced) before overflow. It |
---|
407 | must be a constant expression whose value is known at compile time. |
---|
408 | |
---|
409 | The stack space allowed is not necessarily allocated. If you |
---|
410 | specify a large value for `YYMAXDEPTH', the parser actually allocates a |
---|
411 | small stack at first, and then makes it bigger by stages as needed. |
---|
412 | This increasing allocation happens automatically and silently. |
---|
413 | Therefore, you do not need to make `YYMAXDEPTH' painfully small merely |
---|
414 | to save space for ordinary inputs that do not need much stack. |
---|
415 | |
---|
416 | The default value of `YYMAXDEPTH', if you do not define it, is 10000. |
---|
417 | */ |
---|
418 | #define YYMAXDEPTH INT_MAX |
---|
419 | |
---|
420 | extern int yylineno; |
---|
421 | extern FILE* yyin; |
---|
422 | |
---|
423 | char my_yylinebuf[80]; |
---|
424 | const char * currid; |
---|
425 | BOOLEAN yyInRingConstruction=FALSE; |
---|
426 | BOOLEAN expected_parms; |
---|
427 | int cmdtok; |
---|
428 | int inerror = 0; |
---|
429 | |
---|
430 | #define TESTSETINT(a,i) \ |
---|
431 | if ((a).Typ() != INT_CMD) \ |
---|
432 | { \ |
---|
433 | WerrorS("no int expression"); \ |
---|
434 | YYERROR; \ |
---|
435 | } \ |
---|
436 | (i) = (int)((long)(a).Data()); |
---|
437 | |
---|
438 | #define MYYERROR(a) { WerrorS(a); YYERROR; } |
---|
439 | |
---|
440 | void yyerror(const char * fmt) |
---|
441 | { |
---|
442 | |
---|
443 | BOOLEAN old_errorreported=errorreported; |
---|
444 | errorreported = TRUE; |
---|
445 | if (currid!=NULL) |
---|
446 | { |
---|
447 | killid(currid,&IDROOT); |
---|
448 | currid = NULL; |
---|
449 | } |
---|
450 | if(inerror==0) |
---|
451 | { |
---|
452 | { |
---|
453 | if ((strlen(fmt)>1) |
---|
454 | && (strncmp(fmt,"parse",5)!=0) |
---|
455 | && (strncmp(fmt,"syntax",6)!=0)) |
---|
456 | WerrorS(fmt); |
---|
457 | Werror( "error occurred in or before %s line %d: `%s`" |
---|
458 | ,VoiceName(), yylineno, my_yylinebuf); |
---|
459 | } |
---|
460 | if (cmdtok!=0) |
---|
461 | { |
---|
462 | const char *s=Tok2Cmdname(cmdtok); |
---|
463 | if (expected_parms) |
---|
464 | { |
---|
465 | Werror("expected %s-expression. type \'help %s;\'",s,s); |
---|
466 | } |
---|
467 | else |
---|
468 | { |
---|
469 | Werror("wrong type declaration. type \'help %s;\'",s); |
---|
470 | } |
---|
471 | } |
---|
472 | if (!old_errorreported && (lastreserved!=NULL)) |
---|
473 | { |
---|
474 | Werror("last reserved name was `%s`",lastreserved); |
---|
475 | } |
---|
476 | inerror=1; |
---|
477 | } |
---|
478 | if ((currentVoice!=NULL) |
---|
479 | && (currentVoice->prev!=NULL) |
---|
480 | && (myynest>0) |
---|
481 | #ifdef HAVE_SDB |
---|
482 | && ((sdb_flags &1)==0) |
---|
483 | #endif |
---|
484 | ) |
---|
485 | { |
---|
486 | Werror("leaving %s",VoiceName()); |
---|
487 | } |
---|
488 | #ifdef HAVE_FACTORY |
---|
489 | // libfac: |
---|
490 | extern int libfac_interruptflag; |
---|
491 | libfac_interruptflag=0; |
---|
492 | #endif |
---|
493 | } |
---|
494 | |
---|
495 | |
---|
496 | |
---|
497 | /* Enabling traces. */ |
---|
498 | #ifndef YYDEBUG |
---|
499 | # define YYDEBUG 1 |
---|
500 | #endif |
---|
501 | |
---|
502 | /* Enabling verbose error messages. */ |
---|
503 | #ifdef YYERROR_VERBOSE |
---|
504 | # undef YYERROR_VERBOSE |
---|
505 | # define YYERROR_VERBOSE 1 |
---|
506 | #else |
---|
507 | # define YYERROR_VERBOSE 0 |
---|
508 | #endif |
---|
509 | |
---|
510 | /* Enabling the token table. */ |
---|
511 | #ifndef YYTOKEN_TABLE |
---|
512 | # define YYTOKEN_TABLE 0 |
---|
513 | #endif |
---|
514 | |
---|
515 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
---|
516 | typedef int YYSTYPE; |
---|
517 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ |
---|
518 | # define YYSTYPE_IS_DECLARED 1 |
---|
519 | # define YYSTYPE_IS_TRIVIAL 1 |
---|
520 | #endif |
---|
521 | |
---|
522 | |
---|
523 | |
---|
524 | /* Copy the second part of user declarations. */ |
---|
525 | |
---|
526 | |
---|
527 | /* Line 216 of yacc.c. */ |
---|
528 | #line 529 "grammar.cc" |
---|
529 | |
---|
530 | #ifdef short |
---|
531 | # undef short |
---|
532 | #endif |
---|
533 | |
---|
534 | #ifdef YYTYPE_UINT8 |
---|
535 | typedef YYTYPE_UINT8 yytype_uint8; |
---|
536 | #else |
---|
537 | typedef unsigned char yytype_uint8; |
---|
538 | #endif |
---|
539 | |
---|
540 | #ifdef YYTYPE_INT8 |
---|
541 | typedef YYTYPE_INT8 yytype_int8; |
---|
542 | #elif (defined __STDC__ || defined __C99__FUNC__ \ |
---|
543 | || defined __cplusplus || defined _MSC_VER) |
---|
544 | typedef signed char yytype_int8; |
---|
545 | #else |
---|
546 | typedef short int yytype_int8; |
---|
547 | #endif |
---|
548 | |
---|
549 | #ifdef YYTYPE_UINT16 |
---|
550 | typedef YYTYPE_UINT16 yytype_uint16; |
---|
551 | #else |
---|
552 | typedef unsigned short int yytype_uint16; |
---|
553 | #endif |
---|
554 | |
---|
555 | #ifdef YYTYPE_INT16 |
---|
556 | typedef YYTYPE_INT16 yytype_int16; |
---|
557 | #else |
---|
558 | typedef short int yytype_int16; |
---|
559 | #endif |
---|
560 | |
---|
561 | #ifndef YYSIZE_T |
---|
562 | # ifdef __SIZE_TYPE__ |
---|
563 | # define YYSIZE_T __SIZE_TYPE__ |
---|
564 | # elif defined size_t |
---|
565 | # define YYSIZE_T size_t |
---|
566 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
567 | || defined __cplusplus || defined _MSC_VER) |
---|
568 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
---|
569 | # define YYSIZE_T size_t |
---|
570 | # else |
---|
571 | # define YYSIZE_T unsigned int |
---|
572 | # endif |
---|
573 | #endif |
---|
574 | |
---|
575 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
---|
576 | |
---|
577 | #ifndef YY_ |
---|
578 | # if YYENABLE_NLS |
---|
579 | # if ENABLE_NLS |
---|
580 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
---|
581 | # define YY_(msgid) dgettext ("bison-runtime", msgid) |
---|
582 | # endif |
---|
583 | # endif |
---|
584 | # ifndef YY_ |
---|
585 | # define YY_(msgid) msgid |
---|
586 | # endif |
---|
587 | #endif |
---|
588 | |
---|
589 | /* Suppress unused-variable warnings by "using" E. */ |
---|
590 | #if ! defined lint || defined __GNUC__ |
---|
591 | # define YYUSE(e) ((void) (e)) |
---|
592 | #else |
---|
593 | # define YYUSE(e) /* empty */ |
---|
594 | #endif |
---|
595 | |
---|
596 | /* Identity function, used to suppress warnings about constant conditions. */ |
---|
597 | #ifndef lint |
---|
598 | # define YYID(n) (n) |
---|
599 | #else |
---|
600 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
601 | || defined __cplusplus || defined _MSC_VER) |
---|
602 | static int |
---|
603 | YYID (int i) |
---|
604 | #else |
---|
605 | static int |
---|
606 | YYID (i) |
---|
607 | int i; |
---|
608 | #endif |
---|
609 | { |
---|
610 | return i; |
---|
611 | } |
---|
612 | #endif |
---|
613 | |
---|
614 | #if ! defined yyoverflow || YYERROR_VERBOSE |
---|
615 | |
---|
616 | /* The parser invokes alloca or malloc; define the necessary symbols. */ |
---|
617 | |
---|
618 | # ifdef YYSTACK_USE_ALLOCA |
---|
619 | # if YYSTACK_USE_ALLOCA |
---|
620 | # ifdef __GNUC__ |
---|
621 | # define YYSTACK_ALLOC __builtin_alloca |
---|
622 | # elif defined __BUILTIN_VA_ARG_INCR |
---|
623 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
---|
624 | # elif defined _AIX |
---|
625 | # define YYSTACK_ALLOC __alloca |
---|
626 | # elif defined _MSC_VER |
---|
627 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
---|
628 | # define alloca _alloca |
---|
629 | # else |
---|
630 | # define YYSTACK_ALLOC alloca |
---|
631 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
632 | || defined __cplusplus || defined _MSC_VER) |
---|
633 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
---|
634 | # ifndef _STDLIB_H |
---|
635 | # define _STDLIB_H 1 |
---|
636 | # endif |
---|
637 | # endif |
---|
638 | # endif |
---|
639 | # endif |
---|
640 | # endif |
---|
641 | |
---|
642 | # ifdef YYSTACK_ALLOC |
---|
643 | /* Pacify GCC's `empty if-body' warning. */ |
---|
644 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) |
---|
645 | # ifndef YYSTACK_ALLOC_MAXIMUM |
---|
646 | /* The OS might guarantee only one guard page at the bottom of the stack, |
---|
647 | and a page size can be as small as 4096 bytes. So we cannot safely |
---|
648 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
---|
649 | to allow for a few compiler-allocated temporary stack slots. */ |
---|
650 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
---|
651 | # endif |
---|
652 | # else |
---|
653 | # define YYSTACK_ALLOC YYMALLOC |
---|
654 | # define YYSTACK_FREE YYFREE |
---|
655 | # ifndef YYSTACK_ALLOC_MAXIMUM |
---|
656 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
---|
657 | # endif |
---|
658 | # if (defined __cplusplus && ! defined _STDLIB_H \ |
---|
659 | && ! ((defined YYMALLOC || defined malloc) \ |
---|
660 | && (defined YYFREE || defined free))) |
---|
661 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
---|
662 | # ifndef _STDLIB_H |
---|
663 | # define _STDLIB_H 1 |
---|
664 | # endif |
---|
665 | # endif |
---|
666 | # ifndef YYMALLOC |
---|
667 | # define YYMALLOC malloc |
---|
668 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
669 | || defined __cplusplus || defined _MSC_VER) |
---|
670 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
---|
671 | # endif |
---|
672 | # endif |
---|
673 | # ifndef YYFREE |
---|
674 | # define YYFREE free |
---|
675 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ |
---|
676 | || defined __cplusplus || defined _MSC_VER) |
---|
677 | void free (void *); /* INFRINGES ON USER NAME SPACE */ |
---|
678 | # endif |
---|
679 | # endif |
---|
680 | # endif |
---|
681 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
---|
682 | |
---|
683 | |
---|
684 | #if (! defined yyoverflow \ |
---|
685 | && (! defined __cplusplus \ |
---|
686 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
---|
687 | |
---|
688 | /* A type that is properly aligned for any stack member. */ |
---|
689 | union yyalloc |
---|
690 | { |
---|
691 | yytype_int16 yyss; |
---|
692 | YYSTYPE yyvs; |
---|
693 | }; |
---|
694 | |
---|
695 | /* The size of the maximum gap between one aligned stack and the next. */ |
---|
696 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
---|
697 | |
---|
698 | /* The size of an array large to enough to hold all stacks, each with |
---|
699 | N elements. */ |
---|
700 | # define YYSTACK_BYTES(N) \ |
---|
701 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
---|
702 | + YYSTACK_GAP_MAXIMUM) |
---|
703 | |
---|
704 | /* Copy COUNT objects from FROM to TO. The source and destination do |
---|
705 | not overlap. */ |
---|
706 | # ifndef YYCOPY |
---|
707 | # if defined __GNUC__ && 1 < __GNUC__ |
---|
708 | # define YYCOPY(To, From, Count) \ |
---|
709 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) |
---|
710 | # else |
---|
711 | # define YYCOPY(To, From, Count) \ |
---|
712 | do \ |
---|
713 | { \ |
---|
714 | YYSIZE_T yyi; \ |
---|
715 | for (yyi = 0; yyi < (Count); yyi++) \ |
---|
716 | (To)[yyi] = (From)[yyi]; \ |
---|
717 | } \ |
---|
718 | while (YYID (0)) |
---|
719 | # endif |
---|
720 | # endif |
---|
721 | |
---|
722 | /* Relocate STACK from its old location to the new one. The |
---|
723 | local variables YYSIZE and YYSTACKSIZE give the old and new number of |
---|
724 | elements in the stack, and YYPTR gives the new location of the |
---|
725 | stack. Advance YYPTR to a properly aligned location for the next |
---|
726 | stack. */ |
---|
727 | # define YYSTACK_RELOCATE(Stack) \ |
---|
728 | do \ |
---|
729 | { \ |
---|
730 | YYSIZE_T yynewbytes; \ |
---|
731 | YYCOPY (&yyptr->Stack, Stack, yysize); \ |
---|
732 | Stack = &yyptr->Stack; \ |
---|
733 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
---|
734 | yyptr += yynewbytes / sizeof (*yyptr); \ |
---|
735 | } \ |
---|
736 | while (YYID (0)) |
---|
737 | |
---|
738 | #endif |
---|
739 | |
---|
740 | /* YYFINAL -- State number of the termination state. */ |
---|
741 | #define YYFINAL 2 |
---|
742 | /* YYLAST -- Last index in YYTABLE. */ |
---|
743 | #define YYLAST 1957 |
---|
744 | |
---|
745 | /* YYNTOKENS -- Number of terminals. */ |
---|
746 | #define YYNTOKENS 145 |
---|
747 | /* YYNNTS -- Number of nonterminals. */ |
---|
748 | #define YYNNTS 44 |
---|
749 | /* YYNRULES -- Number of rules. */ |
---|
750 | #define YYNRULES 169 |
---|
751 | /* YYNRULES -- Number of states. */ |
---|
752 | #define YYNSTATES 375 |
---|
753 | |
---|
754 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ |
---|
755 | #define YYUNDEFTOK 2 |
---|
756 | #define YYMAXUTOK 381 |
---|
757 | |
---|
758 | #define YYTRANSLATE(YYX) \ |
---|
759 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
---|
760 | |
---|
761 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ |
---|
762 | static const yytype_uint8 yytranslate[] = |
---|
763 | { |
---|
764 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
765 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
766 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
767 | 2, 2, 2, 2, 2, 2, 2, 2, 137, 2, |
---|
768 | 141, 142, 139, 129, 135, 130, 143, 131, 2, 2, |
---|
769 | 2, 2, 2, 2, 2, 2, 2, 2, 138, 136, |
---|
770 | 127, 126, 128, 2, 2, 2, 2, 2, 2, 2, |
---|
771 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
772 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
773 | 2, 132, 2, 133, 134, 2, 144, 2, 2, 2, |
---|
774 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
775 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
776 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
777 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
778 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
779 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
780 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
781 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
782 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
783 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
784 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
785 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
786 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
787 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
788 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
---|
789 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, |
---|
790 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
---|
791 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, |
---|
792 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, |
---|
793 | 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, |
---|
794 | 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, |
---|
795 | 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, |
---|
796 | 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, |
---|
797 | 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, |
---|
798 | 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, |
---|
799 | 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, |
---|
800 | 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, |
---|
801 | 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, |
---|
802 | 125, 140 |
---|
803 | }; |
---|
804 | |
---|
805 | #if YYDEBUG |
---|
806 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in |
---|
807 | YYRHS. */ |
---|
808 | static const yytype_uint16 yyprhs[] = |
---|
809 | { |
---|
810 | 0, 0, 3, 4, 7, 9, 12, 15, 17, 19, |
---|
811 | 21, 24, 26, 28, 30, 32, 34, 36, 38, 40, |
---|
812 | 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, |
---|
813 | 64, 66, 68, 72, 76, 80, 85, 89, 91, 93, |
---|
814 | 95, 100, 104, 106, 108, 110, 114, 121, 126, 131, |
---|
815 | 136, 140, 145, 150, 154, 159, 166, 175, 182, 191, |
---|
816 | 196, 201, 208, 213, 220, 229, 238, 242, 247, 256, |
---|
817 | 261, 270, 275, 284, 289, 293, 299, 300, 306, 309, |
---|
818 | 311, 314, 317, 321, 325, 329, 333, 337, 341, 345, |
---|
819 | 349, 353, 357, 360, 363, 366, 369, 371, 375, 377, |
---|
820 | 379, 382, 385, 388, 391, 400, 403, 412, 415, 419, |
---|
821 | 422, 424, 426, 432, 434, 436, 441, 443, 447, 449, |
---|
822 | 453, 455, 456, 461, 465, 468, 472, 475, 478, 482, |
---|
823 | 487, 492, 497, 502, 507, 512, 517, 522, 527, 534, |
---|
824 | 541, 548, 555, 562, 569, 576, 583, 587, 589, 598, |
---|
825 | 601, 604, 606, 608, 611, 614, 616, 622, 625, 631, |
---|
826 | 633, 635, 639, 645, 649, 653, 658, 661, 664, 669 |
---|
827 | }; |
---|
828 | |
---|
829 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ |
---|
830 | static const yytype_int16 yyrhs[] = |
---|
831 | { |
---|
832 | 146, 0, -1, -1, 146, 147, -1, 148, -1, 150, |
---|
833 | 136, -1, 162, 136, -1, 188, -1, 121, -1, 136, |
---|
834 | -1, 1, 136, -1, 183, -1, 184, -1, 149, -1, |
---|
835 | 185, -1, 186, -1, 170, -1, 172, -1, 173, -1, |
---|
836 | 100, 109, -1, 151, -1, 174, -1, 175, -1, 176, |
---|
837 | -1, 187, -1, 178, -1, 179, -1, 181, -1, 182, |
---|
838 | -1, 159, 153, -1, 112, -1, 160, -1, 152, 11, |
---|
839 | 152, -1, 152, 143, 152, -1, 152, 141, 142, -1, |
---|
840 | 152, 141, 153, 142, -1, 132, 153, 133, -1, 110, |
---|
841 | -1, 125, -1, 163, -1, 14, 141, 154, 142, -1, |
---|
842 | 153, 135, 154, -1, 154, -1, 158, -1, 152, -1, |
---|
843 | 141, 153, 142, -1, 154, 132, 154, 135, 154, 133, |
---|
844 | -1, 154, 132, 154, 133, -1, 97, 141, 154, 142, |
---|
845 | -1, 98, 141, 153, 142, -1, 98, 141, 142, -1, |
---|
846 | 99, 141, 154, 142, -1, 161, 141, 153, 142, -1, |
---|
847 | 161, 141, 142, -1, 89, 141, 154, 142, -1, 90, |
---|
848 | 141, 154, 135, 154, 142, -1, 91, 141, 154, 135, |
---|
849 | 154, 135, 154, 142, -1, 94, 141, 154, 135, 154, |
---|
850 | 142, -1, 94, 141, 154, 135, 154, 135, 154, 142, |
---|
851 | -1, 92, 141, 154, 142, -1, 93, 141, 154, 142, |
---|
852 | -1, 92, 141, 154, 135, 154, 142, -1, 95, 141, |
---|
853 | 154, 142, -1, 95, 141, 154, 135, 154, 142, -1, |
---|
854 | 93, 141, 154, 135, 154, 135, 154, 142, -1, 95, |
---|
855 | 141, 154, 135, 154, 135, 154, 142, -1, 96, 141, |
---|
856 | 142, -1, 96, 141, 153, 142, -1, 19, 141, 154, |
---|
857 | 135, 154, 135, 154, 142, -1, 19, 141, 154, 142, |
---|
858 | -1, 13, 141, 154, 135, 154, 135, 154, 142, -1, |
---|
859 | 13, 141, 154, 142, -1, 15, 141, 164, 135, 164, |
---|
860 | 135, 168, 142, -1, 15, 141, 154, 142, -1, 156, |
---|
861 | 154, 157, -1, 156, 154, 126, 154, 157, -1, -1, |
---|
862 | 117, 141, 155, 154, 142, -1, 118, 141, -1, 142, |
---|
863 | -1, 154, 10, -1, 154, 7, -1, 154, 129, 154, |
---|
864 | -1, 154, 130, 154, -1, 154, 131, 154, -1, 154, |
---|
865 | 134, 154, -1, 154, 127, 154, -1, 154, 137, 154, |
---|
866 | -1, 154, 9, 154, -1, 154, 4, 154, -1, 154, |
---|
867 | 3, 154, -1, 154, 138, 154, -1, 8, 154, -1, |
---|
868 | 130, 154, -1, 162, 169, -1, 153, 126, -1, 111, |
---|
869 | -1, 144, 154, 144, -1, 17, -1, 20, -1, 97, |
---|
870 | 152, -1, 98, 152, -1, 99, 152, -1, 161, 152, |
---|
871 | -1, 19, 152, 132, 154, 133, 132, 154, 133, -1, |
---|
872 | 19, 152, -1, 13, 152, 132, 154, 133, 132, 154, |
---|
873 | 133, -1, 13, 152, -1, 162, 135, 152, -1, 14, |
---|
874 | 152, -1, 108, -1, 154, -1, 141, 154, 135, 153, |
---|
875 | 142, -1, 111, -1, 165, -1, 165, 141, 153, 142, |
---|
876 | -1, 166, -1, 166, 135, 167, -1, 166, -1, 141, |
---|
877 | 167, 142, -1, 126, -1, -1, 127, 163, 171, 136, |
---|
878 | -1, 102, 108, 136, -1, 102, 136, -1, 100, 108, |
---|
879 | 136, -1, 101, 153, -1, 103, 152, -1, 175, 135, |
---|
880 | 152, -1, 105, 141, 97, 142, -1, 105, 141, 98, |
---|
881 | 142, -1, 105, 141, 99, 142, -1, 105, 141, 161, |
---|
882 | 142, -1, 105, 141, 15, 142, -1, 105, 141, 19, |
---|
883 | 142, -1, 105, 141, 13, 142, -1, 105, 141, 14, |
---|
884 | 142, -1, 105, 141, 152, 142, -1, 105, 141, 152, |
---|
885 | 135, 97, 142, -1, 105, 141, 152, 135, 98, 142, |
---|
886 | -1, 105, 141, 152, 135, 99, 142, -1, 105, 141, |
---|
887 | 152, 135, 161, 142, -1, 105, 141, 152, 135, 15, |
---|
888 | 142, -1, 105, 141, 152, 135, 19, 142, -1, 105, |
---|
889 | 141, 152, 135, 13, 142, -1, 105, 141, 152, 135, |
---|
890 | 14, 142, -1, 105, 141, 142, -1, 15, -1, 177, |
---|
891 | 152, 169, 164, 135, 164, 135, 168, -1, 177, 152, |
---|
892 | -1, 125, 163, -1, 106, -1, 39, -1, 180, 154, |
---|
893 | -1, 107, 154, -1, 153, -1, 120, 141, 154, 142, |
---|
894 | 109, -1, 116, 109, -1, 120, 141, 154, 142, 114, |
---|
895 | -1, 114, -1, 115, -1, 122, 108, 109, -1, 119, |
---|
896 | 108, 108, 108, 109, -1, 14, 160, 109, -1, 113, |
---|
897 | 108, 109, -1, 113, 108, 108, 109, -1, 124, 162, |
---|
898 | -1, 124, 154, -1, 123, 141, 153, 142, -1, 123, |
---|
899 | 141, 142, -1 |
---|
900 | }; |
---|
901 | |
---|
902 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ |
---|
903 | static const yytype_uint16 yyrline[] = |
---|
904 | { |
---|
905 | 0, 357, 357, 359, 393, 394, 396, 398, 402, 407, |
---|
906 | 409, 460, 461, 462, 463, 464, 465, 466, 467, 471, |
---|
907 | 474, 475, 476, 477, 478, 479, 480, 481, 482, 485, |
---|
908 | 492, 497, 501, 505, 509, 513, 526, 554, 578, 584, |
---|
909 | 590, 597, 608, 614, 619, 620, 621, 625, 629, 633, |
---|
910 | 637, 641, 645, 649, 653, 657, 661, 665, 669, 673, |
---|
911 | 677, 681, 685, 689, 693, 697, 701, 705, 709, 713, |
---|
912 | 717, 721, 725, 729, 733, 737, 755, 754, 772, 780, |
---|
913 | 789, 793, 797, 801, 805, 809, 813, 817, 821, 825, |
---|
914 | 829, 833, 837, 844, 851, 852, 871, 872, 884, 884, |
---|
915 | 889, 894, 899, 903, 907, 923, 927, 943, 957, 978, |
---|
916 | 986, 990, 991, 1005, 1013, 1022, 1067, 1068, 1077, 1078, |
---|
917 | 1084, 1097, 1096, 1104, 1109, 1116, 1124, 1136, 1152, 1171, |
---|
918 | 1175, 1179, 1184, 1188, 1192, 1196, 1200, 1204, 1209, 1215, |
---|
919 | 1221, 1227, 1233, 1239, 1245, 1251, 1263, 1270, 1274, 1312, |
---|
920 | 1322, 1335, 1335, 1338, 1410, 1416, 1445, 1458, 1475, 1484, |
---|
921 | 1489, 1497, 1509, 1528, 1539, 1559, 1583, 1589, 1601, 1608 |
---|
922 | }; |
---|
923 | #endif |
---|
924 | |
---|
925 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE |
---|
926 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
---|
927 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
---|
928 | static const char *const yytname[] = |
---|
929 | { |
---|
930 | "$end", "error", "$undefined", "DOTDOT", "EQUAL_EQUAL", "GE", "LE", |
---|
931 | "MINUSMINUS", "NOT", "NOTEQUAL", "PLUSPLUS", "COLONCOLON", "GRING_CMD", |
---|
932 | "INTMAT_CMD", "PROC_CMD", "RING_CMD", "BEGIN_RING", "IDEAL_CMD", |
---|
933 | "MAP_CMD", "MATRIX_CMD", "MODUL_CMD", "NUMBER_CMD", "POLY_CMD", |
---|
934 | "RESOLUTION_CMD", "VECTOR_CMD", "BETTI_CMD", "COEFFS_CMD", "COEF_CMD", |
---|
935 | "CONTRACT_CMD", "DEGREE_CMD", "DEG_CMD", "DIFF_CMD", "DIM_CMD", |
---|
936 | "DIVISION_CMD", "ELIMINATION_CMD", "E_CMD", "FAREY_CMD", "FETCH_CMD", |
---|
937 | "FREEMODULE_CMD", "KEEPRING_CMD", "HILBERT_CMD", "HOMOG_CMD", "IMAP_CMD", |
---|
938 | "INDEPSET_CMD", "INTERRED_CMD", "INTERSECT_CMD", "JACOB_CMD", "JET_CMD", |
---|
939 | "KBASE_CMD", "KOSZUL_CMD", "LEADCOEF_CMD", "LEADEXP_CMD", "LEAD_CMD", |
---|
940 | "LEADMONOM_CMD", "LIFTSTD_CMD", "LIFT_CMD", "MAXID_CMD", "MINBASE_CMD", |
---|
941 | "MINOR_CMD", "MINRES_CMD", "MODULO_CMD", "MONOM_CMD", "MRES_CMD", |
---|
942 | "MULTIPLICITY_CMD", "ORD_CMD", "PAR_CMD", "PARDEG_CMD", "PREIMAGE_CMD", |
---|
943 | "QUOTIENT_CMD", "QHWEIGHT_CMD", "REDUCE_CMD", "REGULARITY_CMD", |
---|
944 | "RES_CMD", "SIMPLIFY_CMD", "SORTVEC_CMD", "SRES_CMD", "STD_CMD", |
---|
945 | "SUBST_CMD", "SYZYGY_CMD", "VAR_CMD", "VDIM_CMD", "WEDGE_CMD", |
---|
946 | "WEIGHT_CMD", "VALTVARS", "VMAXDEG", "VMAXMULT", "VNOETHER", "VMINPOLY", |
---|
947 | "END_RING", "CMD_1", "CMD_2", "CMD_3", "CMD_12", "CMD_13", "CMD_23", |
---|
948 | "CMD_123", "CMD_M", "ROOT_DECL", "ROOT_DECL_LIST", "RING_DECL", |
---|
949 | "EXAMPLE_CMD", "EXPORT_CMD", "HELP_CMD", "KILL_CMD", "LIB_CMD", |
---|
950 | "LISTVAR_CMD", "SETRING_CMD", "TYPE_CMD", "STRINGTOK", "BLOCKTOK", |
---|
951 | "INT_CONST", "UNKNOWN_IDENT", "RINGVAR", "PROC_DEF", "BREAK_CMD", |
---|
952 | "CONTINUE_CMD", "ELSE_CMD", "EVAL", "QUOTE", "FOR_CMD", "IF_CMD", |
---|
953 | "SYS_BREAK", "WHILE_CMD", "RETURN", "PARAMETER", "SYSVAR", "'='", "'<'", |
---|
954 | "'>'", "'+'", "'-'", "'/'", "'['", "']'", "'^'", "','", "';'", "'&'", |
---|
955 | "':'", "'*'", "UMINUS", "'('", "')'", "'.'", "'`'", "$accept", "lines", |
---|
956 | "pprompt", "flowctrl", "example_dummy", "command", "assign", "elemexpr", |
---|
957 | "exprlist", "expr", "@1", "quote_start", "quote_end", "expr_arithmetic", |
---|
958 | "left_value", "extendedid", "currring_lists", "declare_ip_variable", |
---|
959 | "stringexpr", "rlist", "ordername", "orderelem", "OrderingList", |
---|
960 | "ordering", "cmdeq", "filecmd", "@2", "helpcmd", "examplecmd", |
---|
961 | "exportcmd", "killcmd", "listcmd", "ringcmd1", "ringcmd", "scriptcmd", |
---|
962 | "setrings", "setringcmd", "typecmd", "ifcmd", "whilecmd", "forcmd", |
---|
963 | "proccmd", "parametercmd", "returncmd", 0 |
---|
964 | }; |
---|
965 | #endif |
---|
966 | |
---|
967 | # ifdef YYPRINT |
---|
968 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to |
---|
969 | token YYLEX-NUM. */ |
---|
970 | static const yytype_uint16 yytoknum[] = |
---|
971 | { |
---|
972 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
---|
973 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
---|
974 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, |
---|
975 | 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, |
---|
976 | 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, |
---|
977 | 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, |
---|
978 | 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, |
---|
979 | 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, |
---|
980 | 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, |
---|
981 | 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, |
---|
982 | 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, |
---|
983 | 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, |
---|
984 | 375, 376, 377, 378, 379, 380, 61, 60, 62, 43, |
---|
985 | 45, 47, 91, 93, 94, 44, 59, 38, 58, 42, |
---|
986 | 381, 40, 41, 46, 96 |
---|
987 | }; |
---|
988 | # endif |
---|
989 | |
---|
990 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
---|
991 | static const yytype_uint8 yyr1[] = |
---|
992 | { |
---|
993 | 0, 145, 146, 146, 147, 147, 147, 147, 147, 147, |
---|
994 | 147, 148, 148, 148, 148, 148, 148, 148, 148, 149, |
---|
995 | 150, 150, 150, 150, 150, 150, 150, 150, 150, 151, |
---|
996 | 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, |
---|
997 | 152, 153, 153, 154, 154, 154, 154, 154, 154, 154, |
---|
998 | 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, |
---|
999 | 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, |
---|
1000 | 154, 154, 154, 154, 154, 154, 155, 154, 156, 157, |
---|
1001 | 158, 158, 158, 158, 158, 158, 158, 158, 158, 158, |
---|
1002 | 158, 158, 158, 158, 159, 159, 160, 160, 161, 161, |
---|
1003 | 162, 162, 162, 162, 162, 162, 162, 162, 162, 162, |
---|
1004 | 163, 164, 164, 165, 166, 166, 167, 167, 168, 168, |
---|
1005 | 169, 171, 170, 172, 172, 173, 174, 175, 175, 176, |
---|
1006 | 176, 176, 176, 176, 176, 176, 176, 176, 176, 176, |
---|
1007 | 176, 176, 176, 176, 176, 176, 176, 177, 178, 178, |
---|
1008 | 179, 180, 180, 181, 182, 182, 183, 183, 183, 183, |
---|
1009 | 183, 184, 185, 186, 186, 186, 187, 187, 188, 188 |
---|
1010 | }; |
---|
1011 | |
---|
1012 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ |
---|
1013 | static const yytype_uint8 yyr2[] = |
---|
1014 | { |
---|
1015 | 0, 2, 0, 2, 1, 2, 2, 1, 1, 1, |
---|
1016 | 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, |
---|
1017 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, |
---|
1018 | 1, 1, 3, 3, 3, 4, 3, 1, 1, 1, |
---|
1019 | 4, 3, 1, 1, 1, 3, 6, 4, 4, 4, |
---|
1020 | 3, 4, 4, 3, 4, 6, 8, 6, 8, 4, |
---|
1021 | 4, 6, 4, 6, 8, 8, 3, 4, 8, 4, |
---|
1022 | 8, 4, 8, 4, 3, 5, 0, 5, 2, 1, |
---|
1023 | 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, |
---|
1024 | 3, 3, 2, 2, 2, 2, 1, 3, 1, 1, |
---|
1025 | 2, 2, 2, 2, 8, 2, 8, 2, 3, 2, |
---|
1026 | 1, 1, 5, 1, 1, 4, 1, 3, 1, 3, |
---|
1027 | 1, 0, 4, 3, 2, 3, 2, 2, 3, 4, |
---|
1028 | 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, |
---|
1029 | 6, 6, 6, 6, 6, 6, 3, 1, 8, 2, |
---|
1030 | 2, 1, 1, 2, 2, 1, 5, 2, 5, 1, |
---|
1031 | 1, 3, 5, 3, 3, 4, 2, 2, 4, 3 |
---|
1032 | }; |
---|
1033 | |
---|
1034 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state |
---|
1035 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero |
---|
1036 | means the default is an error. */ |
---|
1037 | static const yytype_uint8 yydefact[] = |
---|
1038 | { |
---|
1039 | 2, 0, 1, 0, 0, 0, 0, 147, 98, 0, |
---|
1040 | 99, 152, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
1041 | 0, 0, 0, 0, 0, 0, 0, 0, 151, 0, |
---|
1042 | 110, 37, 96, 30, 0, 159, 160, 0, 0, 0, |
---|
1043 | 0, 0, 8, 0, 0, 0, 38, 0, 0, 0, |
---|
1044 | 9, 0, 0, 3, 4, 13, 0, 20, 44, 155, |
---|
1045 | 42, 0, 43, 0, 31, 0, 0, 39, 16, 17, |
---|
1046 | 18, 21, 22, 23, 0, 25, 26, 0, 27, 28, |
---|
1047 | 11, 12, 14, 15, 24, 7, 10, 0, 0, 0, |
---|
1048 | 0, 0, 0, 0, 38, 92, 0, 0, 107, 0, |
---|
1049 | 109, 31, 0, 0, 105, 0, 0, 0, 0, 0, |
---|
1050 | 0, 0, 0, 0, 100, 0, 101, 0, 102, 0, |
---|
1051 | 19, 126, 0, 124, 127, 0, 154, 0, 157, 76, |
---|
1052 | 78, 0, 0, 0, 0, 0, 167, 166, 150, 121, |
---|
1053 | 93, 0, 0, 0, 5, 0, 0, 0, 95, 0, |
---|
1054 | 0, 0, 81, 0, 80, 0, 0, 0, 0, 0, |
---|
1055 | 0, 0, 0, 0, 29, 0, 103, 120, 0, 6, |
---|
1056 | 94, 0, 149, 153, 0, 0, 0, 163, 0, 111, |
---|
1057 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
1058 | 66, 0, 0, 50, 0, 0, 125, 123, 0, 0, |
---|
1059 | 0, 0, 0, 0, 0, 146, 0, 0, 0, 164, |
---|
1060 | 0, 0, 0, 161, 169, 0, 0, 36, 45, 97, |
---|
1061 | 32, 34, 0, 33, 41, 90, 89, 88, 86, 82, |
---|
1062 | 83, 84, 0, 85, 87, 91, 0, 79, 74, 53, |
---|
1063 | 0, 108, 128, 0, 0, 71, 0, 40, 42, 73, |
---|
1064 | 0, 0, 69, 0, 54, 0, 0, 0, 59, 0, |
---|
1065 | 60, 0, 0, 62, 67, 48, 49, 51, 135, 136, |
---|
1066 | 133, 134, 129, 130, 131, 0, 137, 132, 165, 0, |
---|
1067 | 0, 0, 168, 122, 35, 47, 0, 0, 52, 111, |
---|
1068 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
1069 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
1070 | 0, 77, 162, 156, 158, 0, 75, 0, 0, 0, |
---|
1071 | 0, 0, 0, 0, 55, 0, 61, 0, 0, 57, |
---|
1072 | 0, 63, 144, 145, 142, 143, 138, 139, 140, 141, |
---|
1073 | 46, 0, 0, 0, 112, 113, 0, 114, 118, 0, |
---|
1074 | 0, 0, 0, 0, 0, 0, 0, 70, 106, 116, |
---|
1075 | 0, 0, 72, 68, 104, 56, 64, 58, 65, 148, |
---|
1076 | 0, 119, 0, 117, 115 |
---|
1077 | }; |
---|
1078 | |
---|
1079 | /* YYDEFGOTO[NTERM-NUM]. */ |
---|
1080 | static const yytype_int16 yydefgoto[] = |
---|
1081 | { |
---|
1082 | -1, 1, 53, 54, 55, 56, 57, 58, 142, 60, |
---|
1083 | 210, 61, 238, 62, 63, 64, 96, 66, 67, 180, |
---|
1084 | 347, 348, 360, 349, 170, 68, 216, 69, 70, 71, |
---|
1085 | 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, |
---|
1086 | 82, 83, 84, 85 |
---|
1087 | }; |
---|
1088 | |
---|
1089 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
---|
1090 | STATE-NUM. */ |
---|
1091 | #define YYPACT_NINF -327 |
---|
1092 | static const yytype_int16 yypact[] = |
---|
1093 | { |
---|
1094 | -327, 283, -327, -79, 1263, 957, 1010, -126, -327, 1747, |
---|
1095 | -327, -327, -76, -72, -55, -51, -45, -44, -42, -40, |
---|
1096 | 1765, 1770, 1775, -107, 1263, -97, 222, -39, -327, 1263, |
---|
1097 | -327, -327, -327, -327, -8, -327, -327, -4, -35, -29, |
---|
1098 | 0, -28, -327, 8, -23, 1319, 11, 11, 1263, 1263, |
---|
1099 | -327, 1263, 1263, -327, -327, -327, -14, -327, 1, -98, |
---|
1100 | 1704, 1263, -327, 1263, -327, 1813, -81, -327, -327, -327, |
---|
1101 | -327, -327, -5, -327, 222, -327, -327, 1263, -327, -327, |
---|
1102 | -327, -327, -327, -327, -327, -327, -327, -7, 17, -126, |
---|
1103 | 43, 53, 57, 58, -327, 23, 61, 1263, 29, 1263, |
---|
1104 | 1, 39, 1377, 1263, 60, 1263, 1263, 1263, 1263, 1263, |
---|
1105 | 1263, 1263, 903, 1263, 1, 1035, 1, 1263, 1, 68, |
---|
1106 | -327, 70, 73, -327, 1, 1638, 1704, -33, -327, -327, |
---|
1107 | -327, 98, 1263, 99, 1091, 1010, 1704, 76, -327, -327, |
---|
1108 | 23, -61, -121, 22, -327, 222, 1149, 222, -327, 1263, |
---|
1109 | 1263, 1263, -327, 1263, -327, 1263, 1263, 1263, 1263, 1263, |
---|
1110 | 1263, 1263, 1263, 100, 70, 1205, 1, -327, 222, -327, |
---|
1111 | -327, 222, 69, 1704, 178, 1263, 496, -327, 1263, 510, |
---|
1112 | 78, 314, 1263, 524, 1396, 1416, 346, 360, 1431, 413, |
---|
1113 | -327, -108, 563, -327, -100, 586, -327, -327, 74, -59, |
---|
1114 | 79, 80, 81, 82, 83, -327, 48, 91, 105, -327, |
---|
1115 | 1263, 107, 600, -327, -327, -92, 84, -327, -327, -327, |
---|
1116 | 75, -327, -89, -327, 1704, 1716, 486, 486, 332, 31, |
---|
1117 | 31, 23, 946, 54, 9, 31, 1263, -327, -327, -327, |
---|
1118 | -86, 1, 1, 1377, 1263, -327, 1443, -327, 1455, -327, |
---|
1119 | 1377, 1263, -327, 1474, -327, 1263, 1263, 1263, -327, 1263, |
---|
1120 | -327, 1263, 1263, -327, -327, -327, -327, -327, -327, -327, |
---|
1121 | -327, -327, -327, -327, -327, -10, -327, -327, -327, 660, |
---|
1122 | 126, -41, -327, -327, -327, -327, 1263, 674, -327, 1704, |
---|
1123 | 104, 1489, 109, 1263, 110, 1501, 112, 699, 1532, 736, |
---|
1124 | 1637, 427, 450, 106, 108, 111, 113, 114, 115, 116, |
---|
1125 | 117, -327, -327, -327, -327, 1668, -327, 1377, 1263, 1263, |
---|
1126 | -84, -105, 1263, 1263, -327, 1263, -327, 1263, 1263, -327, |
---|
1127 | 1263, -327, -327, -327, -327, -327, -327, -327, -327, -327, |
---|
1128 | -327, 125, 750, 1680, -327, -327, 135, 122, -327, 123, |
---|
1129 | 764, 1692, 810, 835, 849, 900, -105, -327, -327, 129, |
---|
1130 | 124, 1263, -327, -327, -327, -327, -327, -327, -327, -327, |
---|
1131 | 135, -327, -75, -327, -327 |
---|
1132 | }; |
---|
1133 | |
---|
1134 | /* YYPGOTO[NTERM-NUM]. */ |
---|
1135 | static const yytype_int16 yypgoto[] = |
---|
1136 | { |
---|
1137 | -327, -327, -327, -327, -327, -327, -327, 72, -1, 18, |
---|
1138 | -327, -327, -38, -327, -327, 241, 7, 206, 38, -226, |
---|
1139 | -327, -326, -118, -85, 95, -327, -327, -327, -327, -327, |
---|
1140 | -327, -327, -327, -327, -327, -327, -327, -327, -327, -327, |
---|
1141 | -327, -327, -327, -327 |
---|
1142 | }; |
---|
1143 | |
---|
1144 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If |
---|
1145 | positive, shift that token. If negative, reduce the rule which |
---|
1146 | number is the opposite. If zero, do what YYDEFACT says. |
---|
1147 | If YYTABLE_NINF, syntax error. */ |
---|
1148 | #define YYTABLE_NINF -1 |
---|
1149 | static const yytype_int16 yytable[] = |
---|
1150 | { |
---|
1151 | 59, 119, 120, 303, 304, 305, 345, 8, 65, 306, |
---|
1152 | 10, 122, 145, 151, 149, 102, 152, 290, 153, 154, |
---|
1153 | 359, 218, 95, 121, 294, 150, 151, 149, 148, 152, |
---|
1154 | 152, 153, 154, 154, 264, 149, 346, 149, 152, 123, |
---|
1155 | 145, 154, 266, 149, 359, 167, 149, 126, 141, 149, |
---|
1156 | 282, 149, 65, 284, 168, 169, 288, 86, 344, 145, |
---|
1157 | 149, 152, 164, 136, 154, 105, 140, 374, 313, 106, |
---|
1158 | 143, 145, 217, 314, 149, 208, 209, 98, 100, 163, |
---|
1159 | 145, 104, 99, 269, 138, 139, 107, 307, 308, 309, |
---|
1160 | 108, 341, 114, 116, 118, 173, 109, 110, 124, 111, |
---|
1161 | 127, 112, 125, 150, 151, 128, 129, 152, 131, 153, |
---|
1162 | 154, 191, 130, 132, 194, 174, 133, 176, 134, 30, |
---|
1163 | 179, 181, 144, 183, 184, 185, 186, 187, 188, 189, |
---|
1164 | 171, 192, 207, 215, 97, 195, 155, 166, 156, 157, |
---|
1165 | 158, 159, 146, 160, 147, 222, 172, 162, 177, 155, |
---|
1166 | 212, 156, 157, 158, 159, 159, 160, 160, 99, 161, |
---|
1167 | 162, 175, 158, 159, 240, 160, 219, 224, 225, 226, |
---|
1168 | 146, 227, 147, 228, 229, 230, 231, 232, 233, 234, |
---|
1169 | 235, 150, 151, 275, 103, 152, 159, 153, 154, 146, |
---|
1170 | 276, 147, 182, 246, 113, 167, 248, 206, 115, 117, |
---|
1171 | 253, 146, 165, 147, 196, 149, 211, 100, 213, 197, |
---|
1172 | 146, 168, 147, 250, 278, 280, 268, 220, 147, 223, |
---|
1173 | 283, 270, 271, 272, 273, 274, 236, 155, 279, 156, |
---|
1174 | 157, 158, 159, 277, 160, 312, 88, 161, 162, 317, |
---|
1175 | 241, 319, 237, 242, 323, 321, 345, 101, 332, 316, |
---|
1176 | 333, 137, 373, 334, 287, 335, 336, 337, 338, 339, |
---|
1177 | 356, 289, 291, 361, 370, 362, 371, 243, 289, 295, |
---|
1178 | 0, 369, 0, 297, 298, 299, 0, 300, 0, 301, |
---|
1179 | 302, 0, 310, 2, 3, 0, 0, 0, 0, 0, |
---|
1180 | 0, 4, 320, 0, 0, 0, 5, 6, 7, 0, |
---|
1181 | 8, 0, 9, 10, 315, 155, 0, 156, 157, 158, |
---|
1182 | 159, 0, 160, 244, 0, 161, 162, 150, 151, 0, |
---|
1183 | 245, 152, 11, 153, 154, 0, 0, 0, 0, 0, |
---|
1184 | 30, 0, 31, 32, 33, 289, 342, 343, 0, 152, |
---|
1185 | 350, 351, 154, 352, 0, 353, 354, 94, 355, 150, |
---|
1186 | 151, 0, 0, 152, 49, 153, 154, 0, 0, 0, |
---|
1187 | 372, 0, 0, 150, 151, 0, 52, 152, 0, 153, |
---|
1188 | 154, 0, 12, 13, 14, 15, 16, 17, 18, 19, |
---|
1189 | 20, 21, 22, 23, 24, 25, 26, 0, 27, 28, |
---|
1190 | 29, 30, 0, 31, 32, 33, 34, 35, 36, 37, |
---|
1191 | 38, 39, 40, 41, 42, 43, 44, 45, 46, 0, |
---|
1192 | 47, 0, 0, 48, 0, 49, 150, 151, 0, 50, |
---|
1193 | 152, 0, 153, 154, 51, 0, 0, 52, 0, 0, |
---|
1194 | 150, 151, 0, 0, 152, 0, 153, 154, 0, 0, |
---|
1195 | 0, 155, 0, 156, 157, 158, 159, 0, 160, 251, |
---|
1196 | 0, 161, 162, 150, 151, 0, 252, 152, 0, 153, |
---|
1197 | 154, 156, 157, 158, 159, 0, 160, 0, 0, 0, |
---|
1198 | 162, 0, 0, 155, 0, 156, 157, 158, 159, 0, |
---|
1199 | 160, 257, 0, 161, 162, 0, 0, 155, 258, 156, |
---|
1200 | 157, 158, 159, 152, 160, 259, 154, 161, 162, 150, |
---|
1201 | 151, 0, 260, 152, 0, 153, 154, 0, 0, 0, |
---|
1202 | 0, 0, 0, 150, 151, 0, 0, 152, 0, 153, |
---|
1203 | 154, 0, 0, 0, 0, 0, 0, 150, 151, 0, |
---|
1204 | 0, 152, 0, 153, 154, 0, 0, 0, 0, 0, |
---|
1205 | 155, 0, 156, 157, 158, 159, 0, 160, 262, 0, |
---|
1206 | 161, 162, 0, 0, 155, 263, 156, 157, 158, 159, |
---|
1207 | 0, 160, 328, 0, 161, 162, 150, 151, 0, 329, |
---|
1208 | 152, 0, 153, 154, 0, 0, 0, 155, 0, 156, |
---|
1209 | 157, 158, 159, 0, 160, 330, 0, 161, 162, 150, |
---|
1210 | 151, 0, 331, 152, 0, 153, 154, 0, 0, 0, |
---|
1211 | 0, 0, 0, 150, 151, 0, 0, 152, 0, 153, |
---|
1212 | 154, 0, 0, 155, 0, 156, 157, 158, 159, 0, |
---|
1213 | 160, 0, 0, 155, 162, 156, 157, 158, 159, 0, |
---|
1214 | 160, 0, 0, 161, 162, 0, 0, 155, 247, 156, |
---|
1215 | 157, 158, 159, 0, 160, 0, 0, 161, 162, 0, |
---|
1216 | 0, 155, 249, 156, 157, 158, 159, 0, 160, 0, |
---|
1217 | 0, 161, 162, 150, 151, 0, 254, 152, 0, 153, |
---|
1218 | 154, 0, 0, 0, 0, 0, 0, 150, 151, 0, |
---|
1219 | 0, 152, 0, 153, 154, 0, 0, 0, 0, 0, |
---|
1220 | 155, 0, 156, 157, 158, 159, 0, 160, 0, 0, |
---|
1221 | 161, 162, 150, 151, 0, 265, 152, 0, 153, 154, |
---|
1222 | 0, 0, 0, 155, 0, 156, 157, 158, 159, 0, |
---|
1223 | 160, 0, 0, 161, 162, 0, 0, 155, 267, 156, |
---|
1224 | 157, 158, 159, 0, 160, 0, 0, 161, 162, 150, |
---|
1225 | 151, 0, 281, 152, 0, 153, 154, 0, 0, 0, |
---|
1226 | 0, 0, 0, 150, 151, 0, 0, 152, 0, 153, |
---|
1227 | 154, 0, 0, 0, 0, 0, 0, 150, 151, 0, |
---|
1228 | 0, 152, 0, 153, 154, 0, 0, 0, 0, 0, |
---|
1229 | 0, 0, 0, 0, 0, 0, 0, 155, 0, 156, |
---|
1230 | 157, 158, 159, 0, 160, 0, 0, 161, 162, 0, |
---|
1231 | 0, 155, 311, 156, 157, 158, 159, 0, 160, 0, |
---|
1232 | 0, 161, 162, 150, 151, 0, 237, 152, 0, 153, |
---|
1233 | 154, 0, 0, 0, 0, 0, 155, 0, 156, 157, |
---|
1234 | 158, 159, 0, 160, 0, 0, 161, 162, 150, 151, |
---|
1235 | 0, 324, 152, 0, 153, 154, 0, 0, 0, 0, |
---|
1236 | 0, 0, 150, 151, 0, 0, 152, 0, 153, 154, |
---|
1237 | 0, 0, 0, 155, 0, 156, 157, 158, 159, 0, |
---|
1238 | 160, 0, 0, 161, 162, 0, 0, 155, 326, 156, |
---|
1239 | 157, 158, 159, 0, 160, 0, 0, 161, 162, 0, |
---|
1240 | 0, 155, 357, 156, 157, 158, 159, 0, 160, 0, |
---|
1241 | 0, 161, 162, 150, 151, 0, 363, 152, 0, 153, |
---|
1242 | 154, 4, 0, 0, 0, 0, 87, 88, 89, 0, |
---|
1243 | 8, 0, 90, 10, 0, 0, 0, 0, 0, 0, |
---|
1244 | 0, 0, 0, 0, 0, 0, 0, 155, 0, 156, |
---|
1245 | 157, 158, 159, 0, 160, 0, 0, 161, 162, 150, |
---|
1246 | 151, 0, 365, 152, 0, 153, 154, 0, 0, 0, |
---|
1247 | 0, 0, 155, 0, 156, 157, 158, 159, 0, 160, |
---|
1248 | 0, 88, 161, 162, 0, 0, 155, 366, 156, 157, |
---|
1249 | 158, 159, 0, 160, 0, 0, 161, 162, 0, 0, |
---|
1250 | 0, 367, 12, 13, 14, 15, 16, 17, 18, 19, |
---|
1251 | 91, 92, 93, 0, 0, 0, 0, 0, 0, 0, |
---|
1252 | 0, 30, 0, 31, 32, 33, 0, 0, 0, 0, |
---|
1253 | 38, 39, 0, 0, 88, 0, 0, 155, 94, 156, |
---|
1254 | 157, 158, 159, 48, 160, 49, 0, 161, 162, 0, |
---|
1255 | 0, 0, 368, 4, 51, 190, 0, 52, 87, 88, |
---|
1256 | 89, 0, 8, 0, 90, 10, 0, 0, 0, 0, |
---|
1257 | 0, 0, 0, 0, 0, 30, 0, 31, 32, 33, |
---|
1258 | 0, 0, 0, 155, 0, 156, 157, 158, 159, 285, |
---|
1259 | 160, 286, 94, 161, 162, 0, 0, 0, 0, 49, |
---|
1260 | 0, 0, 0, 0, 0, 0, 0, 0, 97, 4, |
---|
1261 | 0, 52, 0, 0, 87, 88, 89, 0, 8, 0, |
---|
1262 | 90, 10, 0, 0, 0, 0, 0, 0, 30, 0, |
---|
1263 | 31, 32, 33, 0, 12, 13, 14, 15, 16, 17, |
---|
1264 | 18, 19, 91, 92, 93, 94, 0, 0, 0, 0, |
---|
1265 | 0, 0, 49, 30, 0, 31, 32, 33, 0, 0, |
---|
1266 | 0, 99, 38, 39, 52, 0, 0, 4, 0, 0, |
---|
1267 | 94, 0, 87, 88, 89, 48, 8, 49, 90, 10, |
---|
1268 | 0, 0, 0, 0, 0, 0, 51, 193, 0, 52, |
---|
1269 | 12, 13, 14, 15, 16, 17, 18, 19, 91, 92, |
---|
1270 | 93, 0, 0, 0, 0, 0, 0, 0, 0, 30, |
---|
1271 | 0, 31, 32, 33, 0, 0, 0, 0, 38, 39, |
---|
1272 | 0, 0, 0, 4, 0, 0, 94, 0, 87, 88, |
---|
1273 | 89, 48, 8, 49, 90, 10, 0, 0, 0, 0, |
---|
1274 | 0, 0, 51, 214, 0, 52, 0, 0, 12, 13, |
---|
1275 | 14, 15, 16, 17, 18, 19, 91, 92, 93, 0, |
---|
1276 | 0, 0, 0, 0, 0, 0, 0, 30, 0, 31, |
---|
1277 | 32, 33, 0, 0, 0, 0, 38, 39, 0, 0, |
---|
1278 | 0, 4, 0, 0, 94, 0, 87, 88, 89, 48, |
---|
1279 | 8, 49, 90, 10, 0, 0, 0, 0, 0, 0, |
---|
1280 | 51, 221, 0, 52, 12, 13, 14, 15, 16, 17, |
---|
1281 | 18, 19, 91, 92, 93, 0, 0, 0, 0, 0, |
---|
1282 | 0, 0, 0, 30, 0, 31, 32, 33, 0, 0, |
---|
1283 | 0, 0, 38, 39, 0, 0, 0, 4, 0, 0, |
---|
1284 | 94, 0, 5, 135, 89, 48, 8, 49, 9, 10, |
---|
1285 | 0, 0, 0, 0, 0, 0, 51, 239, 0, 52, |
---|
1286 | 0, 0, 12, 13, 14, 15, 16, 17, 18, 19, |
---|
1287 | 91, 92, 93, 0, 0, 0, 0, 0, 0, 0, |
---|
1288 | 0, 30, 0, 31, 32, 33, 0, 0, 0, 0, |
---|
1289 | 38, 39, 0, 0, 0, 4, 0, 0, 94, 0, |
---|
1290 | 87, 88, 89, 48, 8, 49, 90, 10, 0, 150, |
---|
1291 | 151, 0, 0, 152, 51, 153, 154, 52, 12, 13, |
---|
1292 | 14, 15, 16, 17, 18, 19, 20, 21, 22, 150, |
---|
1293 | 151, 0, 0, 152, 0, 153, 154, 30, 0, 31, |
---|
1294 | 32, 33, 0, 0, 150, 151, 38, 39, 152, 0, |
---|
1295 | 153, 154, 0, 0, 94, 0, 150, 151, 0, 48, |
---|
1296 | 152, 49, 153, 154, 0, 0, 0, 0, 150, 151, |
---|
1297 | 51, 0, 152, 52, 153, 154, 12, 13, 14, 15, |
---|
1298 | 16, 17, 18, 19, 91, 92, 93, 150, 151, 0, |
---|
1299 | 0, 152, 0, 153, 154, 30, 0, 31, 32, 33, |
---|
1300 | 0, 0, 150, 151, 38, 39, 152, 0, 153, 154, |
---|
1301 | 0, 0, 94, 0, 150, 151, 0, 48, 152, 49, |
---|
1302 | 153, 154, 0, 0, 0, 0, 0, 0, 178, 0, |
---|
1303 | 0, 52, 0, 155, 0, 156, 157, 158, 159, 0, |
---|
1304 | 160, 255, 0, 161, 162, 150, 151, 0, 0, 152, |
---|
1305 | 0, 153, 154, 155, 0, 156, 157, 158, 159, 0, |
---|
1306 | 160, 256, 0, 161, 162, 0, 0, 0, 155, 0, |
---|
1307 | 156, 157, 158, 159, 0, 160, 261, 0, 161, 162, |
---|
1308 | 155, 0, 156, 157, 158, 159, 292, 160, 0, 0, |
---|
1309 | 161, 162, 155, 0, 156, 157, 158, 159, 0, 160, |
---|
1310 | 293, 0, 161, 162, 0, 0, 0, 0, 0, 0, |
---|
1311 | 0, 155, 0, 156, 157, 158, 159, 296, 160, 0, |
---|
1312 | 0, 161, 162, 0, 0, 0, 155, 0, 156, 157, |
---|
1313 | 158, 159, 0, 160, 318, 0, 161, 162, 155, 0, |
---|
1314 | 156, 157, 158, 159, 0, 160, 322, 0, 161, 162, |
---|
1315 | 150, 151, 0, 0, 152, 0, 153, 154, 0, 0, |
---|
1316 | 0, 198, 199, 200, 0, 8, 0, 201, 10, 155, |
---|
1317 | 0, 156, 157, 158, 159, 0, 160, 325, 0, 161, |
---|
1318 | 162, 150, 151, 0, 0, 152, 0, 153, 154, 0, |
---|
1319 | 0, 0, 0, 150, 151, 0, 0, 152, 0, 153, |
---|
1320 | 154, 0, 0, 0, 0, 150, 151, 0, 0, 152, |
---|
1321 | 0, 153, 154, 0, 0, 0, 0, 150, 151, 0, |
---|
1322 | 0, 152, 0, 153, 154, 0, 0, 0, 0, -1, |
---|
1323 | 151, 0, 0, 152, 0, 153, 154, 0, 0, 0, |
---|
1324 | 0, 0, 0, 0, 0, 202, 203, 204, 0, 0, |
---|
1325 | 0, 0, 0, 0, 0, 0, 30, 0, 31, 32, |
---|
1326 | 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
1327 | 0, 88, 0, 94, 155, 0, 156, 157, 158, 159, |
---|
1328 | 49, 160, 327, 0, 161, 162, 0, 0, 0, 88, |
---|
1329 | 205, 0, 52, 0, 88, 0, 0, 0, 0, 88, |
---|
1330 | 0, 0, 0, 0, 0, 155, 0, 156, 157, 158, |
---|
1331 | 159, 340, 160, 0, 0, 161, 162, 155, 0, 156, |
---|
1332 | 157, 158, 159, 358, 160, 0, 0, 161, 162, 155, |
---|
1333 | 0, 156, 157, 158, 159, 364, 160, 88, 0, 161, |
---|
1334 | 162, 155, 0, 156, 157, 158, 159, 0, 160, 0, |
---|
1335 | 0, 161, 162, 155, 0, 156, 157, 158, 159, 0, |
---|
1336 | 160, 0, 0, 161, 162, 30, 0, 31, 32, 33, |
---|
1337 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
---|
1338 | 0, 0, 94, 30, 0, 31, 32, 33, 30, 49, |
---|
1339 | 31, 32, 33, 30, 0, 31, 32, 33, 103, 0, |
---|
1340 | 94, 52, 0, 0, 0, 94, 0, 49, 0, 0, |
---|
1341 | 94, 0, 49, 0, 0, 0, 113, 49, 0, 52, |
---|
1342 | 0, 115, 0, 0, 52, 0, 117, 0, 0, 52, |
---|
1343 | 0, 30, 0, 31, 32, 33, 0, 0, 0, 0, |
---|
1344 | 0, 0, 0, 0, 0, 0, 0, 0, 94, 0, |
---|
1345 | 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, |
---|
1346 | 0, 0, 0, 0, 165, 0, 0, 52 |
---|
1347 | }; |
---|
1348 | |
---|
1349 | static const yytype_int16 yycheck[] = |
---|
1350 | { |
---|
1351 | 1, 108, 109, 13, 14, 15, 111, 17, 1, 19, |
---|
1352 | 20, 108, 11, 4, 135, 141, 7, 243, 9, 10, |
---|
1353 | 346, 142, 4, 24, 250, 3, 4, 135, 126, 7, |
---|
1354 | 7, 9, 10, 10, 142, 135, 141, 135, 7, 136, |
---|
1355 | 11, 10, 142, 135, 370, 126, 135, 29, 49, 135, |
---|
1356 | 142, 135, 45, 142, 135, 136, 142, 136, 142, 11, |
---|
1357 | 135, 7, 63, 45, 10, 141, 48, 142, 109, 141, |
---|
1358 | 52, 11, 133, 114, 135, 108, 109, 5, 6, 61, |
---|
1359 | 11, 9, 141, 142, 46, 47, 141, 97, 98, 99, |
---|
1360 | 141, 317, 20, 21, 22, 77, 141, 141, 26, 141, |
---|
1361 | 108, 141, 141, 3, 4, 109, 141, 7, 108, 9, |
---|
1362 | 10, 112, 141, 141, 115, 97, 108, 99, 141, 108, |
---|
1363 | 102, 103, 136, 105, 106, 107, 108, 109, 110, 111, |
---|
1364 | 135, 113, 125, 134, 141, 117, 127, 65, 129, 130, |
---|
1365 | 131, 132, 141, 134, 143, 146, 74, 138, 109, 127, |
---|
1366 | 132, 129, 130, 131, 132, 132, 134, 134, 141, 137, |
---|
1367 | 138, 132, 131, 132, 165, 134, 144, 149, 150, 151, |
---|
1368 | 141, 153, 143, 155, 156, 157, 158, 159, 160, 161, |
---|
1369 | 162, 3, 4, 135, 141, 7, 132, 9, 10, 141, |
---|
1370 | 142, 143, 132, 175, 141, 126, 178, 125, 141, 141, |
---|
1371 | 182, 141, 141, 143, 136, 135, 108, 135, 109, 136, |
---|
1372 | 141, 135, 143, 135, 109, 108, 142, 145, 143, 147, |
---|
1373 | 136, 142, 142, 142, 142, 142, 126, 127, 210, 129, |
---|
1374 | 130, 131, 132, 142, 134, 109, 14, 137, 138, 135, |
---|
1375 | 168, 132, 142, 171, 132, 135, 111, 6, 142, 287, |
---|
1376 | 142, 45, 370, 142, 236, 142, 142, 142, 142, 142, |
---|
1377 | 135, 243, 244, 141, 135, 142, 142, 172, 250, 251, |
---|
1378 | -1, 356, -1, 255, 256, 257, -1, 259, -1, 261, |
---|
1379 | 262, -1, 275, 0, 1, -1, -1, -1, -1, -1, |
---|
1380 | -1, 8, 293, -1, -1, -1, 13, 14, 15, -1, |
---|
1381 | 17, -1, 19, 20, 286, 127, -1, 129, 130, 131, |
---|
1382 | 132, -1, 134, 135, -1, 137, 138, 3, 4, -1, |
---|
1383 | 142, 7, 39, 9, 10, -1, -1, -1, -1, -1, |
---|
1384 | 108, -1, 110, 111, 112, 317, 318, 319, -1, 7, |
---|
1385 | 322, 323, 10, 325, -1, 327, 328, 125, 330, 3, |
---|
1386 | 4, -1, -1, 7, 132, 9, 10, -1, -1, -1, |
---|
1387 | 361, -1, -1, 3, 4, -1, 144, 7, -1, 9, |
---|
1388 | 10, -1, 89, 90, 91, 92, 93, 94, 95, 96, |
---|
1389 | 97, 98, 99, 100, 101, 102, 103, -1, 105, 106, |
---|
1390 | 107, 108, -1, 110, 111, 112, 113, 114, 115, 116, |
---|
1391 | 117, 118, 119, 120, 121, 122, 123, 124, 125, -1, |
---|
1392 | 127, -1, -1, 130, -1, 132, 3, 4, -1, 136, |
---|
1393 | 7, -1, 9, 10, 141, -1, -1, 144, -1, -1, |
---|
1394 | 3, 4, -1, -1, 7, -1, 9, 10, -1, -1, |
---|
1395 | -1, 127, -1, 129, 130, 131, 132, -1, 134, 135, |
---|
1396 | -1, 137, 138, 3, 4, -1, 142, 7, -1, 9, |
---|
1397 | 10, 129, 130, 131, 132, -1, 134, -1, -1, -1, |
---|
1398 | 138, -1, -1, 127, -1, 129, 130, 131, 132, -1, |
---|
1399 | 134, 135, -1, 137, 138, -1, -1, 127, 142, 129, |
---|
1400 | 130, 131, 132, 7, 134, 135, 10, 137, 138, 3, |
---|
1401 | 4, -1, 142, 7, -1, 9, 10, -1, -1, -1, |
---|
1402 | -1, -1, -1, 3, 4, -1, -1, 7, -1, 9, |
---|
1403 | 10, -1, -1, -1, -1, -1, -1, 3, 4, -1, |
---|
1404 | -1, 7, -1, 9, 10, -1, -1, -1, -1, -1, |
---|
1405 | 127, -1, 129, 130, 131, 132, -1, 134, 135, -1, |
---|
1406 | 137, 138, -1, -1, 127, 142, 129, 130, 131, 132, |
---|
1407 | -1, 134, 135, -1, 137, 138, 3, 4, -1, 142, |
---|
1408 | 7, -1, 9, 10, -1, -1, -1, 127, -1, 129, |
---|
1409 | 130, 131, 132, -1, 134, 135, -1, 137, 138, 3, |
---|
1410 | 4, -1, 142, 7, -1, 9, 10, -1, -1, -1, |
---|
1411 | -1, -1, -1, 3, 4, -1, -1, 7, -1, 9, |
---|
1412 | 10, -1, -1, 127, -1, 129, 130, 131, 132, -1, |
---|
1413 | 134, -1, -1, 127, 138, 129, 130, 131, 132, -1, |
---|
1414 | 134, -1, -1, 137, 138, -1, -1, 127, 142, 129, |
---|
1415 | 130, 131, 132, -1, 134, -1, -1, 137, 138, -1, |
---|
1416 | -1, 127, 142, 129, 130, 131, 132, -1, 134, -1, |
---|
1417 | -1, 137, 138, 3, 4, -1, 142, 7, -1, 9, |
---|
1418 | 10, -1, -1, -1, -1, -1, -1, 3, 4, -1, |
---|
1419 | -1, 7, -1, 9, 10, -1, -1, -1, -1, -1, |
---|
1420 | 127, -1, 129, 130, 131, 132, -1, 134, -1, -1, |
---|
1421 | 137, 138, 3, 4, -1, 142, 7, -1, 9, 10, |
---|
1422 | -1, -1, -1, 127, -1, 129, 130, 131, 132, -1, |
---|
1423 | 134, -1, -1, 137, 138, -1, -1, 127, 142, 129, |
---|
1424 | 130, 131, 132, -1, 134, -1, -1, 137, 138, 3, |
---|
1425 | 4, -1, 142, 7, -1, 9, 10, -1, -1, -1, |
---|
1426 | -1, -1, -1, 3, 4, -1, -1, 7, -1, 9, |
---|
1427 | 10, -1, -1, -1, -1, -1, -1, 3, 4, -1, |
---|
1428 | -1, 7, -1, 9, 10, -1, -1, -1, -1, -1, |
---|
1429 | -1, -1, -1, -1, -1, -1, -1, 127, -1, 129, |
---|
1430 | 130, 131, 132, -1, 134, -1, -1, 137, 138, -1, |
---|
1431 | -1, 127, 142, 129, 130, 131, 132, -1, 134, -1, |
---|
1432 | -1, 137, 138, 3, 4, -1, 142, 7, -1, 9, |
---|
1433 | 10, -1, -1, -1, -1, -1, 127, -1, 129, 130, |
---|
1434 | 131, 132, -1, 134, -1, -1, 137, 138, 3, 4, |
---|
1435 | -1, 142, 7, -1, 9, 10, -1, -1, -1, -1, |
---|
1436 | -1, -1, 3, 4, -1, -1, 7, -1, 9, 10, |
---|
1437 | -1, -1, -1, 127, -1, 129, 130, 131, 132, -1, |
---|
1438 | 134, -1, -1, 137, 138, -1, -1, 127, 142, 129, |
---|
1439 | 130, 131, 132, -1, 134, -1, -1, 137, 138, -1, |
---|
1440 | -1, 127, 142, 129, 130, 131, 132, -1, 134, -1, |
---|
1441 | -1, 137, 138, 3, 4, -1, 142, 7, -1, 9, |
---|
1442 | 10, 8, -1, -1, -1, -1, 13, 14, 15, -1, |
---|
1443 | 17, -1, 19, 20, -1, -1, -1, -1, -1, -1, |
---|
1444 | -1, -1, -1, -1, -1, -1, -1, 127, -1, 129, |
---|
1445 | 130, 131, 132, -1, 134, -1, -1, 137, 138, 3, |
---|
1446 | 4, -1, 142, 7, -1, 9, 10, -1, -1, -1, |
---|
1447 | -1, -1, 127, -1, 129, 130, 131, 132, -1, 134, |
---|
1448 | -1, 14, 137, 138, -1, -1, 127, 142, 129, 130, |
---|
1449 | 131, 132, -1, 134, -1, -1, 137, 138, -1, -1, |
---|
1450 | -1, 142, 89, 90, 91, 92, 93, 94, 95, 96, |
---|
1451 | 97, 98, 99, -1, -1, -1, -1, -1, -1, -1, |
---|
1452 | -1, 108, -1, 110, 111, 112, -1, -1, -1, -1, |
---|
1453 | 117, 118, -1, -1, 14, -1, -1, 127, 125, 129, |
---|
1454 | 130, 131, 132, 130, 134, 132, -1, 137, 138, -1, |
---|
1455 | -1, -1, 142, 8, 141, 142, -1, 144, 13, 14, |
---|
1456 | 15, -1, 17, -1, 19, 20, -1, -1, -1, -1, |
---|
1457 | -1, -1, -1, -1, -1, 108, -1, 110, 111, 112, |
---|
1458 | -1, -1, -1, 127, -1, 129, 130, 131, 132, 133, |
---|
1459 | 134, 135, 125, 137, 138, -1, -1, -1, -1, 132, |
---|
1460 | -1, -1, -1, -1, -1, -1, -1, -1, 141, 8, |
---|
1461 | -1, 144, -1, -1, 13, 14, 15, -1, 17, -1, |
---|
1462 | 19, 20, -1, -1, -1, -1, -1, -1, 108, -1, |
---|
1463 | 110, 111, 112, -1, 89, 90, 91, 92, 93, 94, |
---|
1464 | 95, 96, 97, 98, 99, 125, -1, -1, -1, -1, |
---|
1465 | -1, -1, 132, 108, -1, 110, 111, 112, -1, -1, |
---|
1466 | -1, 141, 117, 118, 144, -1, -1, 8, -1, -1, |
---|
1467 | 125, -1, 13, 14, 15, 130, 17, 132, 19, 20, |
---|
1468 | -1, -1, -1, -1, -1, -1, 141, 142, -1, 144, |
---|
1469 | 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, |
---|
1470 | 99, -1, -1, -1, -1, -1, -1, -1, -1, 108, |
---|
1471 | -1, 110, 111, 112, -1, -1, -1, -1, 117, 118, |
---|
1472 | -1, -1, -1, 8, -1, -1, 125, -1, 13, 14, |
---|
1473 | 15, 130, 17, 132, 19, 20, -1, -1, -1, -1, |
---|
1474 | -1, -1, 141, 142, -1, 144, -1, -1, 89, 90, |
---|
1475 | 91, 92, 93, 94, 95, 96, 97, 98, 99, -1, |
---|
1476 | -1, -1, -1, -1, -1, -1, -1, 108, -1, 110, |
---|
1477 | 111, 112, -1, -1, -1, -1, 117, 118, -1, -1, |
---|
1478 | -1, 8, -1, -1, 125, -1, 13, 14, 15, 130, |
---|
1479 | 17, 132, 19, 20, -1, -1, -1, -1, -1, -1, |
---|
1480 | 141, 142, -1, 144, 89, 90, 91, 92, 93, 94, |
---|
1481 | 95, 96, 97, 98, 99, -1, -1, -1, -1, -1, |
---|
1482 | -1, -1, -1, 108, -1, 110, 111, 112, -1, -1, |
---|
1483 | -1, -1, 117, 118, -1, -1, -1, 8, -1, -1, |
---|
1484 | 125, -1, 13, 14, 15, 130, 17, 132, 19, 20, |
---|
1485 | -1, -1, -1, -1, -1, -1, 141, 142, -1, 144, |
---|
1486 | -1, -1, 89, 90, 91, 92, 93, 94, 95, 96, |
---|
1487 | 97, 98, 99, -1, -1, -1, -1, -1, -1, -1, |
---|
1488 | -1, 108, -1, 110, 111, 112, -1, -1, -1, -1, |
---|
1489 | 117, 118, -1, -1, -1, 8, -1, -1, 125, -1, |
---|
1490 | 13, 14, 15, 130, 17, 132, 19, 20, -1, 3, |
---|
1491 | 4, -1, -1, 7, 141, 9, 10, 144, 89, 90, |
---|
1492 | 91, 92, 93, 94, 95, 96, 97, 98, 99, 3, |
---|
1493 | 4, -1, -1, 7, -1, 9, 10, 108, -1, 110, |
---|
1494 | 111, 112, -1, -1, 3, 4, 117, 118, 7, -1, |
---|
1495 | 9, 10, -1, -1, 125, -1, 3, 4, -1, 130, |
---|
1496 | 7, 132, 9, 10, -1, -1, -1, -1, 3, 4, |
---|
1497 | 141, -1, 7, 144, 9, 10, 89, 90, 91, 92, |
---|
1498 | 93, 94, 95, 96, 97, 98, 99, 3, 4, -1, |
---|
1499 | -1, 7, -1, 9, 10, 108, -1, 110, 111, 112, |
---|
1500 | -1, -1, 3, 4, 117, 118, 7, -1, 9, 10, |
---|
1501 | -1, -1, 125, -1, 3, 4, -1, 130, 7, 132, |
---|
1502 | 9, 10, -1, -1, -1, -1, -1, -1, 141, -1, |
---|
1503 | -1, 144, -1, 127, -1, 129, 130, 131, 132, -1, |
---|
1504 | 134, 135, -1, 137, 138, 3, 4, -1, -1, 7, |
---|
1505 | -1, 9, 10, 127, -1, 129, 130, 131, 132, -1, |
---|
1506 | 134, 135, -1, 137, 138, -1, -1, -1, 127, -1, |
---|
1507 | 129, 130, 131, 132, -1, 134, 135, -1, 137, 138, |
---|
1508 | 127, -1, 129, 130, 131, 132, 133, 134, -1, -1, |
---|
1509 | 137, 138, 127, -1, 129, 130, 131, 132, -1, 134, |
---|
1510 | 135, -1, 137, 138, -1, -1, -1, -1, -1, -1, |
---|
1511 | -1, 127, -1, 129, 130, 131, 132, 133, 134, -1, |
---|
1512 | -1, 137, 138, -1, -1, -1, 127, -1, 129, 130, |
---|
1513 | 131, 132, -1, 134, 135, -1, 137, 138, 127, -1, |
---|
1514 | 129, 130, 131, 132, -1, 134, 135, -1, 137, 138, |
---|
1515 | 3, 4, -1, -1, 7, -1, 9, 10, -1, -1, |
---|
1516 | -1, 13, 14, 15, -1, 17, -1, 19, 20, 127, |
---|
1517 | -1, 129, 130, 131, 132, -1, 134, 135, -1, 137, |
---|
1518 | 138, 3, 4, -1, -1, 7, -1, 9, 10, -1, |
---|
1519 | -1, -1, -1, 3, 4, -1, -1, 7, -1, 9, |
---|
1520 | 10, -1, -1, -1, -1, 3, 4, -1, -1, 7, |
---|
1521 | -1, 9, 10, -1, -1, -1, -1, 3, 4, -1, |
---|
1522 | -1, 7, -1, 9, 10, -1, -1, -1, -1, 3, |
---|
1523 | 4, -1, -1, 7, -1, 9, 10, -1, -1, -1, |
---|
1524 | -1, -1, -1, -1, -1, 97, 98, 99, -1, -1, |
---|
1525 | -1, -1, -1, -1, -1, -1, 108, -1, 110, 111, |
---|
1526 | 112, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
---|
1527 | -1, 14, -1, 125, 127, -1, 129, 130, 131, 132, |
---|
1528 | 132, 134, 135, -1, 137, 138, -1, -1, -1, 14, |
---|
1529 | 142, -1, 144, -1, 14, -1, -1, -1, -1, 14, |
---|
1530 | -1, -1, -1, -1, -1, 127, -1, 129, 130, 131, |
---|
1531 | 132, 133, 134, -1, -1, 137, 138, 127, -1, 129, |
---|
1532 | 130, 131, 132, 133, 134, -1, -1, 137, 138, 127, |
---|
1533 | -1, 129, 130, 131, 132, 133, 134, 14, -1, 137, |
---|
1534 | 138, 127, -1, 129, 130, 131, 132, -1, 134, -1, |
---|
1535 | -1, 137, 138, 127, -1, 129, 130, 131, 132, -1, |
---|
1536 | 134, -1, -1, 137, 138, 108, -1, 110, 111, 112, |
---|
1537 | -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
---|
1538 | -1, -1, 125, 108, -1, 110, 111, 112, 108, 132, |
---|
1539 | 110, 111, 112, 108, -1, 110, 111, 112, 141, -1, |
---|
1540 | 125, 144, -1, -1, -1, 125, -1, 132, -1, -1, |
---|
1541 | 125, -1, 132, -1, -1, -1, 141, 132, -1, 144, |
---|
1542 | -1, 141, -1, -1, 144, -1, 141, -1, -1, 144, |
---|
1543 | -1, 108, -1, 110, 111, 112, -1, -1, -1, -1, |
---|
1544 | -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, |
---|
1545 | -1, -1, -1, -1, -1, 132, -1, -1, -1, -1, |
---|
1546 | -1, -1, -1, -1, 141, -1, -1, 144 |
---|
1547 | }; |
---|
1548 | |
---|
1549 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
---|
1550 | symbol of state STATE-NUM. */ |
---|
1551 | static const yytype_uint8 yystos[] = |
---|
1552 | { |
---|
1553 | 0, 146, 0, 1, 8, 13, 14, 15, 17, 19, |
---|
1554 | 20, 39, 89, 90, 91, 92, 93, 94, 95, 96, |
---|
1555 | 97, 98, 99, 100, 101, 102, 103, 105, 106, 107, |
---|
1556 | 108, 110, 111, 112, 113, 114, 115, 116, 117, 118, |
---|
1557 | 119, 120, 121, 122, 123, 124, 125, 127, 130, 132, |
---|
1558 | 136, 141, 144, 147, 148, 149, 150, 151, 152, 153, |
---|
1559 | 154, 156, 158, 159, 160, 161, 162, 163, 170, 172, |
---|
1560 | 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, |
---|
1561 | 183, 184, 185, 186, 187, 188, 136, 13, 14, 15, |
---|
1562 | 19, 97, 98, 99, 125, 154, 161, 141, 152, 141, |
---|
1563 | 152, 160, 141, 141, 152, 141, 141, 141, 141, 141, |
---|
1564 | 141, 141, 141, 141, 152, 141, 152, 141, 152, 108, |
---|
1565 | 109, 153, 108, 136, 152, 141, 154, 108, 109, 141, |
---|
1566 | 141, 108, 141, 108, 141, 14, 154, 162, 163, 163, |
---|
1567 | 154, 153, 153, 154, 136, 11, 141, 143, 126, 135, |
---|
1568 | 3, 4, 7, 9, 10, 127, 129, 130, 131, 132, |
---|
1569 | 134, 137, 138, 154, 153, 141, 152, 126, 135, 136, |
---|
1570 | 169, 135, 152, 154, 154, 132, 154, 109, 141, 154, |
---|
1571 | 164, 154, 132, 154, 154, 154, 154, 154, 154, 154, |
---|
1572 | 142, 153, 154, 142, 153, 154, 136, 136, 13, 14, |
---|
1573 | 15, 19, 97, 98, 99, 142, 152, 161, 108, 109, |
---|
1574 | 155, 108, 154, 109, 142, 153, 171, 133, 142, 144, |
---|
1575 | 152, 142, 153, 152, 154, 154, 154, 154, 154, 154, |
---|
1576 | 154, 154, 154, 154, 154, 154, 126, 142, 157, 142, |
---|
1577 | 153, 152, 152, 169, 135, 142, 154, 142, 154, 142, |
---|
1578 | 135, 135, 142, 154, 142, 135, 135, 135, 142, 135, |
---|
1579 | 142, 135, 135, 142, 142, 142, 142, 142, 142, 142, |
---|
1580 | 142, 142, 142, 142, 142, 135, 142, 142, 109, 154, |
---|
1581 | 108, 142, 142, 136, 142, 133, 135, 154, 142, 154, |
---|
1582 | 164, 154, 133, 135, 164, 154, 133, 154, 154, 154, |
---|
1583 | 154, 154, 154, 13, 14, 15, 19, 97, 98, 99, |
---|
1584 | 161, 142, 109, 109, 114, 154, 157, 135, 135, 132, |
---|
1585 | 153, 135, 135, 132, 142, 135, 142, 135, 135, 142, |
---|
1586 | 135, 142, 142, 142, 142, 142, 142, 142, 142, 142, |
---|
1587 | 133, 164, 154, 154, 142, 111, 141, 165, 166, 168, |
---|
1588 | 154, 154, 154, 154, 154, 154, 135, 142, 133, 166, |
---|
1589 | 167, 141, 142, 142, 133, 142, 142, 142, 142, 168, |
---|
1590 | 135, 142, 153, 167, 142 |
---|
1591 | }; |
---|
1592 | |
---|
1593 | #define yyerrok (yyerrstatus = 0) |
---|
1594 | #define yyclearin (yychar = YYEMPTY) |
---|
1595 | #define YYEMPTY (-2) |
---|
1596 | #define YYEOF 0 |
---|
1597 | |
---|
1598 | #define YYACCEPT goto yyacceptlab |
---|
1599 | #define YYABORT goto yyabortlab |
---|
1600 | #define YYERROR goto yyerrorlab |
---|
1601 | |
---|
1602 | |
---|
1603 | /* Like YYERROR except do call yyerror. This remains here temporarily |
---|
1604 | to ease the transition to the new meaning of YYERROR, for GCC. |
---|
1605 | Once GCC version 2 has supplanted version 1, this can go. */ |
---|
1606 | |
---|
1607 | #define YYFAIL goto yyerrlab |
---|
1608 | |
---|
1609 | #define YYRECOVERING() (!!yyerrstatus) |
---|
1610 | |
---|
1611 | #define YYBACKUP(Token, Value) \ |
---|
1612 | do \ |
---|
1613 | if (yychar == YYEMPTY && yylen == 1) \ |
---|
1614 | { \ |
---|
1615 | yychar = (Token); \ |
---|
1616 | yylval = (Value); \ |
---|
1617 | yytoken = YYTRANSLATE (yychar); \ |
---|
1618 | YYPOPSTACK (1); \ |
---|
1619 | goto yybackup; \ |
---|
1620 | } \ |
---|
1621 | else \ |
---|
1622 | { \ |
---|
1623 | yyerror (YY_("syntax error: cannot back up")); \ |
---|
1624 | YYERROR; \ |
---|
1625 | } \ |
---|
1626 | while (YYID (0)) |
---|
1627 | |
---|
1628 | |
---|
1629 | #define YYTERROR 1 |
---|
1630 | #define YYERRCODE 256 |
---|
1631 | |
---|
1632 | |
---|
1633 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. |
---|
1634 | If N is 0, then set CURRENT to the empty location which ends |
---|
1635 | the previous symbol: RHS[0] (always defined). */ |
---|
1636 | |
---|
1637 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) |
---|
1638 | #ifndef YYLLOC_DEFAULT |
---|
1639 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ |
---|
1640 | do \ |
---|
1641 | if (YYID (N)) \ |
---|
1642 | { \ |
---|
1643 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ |
---|
1644 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ |
---|
1645 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ |
---|
1646 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ |
---|
1647 | } \ |
---|
1648 | else \ |
---|
1649 | { \ |
---|
1650 | (Current).first_line = (Current).last_line = \ |
---|
1651 | YYRHSLOC (Rhs, 0).last_line; \ |
---|
1652 | (Current).first_column = (Current).last_column = \ |
---|
1653 | YYRHSLOC (Rhs, 0).last_column; \ |
---|
1654 | } \ |
---|
1655 | while (YYID (0)) |
---|
1656 | #endif |
---|
1657 | |
---|
1658 | |
---|
1659 | /* YY_LOCATION_PRINT -- Print the location on the stream. |
---|
1660 | This macro was not mandated originally: define only if we know |
---|
1661 | we won't break user code: when these are the locations we know. */ |
---|
1662 | |
---|
1663 | #ifndef YY_LOCATION_PRINT |
---|
1664 | # if YYLTYPE_IS_TRIVIAL |
---|
1665 | # define YY_LOCATION_PRINT(File, Loc) \ |
---|
1666 | fprintf (File, "%d.%d-%d.%d", \ |
---|
1667 | (Loc).first_line, (Loc).first_column, \ |
---|
1668 | (Loc).last_line, (Loc).last_column) |
---|
1669 | # else |
---|
1670 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
---|
1671 | # endif |
---|
1672 | #endif |
---|
1673 | |
---|
1674 | |
---|
1675 | /* YYLEX -- calling `yylex' with the right arguments. */ |
---|
1676 | |
---|
1677 | #ifdef YYLEX_PARAM |
---|
1678 | # define YYLEX yylex (&yylval, YYLEX_PARAM) |
---|
1679 | #else |
---|
1680 | # define YYLEX yylex (&yylval) |
---|
1681 | #endif |
---|
1682 | |
---|
1683 | /* Enable debugging if requested. */ |
---|
1684 | #if YYDEBUG |
---|
1685 | |
---|
1686 | # ifndef YYFPRINTF |
---|
1687 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
---|
1688 | # define YYFPRINTF fprintf |
---|
1689 | # endif |
---|
1690 | |
---|
1691 | # define YYDPRINTF(Args) \ |
---|
1692 | do { \ |
---|
1693 | if (yydebug) \ |
---|
1694 | YYFPRINTF Args; \ |
---|
1695 | } while (YYID (0)) |
---|
1696 | |
---|
1697 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
---|
1698 | do { \ |
---|
1699 | if (yydebug) \ |
---|
1700 | { \ |
---|
1701 | YYFPRINTF (stderr, "%s ", Title); \ |
---|
1702 | yy_symbol_print (stderr, \ |
---|
1703 | Type, Value); \ |
---|
1704 | YYFPRINTF (stderr, "\n"); \ |
---|
1705 | } \ |
---|
1706 | } while (YYID (0)) |
---|
1707 | |
---|
1708 | |
---|
1709 | /*--------------------------------. |
---|
1710 | | Print this symbol on YYOUTPUT. | |
---|
1711 | `--------------------------------*/ |
---|
1712 | |
---|
1713 | /*ARGSUSED*/ |
---|
1714 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1715 | || defined __cplusplus || defined _MSC_VER) |
---|
1716 | static void |
---|
1717 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
---|
1718 | #else |
---|
1719 | static void |
---|
1720 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) |
---|
1721 | FILE *yyoutput; |
---|
1722 | int yytype; |
---|
1723 | YYSTYPE const * const yyvaluep; |
---|
1724 | #endif |
---|
1725 | { |
---|
1726 | if (!yyvaluep) |
---|
1727 | return; |
---|
1728 | # ifdef YYPRINT |
---|
1729 | if (yytype < YYNTOKENS) |
---|
1730 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
---|
1731 | # else |
---|
1732 | YYUSE (yyoutput); |
---|
1733 | # endif |
---|
1734 | switch (yytype) |
---|
1735 | { |
---|
1736 | default: |
---|
1737 | break; |
---|
1738 | } |
---|
1739 | } |
---|
1740 | |
---|
1741 | |
---|
1742 | /*--------------------------------. |
---|
1743 | | Print this symbol on YYOUTPUT. | |
---|
1744 | `--------------------------------*/ |
---|
1745 | |
---|
1746 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1747 | || defined __cplusplus || defined _MSC_VER) |
---|
1748 | static void |
---|
1749 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
---|
1750 | #else |
---|
1751 | static void |
---|
1752 | yy_symbol_print (yyoutput, yytype, yyvaluep) |
---|
1753 | FILE *yyoutput; |
---|
1754 | int yytype; |
---|
1755 | YYSTYPE const * const yyvaluep; |
---|
1756 | #endif |
---|
1757 | { |
---|
1758 | if (yytype < YYNTOKENS) |
---|
1759 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); |
---|
1760 | else |
---|
1761 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); |
---|
1762 | |
---|
1763 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
---|
1764 | YYFPRINTF (yyoutput, ")"); |
---|
1765 | } |
---|
1766 | |
---|
1767 | /*------------------------------------------------------------------. |
---|
1768 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | |
---|
1769 | | TOP (included). | |
---|
1770 | `------------------------------------------------------------------*/ |
---|
1771 | |
---|
1772 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1773 | || defined __cplusplus || defined _MSC_VER) |
---|
1774 | static void |
---|
1775 | yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) |
---|
1776 | #else |
---|
1777 | static void |
---|
1778 | yy_stack_print (bottom, top) |
---|
1779 | yytype_int16 *bottom; |
---|
1780 | yytype_int16 *top; |
---|
1781 | #endif |
---|
1782 | { |
---|
1783 | YYFPRINTF (stderr, "Stack now"); |
---|
1784 | for (; bottom <= top; ++bottom) |
---|
1785 | YYFPRINTF (stderr, " %d", *bottom); |
---|
1786 | YYFPRINTF (stderr, "\n"); |
---|
1787 | } |
---|
1788 | |
---|
1789 | # define YY_STACK_PRINT(Bottom, Top) \ |
---|
1790 | do { \ |
---|
1791 | if (yydebug) \ |
---|
1792 | yy_stack_print ((Bottom), (Top)); \ |
---|
1793 | } while (YYID (0)) |
---|
1794 | |
---|
1795 | |
---|
1796 | /*------------------------------------------------. |
---|
1797 | | Report that the YYRULE is going to be reduced. | |
---|
1798 | `------------------------------------------------*/ |
---|
1799 | |
---|
1800 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1801 | || defined __cplusplus || defined _MSC_VER) |
---|
1802 | static void |
---|
1803 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) |
---|
1804 | #else |
---|
1805 | static void |
---|
1806 | yy_reduce_print (yyvsp, yyrule) |
---|
1807 | YYSTYPE *yyvsp; |
---|
1808 | int yyrule; |
---|
1809 | #endif |
---|
1810 | { |
---|
1811 | int yynrhs = yyr2[yyrule]; |
---|
1812 | int yyi; |
---|
1813 | unsigned long int yylno = yyrline[yyrule]; |
---|
1814 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
---|
1815 | yyrule - 1, yylno); |
---|
1816 | /* The symbols being reduced. */ |
---|
1817 | for (yyi = 0; yyi < yynrhs; yyi++) |
---|
1818 | { |
---|
1819 | fprintf (stderr, " $%d = ", yyi + 1); |
---|
1820 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], |
---|
1821 | &(yyvsp[(yyi + 1) - (yynrhs)]) |
---|
1822 | ); |
---|
1823 | fprintf (stderr, "\n"); |
---|
1824 | } |
---|
1825 | } |
---|
1826 | |
---|
1827 | # define YY_REDUCE_PRINT(Rule) \ |
---|
1828 | do { \ |
---|
1829 | if (yydebug) \ |
---|
1830 | yy_reduce_print (yyvsp, Rule); \ |
---|
1831 | } while (YYID (0)) |
---|
1832 | |
---|
1833 | /* Nonzero means print parse trace. It is left uninitialized so that |
---|
1834 | multiple parsers can coexist. */ |
---|
1835 | int yydebug; |
---|
1836 | #else /* !YYDEBUG */ |
---|
1837 | # define YYDPRINTF(Args) |
---|
1838 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
---|
1839 | # define YY_STACK_PRINT(Bottom, Top) |
---|
1840 | # define YY_REDUCE_PRINT(Rule) |
---|
1841 | #endif /* !YYDEBUG */ |
---|
1842 | |
---|
1843 | |
---|
1844 | /* YYINITDEPTH -- initial size of the parser's stacks. */ |
---|
1845 | #ifndef YYINITDEPTH |
---|
1846 | # define YYINITDEPTH 200 |
---|
1847 | #endif |
---|
1848 | |
---|
1849 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
---|
1850 | if the built-in stack extension method is used). |
---|
1851 | |
---|
1852 | Do not make this value too large; the results are undefined if |
---|
1853 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
---|
1854 | evaluated with infinite-precision integer arithmetic. */ |
---|
1855 | |
---|
1856 | #ifndef YYMAXDEPTH |
---|
1857 | # define YYMAXDEPTH 10000 |
---|
1858 | #endif |
---|
1859 | |
---|
1860 | |
---|
1861 | |
---|
1862 | #if YYERROR_VERBOSE |
---|
1863 | |
---|
1864 | # ifndef yystrlen |
---|
1865 | # if defined __GLIBC__ && defined _STRING_H |
---|
1866 | # define yystrlen strlen |
---|
1867 | # else |
---|
1868 | /* Return the length of YYSTR. */ |
---|
1869 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1870 | || defined __cplusplus || defined _MSC_VER) |
---|
1871 | static YYSIZE_T |
---|
1872 | yystrlen (const char *yystr) |
---|
1873 | #else |
---|
1874 | static YYSIZE_T |
---|
1875 | yystrlen (yystr) |
---|
1876 | const char *yystr; |
---|
1877 | #endif |
---|
1878 | { |
---|
1879 | YYSIZE_T yylen; |
---|
1880 | for (yylen = 0; yystr[yylen]; yylen++) |
---|
1881 | continue; |
---|
1882 | return yylen; |
---|
1883 | } |
---|
1884 | # endif |
---|
1885 | # endif |
---|
1886 | |
---|
1887 | # ifndef yystpcpy |
---|
1888 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
---|
1889 | # define yystpcpy stpcpy |
---|
1890 | # else |
---|
1891 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
---|
1892 | YYDEST. */ |
---|
1893 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
1894 | || defined __cplusplus || defined _MSC_VER) |
---|
1895 | static char * |
---|
1896 | yystpcpy (char *yydest, const char *yysrc) |
---|
1897 | #else |
---|
1898 | static char * |
---|
1899 | yystpcpy (yydest, yysrc) |
---|
1900 | char *yydest; |
---|
1901 | const char *yysrc; |
---|
1902 | #endif |
---|
1903 | { |
---|
1904 | char *yyd = yydest; |
---|
1905 | const char *yys = yysrc; |
---|
1906 | |
---|
1907 | while ((*yyd++ = *yys++) != '\0') |
---|
1908 | continue; |
---|
1909 | |
---|
1910 | return yyd - 1; |
---|
1911 | } |
---|
1912 | # endif |
---|
1913 | # endif |
---|
1914 | |
---|
1915 | # ifndef yytnamerr |
---|
1916 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
---|
1917 | quotes and backslashes, so that it's suitable for yyerror. The |
---|
1918 | heuristic is that double-quoting is unnecessary unless the string |
---|
1919 | contains an apostrophe, a comma, or backslash (other than |
---|
1920 | backslash-backslash). YYSTR is taken from yytname. If YYRES is |
---|
1921 | null, do not copy; instead, return the length of what the result |
---|
1922 | would have been. */ |
---|
1923 | static YYSIZE_T |
---|
1924 | yytnamerr (char *yyres, const char *yystr) |
---|
1925 | { |
---|
1926 | if (*yystr == '"') |
---|
1927 | { |
---|
1928 | YYSIZE_T yyn = 0; |
---|
1929 | char const *yyp = yystr; |
---|
1930 | |
---|
1931 | for (;;) |
---|
1932 | switch (*++yyp) |
---|
1933 | { |
---|
1934 | case '\'': |
---|
1935 | case ',': |
---|
1936 | goto do_not_strip_quotes; |
---|
1937 | |
---|
1938 | case '\\': |
---|
1939 | if (*++yyp != '\\') |
---|
1940 | goto do_not_strip_quotes; |
---|
1941 | /* Fall through. */ |
---|
1942 | default: |
---|
1943 | if (yyres) |
---|
1944 | yyres[yyn] = *yyp; |
---|
1945 | yyn++; |
---|
1946 | break; |
---|
1947 | |
---|
1948 | case '"': |
---|
1949 | if (yyres) |
---|
1950 | yyres[yyn] = '\0'; |
---|
1951 | return yyn; |
---|
1952 | } |
---|
1953 | do_not_strip_quotes: ; |
---|
1954 | } |
---|
1955 | |
---|
1956 | if (! yyres) |
---|
1957 | return yystrlen (yystr); |
---|
1958 | |
---|
1959 | return yystpcpy (yyres, yystr) - yyres; |
---|
1960 | } |
---|
1961 | # endif |
---|
1962 | |
---|
1963 | /* Copy into YYRESULT an error message about the unexpected token |
---|
1964 | YYCHAR while in state YYSTATE. Return the number of bytes copied, |
---|
1965 | including the terminating null byte. If YYRESULT is null, do not |
---|
1966 | copy anything; just return the number of bytes that would be |
---|
1967 | copied. As a special case, return 0 if an ordinary "syntax error" |
---|
1968 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during |
---|
1969 | size calculation. */ |
---|
1970 | static YYSIZE_T |
---|
1971 | yysyntax_error (char *yyresult, int yystate, int yychar) |
---|
1972 | { |
---|
1973 | int yyn = yypact[yystate]; |
---|
1974 | |
---|
1975 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) |
---|
1976 | return 0; |
---|
1977 | else |
---|
1978 | { |
---|
1979 | int yytype = YYTRANSLATE (yychar); |
---|
1980 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); |
---|
1981 | YYSIZE_T yysize = yysize0; |
---|
1982 | YYSIZE_T yysize1; |
---|
1983 | int yysize_overflow = 0; |
---|
1984 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
---|
1985 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
---|
1986 | int yyx; |
---|
1987 | |
---|
1988 | # if 0 |
---|
1989 | /* This is so xgettext sees the translatable formats that are |
---|
1990 | constructed on the fly. */ |
---|
1991 | YY_("syntax error, unexpected %s"); |
---|
1992 | YY_("syntax error, unexpected %s, expecting %s"); |
---|
1993 | YY_("syntax error, unexpected %s, expecting %s or %s"); |
---|
1994 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); |
---|
1995 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); |
---|
1996 | # endif |
---|
1997 | char *yyfmt; |
---|
1998 | char const *yyf; |
---|
1999 | static char const yyunexpected[] = "syntax error, unexpected %s"; |
---|
2000 | static char const yyexpecting[] = ", expecting %s"; |
---|
2001 | static char const yyor[] = " or %s"; |
---|
2002 | char yyformat[sizeof yyunexpected |
---|
2003 | + sizeof yyexpecting - 1 |
---|
2004 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) |
---|
2005 | * (sizeof yyor - 1))]; |
---|
2006 | char const *yyprefix = yyexpecting; |
---|
2007 | |
---|
2008 | /* Start YYX at -YYN if negative to avoid negative indexes in |
---|
2009 | YYCHECK. */ |
---|
2010 | int yyxbegin = yyn < 0 ? -yyn : 0; |
---|
2011 | |
---|
2012 | /* Stay within bounds of both yycheck and yytname. */ |
---|
2013 | int yychecklim = YYLAST - yyn + 1; |
---|
2014 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
---|
2015 | int yycount = 1; |
---|
2016 | |
---|
2017 | yyarg[0] = yytname[yytype]; |
---|
2018 | yyfmt = yystpcpy (yyformat, yyunexpected); |
---|
2019 | |
---|
2020 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
---|
2021 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) |
---|
2022 | { |
---|
2023 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
---|
2024 | { |
---|
2025 | yycount = 1; |
---|
2026 | yysize = yysize0; |
---|
2027 | yyformat[sizeof yyunexpected - 1] = '\0'; |
---|
2028 | break; |
---|
2029 | } |
---|
2030 | yyarg[yycount++] = yytname[yyx]; |
---|
2031 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); |
---|
2032 | yysize_overflow |= (yysize1 < yysize); |
---|
2033 | yysize = yysize1; |
---|
2034 | yyfmt = yystpcpy (yyfmt, yyprefix); |
---|
2035 | yyprefix = yyor; |
---|
2036 | } |
---|
2037 | |
---|
2038 | yyf = YY_(yyformat); |
---|
2039 | yysize1 = yysize + yystrlen (yyf); |
---|
2040 | yysize_overflow |= (yysize1 < yysize); |
---|
2041 | yysize = yysize1; |
---|
2042 | |
---|
2043 | if (yysize_overflow) |
---|
2044 | return YYSIZE_MAXIMUM; |
---|
2045 | |
---|
2046 | if (yyresult) |
---|
2047 | { |
---|
2048 | /* Avoid sprintf, as that infringes on the user's name space. |
---|
2049 | Don't have undefined behavior even if the translation |
---|
2050 | produced a string with the wrong number of "%s"s. */ |
---|
2051 | char *yyp = yyresult; |
---|
2052 | int yyi = 0; |
---|
2053 | while ((*yyp = *yyf) != '\0') |
---|
2054 | { |
---|
2055 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) |
---|
2056 | { |
---|
2057 | yyp += yytnamerr (yyp, yyarg[yyi++]); |
---|
2058 | yyf += 2; |
---|
2059 | } |
---|
2060 | else |
---|
2061 | { |
---|
2062 | yyp++; |
---|
2063 | yyf++; |
---|
2064 | } |
---|
2065 | } |
---|
2066 | } |
---|
2067 | return yysize; |
---|
2068 | } |
---|
2069 | } |
---|
2070 | #endif /* YYERROR_VERBOSE */ |
---|
2071 | |
---|
2072 | |
---|
2073 | /*-----------------------------------------------. |
---|
2074 | | Release the memory associated to this symbol. | |
---|
2075 | `-----------------------------------------------*/ |
---|
2076 | |
---|
2077 | /*ARGSUSED*/ |
---|
2078 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
2079 | || defined __cplusplus || defined _MSC_VER) |
---|
2080 | static void |
---|
2081 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
---|
2082 | #else |
---|
2083 | static void |
---|
2084 | yydestruct (yymsg, yytype, yyvaluep) |
---|
2085 | const char *yymsg; |
---|
2086 | int yytype; |
---|
2087 | YYSTYPE *yyvaluep; |
---|
2088 | #endif |
---|
2089 | { |
---|
2090 | YYUSE (yyvaluep); |
---|
2091 | |
---|
2092 | if (!yymsg) |
---|
2093 | yymsg = "Deleting"; |
---|
2094 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
---|
2095 | |
---|
2096 | switch (yytype) |
---|
2097 | { |
---|
2098 | |
---|
2099 | default: |
---|
2100 | break; |
---|
2101 | } |
---|
2102 | } |
---|
2103 | |
---|
2104 | |
---|
2105 | /* Prevent warnings from -Wmissing-prototypes. */ |
---|
2106 | |
---|
2107 | #ifdef YYPARSE_PARAM |
---|
2108 | #if defined __STDC__ || defined __cplusplus |
---|
2109 | int yyparse (void *YYPARSE_PARAM); |
---|
2110 | #else |
---|
2111 | int yyparse (); |
---|
2112 | #endif |
---|
2113 | #else /* ! YYPARSE_PARAM */ |
---|
2114 | #if defined __STDC__ || defined __cplusplus |
---|
2115 | int yyparse (void); |
---|
2116 | #else |
---|
2117 | int yyparse (); |
---|
2118 | #endif |
---|
2119 | #endif /* ! YYPARSE_PARAM */ |
---|
2120 | |
---|
2121 | |
---|
2122 | |
---|
2123 | |
---|
2124 | |
---|
2125 | |
---|
2126 | /*----------. |
---|
2127 | | yyparse. | |
---|
2128 | `----------*/ |
---|
2129 | |
---|
2130 | #ifdef YYPARSE_PARAM |
---|
2131 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
2132 | || defined __cplusplus || defined _MSC_VER) |
---|
2133 | int |
---|
2134 | yyparse (void *YYPARSE_PARAM) |
---|
2135 | #else |
---|
2136 | int |
---|
2137 | yyparse (YYPARSE_PARAM) |
---|
2138 | void *YYPARSE_PARAM; |
---|
2139 | #endif |
---|
2140 | #else /* ! YYPARSE_PARAM */ |
---|
2141 | #if (defined __STDC__ || defined __C99__FUNC__ \ |
---|
2142 | || defined __cplusplus || defined _MSC_VER) |
---|
2143 | int |
---|
2144 | yyparse (void) |
---|
2145 | #else |
---|
2146 | int |
---|
2147 | yyparse () |
---|
2148 | |
---|
2149 | #endif |
---|
2150 | #endif |
---|
2151 | { |
---|
2152 | /* The look-ahead symbol. */ |
---|
2153 | int yychar; |
---|
2154 | |
---|
2155 | /* The semantic value of the look-ahead symbol. */ |
---|
2156 | YYSTYPE yylval; |
---|
2157 | |
---|
2158 | /* Number of syntax errors so far. */ |
---|
2159 | int yynerrs; |
---|
2160 | |
---|
2161 | int yystate; |
---|
2162 | int yyn; |
---|
2163 | int yyresult; |
---|
2164 | /* Number of tokens to shift before error messages enabled. */ |
---|
2165 | int yyerrstatus; |
---|
2166 | /* Look-ahead token as an internal (translated) token number. */ |
---|
2167 | int yytoken = 0; |
---|
2168 | #if YYERROR_VERBOSE |
---|
2169 | /* Buffer for error messages, and its allocated size. */ |
---|
2170 | char yymsgbuf[128]; |
---|
2171 | char *yymsg = yymsgbuf; |
---|
2172 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
---|
2173 | #endif |
---|
2174 | |
---|
2175 | /* Three stacks and their tools: |
---|
2176 | `yyss': related to states, |
---|
2177 | `yyvs': related to semantic values, |
---|
2178 | `yyls': related to locations. |
---|
2179 | |
---|
2180 | Refer to the stacks thru separate pointers, to allow yyoverflow |
---|
2181 | to reallocate them elsewhere. */ |
---|
2182 | |
---|
2183 | /* The state stack. */ |
---|
2184 | yytype_int16 yyssa[YYINITDEPTH]; |
---|
2185 | yytype_int16 *yyss = yyssa; |
---|
2186 | yytype_int16 *yyssp; |
---|
2187 | |
---|
2188 | /* The semantic value stack. */ |
---|
2189 | YYSTYPE yyvsa[YYINITDEPTH]; |
---|
2190 | YYSTYPE *yyvs = yyvsa; |
---|
2191 | YYSTYPE *yyvsp; |
---|
2192 | |
---|
2193 | |
---|
2194 | |
---|
2195 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
---|
2196 | |
---|
2197 | YYSIZE_T yystacksize = YYINITDEPTH; |
---|
2198 | |
---|
2199 | /* The variables used to return semantic value and location from the |
---|
2200 | action routines. */ |
---|
2201 | YYSTYPE yyval; |
---|
2202 | |
---|
2203 | |
---|
2204 | /* The number of symbols on the RHS of the reduced rule. |
---|
2205 | Keep to zero when no symbol should be popped. */ |
---|
2206 | int yylen = 0; |
---|
2207 | |
---|
2208 | YYDPRINTF ((stderr, "Starting parse\n")); |
---|
2209 | |
---|
2210 | yystate = 0; |
---|
2211 | yyerrstatus = 0; |
---|
2212 | yynerrs = 0; |
---|
2213 | yychar = YYEMPTY; /* Cause a token to be read. */ |
---|
2214 | |
---|
2215 | /* Initialize stack pointers. |
---|
2216 | Waste one element of value and location stack |
---|
2217 | so that they stay on the same level as the state stack. |
---|
2218 | The wasted elements are never initialized. */ |
---|
2219 | |
---|
2220 | yyssp = yyss; |
---|
2221 | yyvsp = yyvs; |
---|
2222 | |
---|
2223 | goto yysetstate; |
---|
2224 | |
---|
2225 | /*------------------------------------------------------------. |
---|
2226 | | yynewstate -- Push a new state, which is found in yystate. | |
---|
2227 | `------------------------------------------------------------*/ |
---|
2228 | yynewstate: |
---|
2229 | /* In all cases, when you get here, the value and location stacks |
---|
2230 | have just been pushed. So pushing a state here evens the stacks. */ |
---|
2231 | yyssp++; |
---|
2232 | |
---|
2233 | yysetstate: |
---|
2234 | *yyssp = yystate; |
---|
2235 | |
---|
2236 | if (yyss + yystacksize - 1 <= yyssp) |
---|
2237 | { |
---|
2238 | /* Get the current used size of the three stacks, in elements. */ |
---|
2239 | YYSIZE_T yysize = yyssp - yyss + 1; |
---|
2240 | |
---|
2241 | #ifdef yyoverflow |
---|
2242 | { |
---|
2243 | /* Give user a chance to reallocate the stack. Use copies of |
---|
2244 | these so that the &'s don't force the real ones into |
---|
2245 | memory. */ |
---|
2246 | YYSTYPE *yyvs1 = yyvs; |
---|
2247 | yytype_int16 *yyss1 = yyss; |
---|
2248 | |
---|
2249 | |
---|
2250 | /* Each stack pointer address is followed by the size of the |
---|
2251 | data in use in that stack, in bytes. This used to be a |
---|
2252 | conditional around just the two extra args, but that might |
---|
2253 | be undefined if yyoverflow is a macro. */ |
---|
2254 | yyoverflow (YY_("memory exhausted"), |
---|
2255 | &yyss1, yysize * sizeof (*yyssp), |
---|
2256 | &yyvs1, yysize * sizeof (*yyvsp), |
---|
2257 | |
---|
2258 | &yystacksize); |
---|
2259 | |
---|
2260 | yyss = yyss1; |
---|
2261 | yyvs = yyvs1; |
---|
2262 | } |
---|
2263 | #else /* no yyoverflow */ |
---|
2264 | # ifndef YYSTACK_RELOCATE |
---|
2265 | goto yyexhaustedlab; |
---|
2266 | # else |
---|
2267 | /* Extend the stack our own way. */ |
---|
2268 | if (YYMAXDEPTH <= yystacksize) |
---|
2269 | goto yyexhaustedlab; |
---|
2270 | yystacksize *= 2; |
---|
2271 | if (YYMAXDEPTH < yystacksize) |
---|
2272 | yystacksize = YYMAXDEPTH; |
---|
2273 | |
---|
2274 | { |
---|
2275 | yytype_int16 *yyss1 = yyss; |
---|
2276 | union yyalloc *yyptr = |
---|
2277 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
---|
2278 | if (! yyptr) |
---|
2279 | goto yyexhaustedlab; |
---|
2280 | YYSTACK_RELOCATE (yyss); |
---|
2281 | YYSTACK_RELOCATE (yyvs); |
---|
2282 | |
---|
2283 | # undef YYSTACK_RELOCATE |
---|
2284 | if (yyss1 != yyssa) |
---|
2285 | YYSTACK_FREE (yyss1); |
---|
2286 | } |
---|
2287 | # endif |
---|
2288 | #endif /* no yyoverflow */ |
---|
2289 | |
---|
2290 | yyssp = yyss + yysize - 1; |
---|
2291 | yyvsp = yyvs + yysize - 1; |
---|
2292 | |
---|
2293 | |
---|
2294 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
---|
2295 | (unsigned long int) yystacksize)); |
---|
2296 | |
---|
2297 | if (yyss + yystacksize - 1 <= yyssp) |
---|
2298 | YYABORT; |
---|
2299 | } |
---|
2300 | |
---|
2301 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
---|
2302 | |
---|
2303 | goto yybackup; |
---|
2304 | |
---|
2305 | /*-----------. |
---|
2306 | | yybackup. | |
---|
2307 | `-----------*/ |
---|
2308 | yybackup: |
---|
2309 | |
---|
2310 | /* Do appropriate processing given the current state. Read a |
---|
2311 | look-ahead token if we need one and don't already have one. */ |
---|
2312 | |
---|
2313 | /* First try to decide what to do without reference to look-ahead token. */ |
---|
2314 | yyn = yypact[yystate]; |
---|
2315 | if (yyn == YYPACT_NINF) |
---|
2316 | goto yydefault; |
---|
2317 | |
---|
2318 | /* Not known => get a look-ahead token if don't already have one. */ |
---|
2319 | |
---|
2320 | /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ |
---|
2321 | if (yychar == YYEMPTY) |
---|
2322 | { |
---|
2323 | YYDPRINTF ((stderr, "Reading a token: ")); |
---|
2324 | yychar = YYLEX; |
---|
2325 | } |
---|
2326 | |
---|
2327 | if (yychar <= YYEOF) |
---|
2328 | { |
---|
2329 | yychar = yytoken = YYEOF; |
---|
2330 | YYDPRINTF ((stderr, "Now at end of input.\n")); |
---|
2331 | } |
---|
2332 | else |
---|
2333 | { |
---|
2334 | yytoken = YYTRANSLATE (yychar); |
---|
2335 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
---|
2336 | } |
---|
2337 | |
---|
2338 | /* If the proper action on seeing token YYTOKEN is to reduce or to |
---|
2339 | detect an error, take that action. */ |
---|
2340 | yyn += yytoken; |
---|
2341 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
---|
2342 | goto yydefault; |
---|
2343 | yyn = yytable[yyn]; |
---|
2344 | if (yyn <= 0) |
---|
2345 | { |
---|
2346 | if (yyn == 0 || yyn == YYTABLE_NINF) |
---|
2347 | goto yyerrlab; |
---|
2348 | yyn = -yyn; |
---|
2349 | goto yyreduce; |
---|
2350 | } |
---|
2351 | |
---|
2352 | if (yyn == YYFINAL) |
---|
2353 | YYACCEPT; |
---|
2354 | |
---|
2355 | /* Count tokens shifted since error; after three, turn off error |
---|
2356 | status. */ |
---|
2357 | if (yyerrstatus) |
---|
2358 | yyerrstatus--; |
---|
2359 | |
---|
2360 | /* Shift the look-ahead token. */ |
---|
2361 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
---|
2362 | |
---|
2363 | /* Discard the shifted token unless it is eof. */ |
---|
2364 | if (yychar != YYEOF) |
---|
2365 | yychar = YYEMPTY; |
---|
2366 | |
---|
2367 | yystate = yyn; |
---|
2368 | *++yyvsp = yylval; |
---|
2369 | |
---|
2370 | goto yynewstate; |
---|
2371 | |
---|
2372 | |
---|
2373 | /*-----------------------------------------------------------. |
---|
2374 | | yydefault -- do the default action for the current state. | |
---|
2375 | `-----------------------------------------------------------*/ |
---|
2376 | yydefault: |
---|
2377 | yyn = yydefact[yystate]; |
---|
2378 | if (yyn == 0) |
---|
2379 | goto yyerrlab; |
---|
2380 | goto yyreduce; |
---|
2381 | |
---|
2382 | |
---|
2383 | /*-----------------------------. |
---|
2384 | | yyreduce -- Do a reduction. | |
---|
2385 | `-----------------------------*/ |
---|
2386 | yyreduce: |
---|
2387 | /* yyn is the number of a rule to reduce with. */ |
---|
2388 | yylen = yyr2[yyn]; |
---|
2389 | |
---|
2390 | /* If YYLEN is nonzero, implement the default value of the action: |
---|
2391 | `$$ = $1'. |
---|
2392 | |
---|
2393 | Otherwise, the following line sets YYVAL to garbage. |
---|
2394 | This behavior is undocumented and Bison |
---|
2395 | users should not rely upon it. Assigning to YYVAL |
---|
2396 | unconditionally makes the parser a bit smaller, and it avoids a |
---|
2397 | GCC warning that YYVAL may be used uninitialized. */ |
---|
2398 | yyval = yyvsp[1-yylen]; |
---|
2399 | |
---|
2400 | |
---|
2401 | YY_REDUCE_PRINT (yyn); |
---|
2402 | switch (yyn) |
---|
2403 | { |
---|
2404 | case 3: |
---|
2405 | #line 360 "grammar.y" |
---|
2406 | { |
---|
2407 | if (timerv) |
---|
2408 | { |
---|
2409 | writeTime("used time:"); |
---|
2410 | startTimer(); |
---|
2411 | } |
---|
2412 | if (rtimerv) |
---|
2413 | { |
---|
2414 | writeRTime("used real time:"); |
---|
2415 | startRTimer(); |
---|
2416 | } |
---|
2417 | prompt_char = '>'; |
---|
2418 | #ifdef HAVE_SDB |
---|
2419 | if (sdb_flags & 2) { sdb_flags=1; YYERROR; } |
---|
2420 | #endif |
---|
2421 | if(siCntrlc) |
---|
2422 | { |
---|
2423 | WerrorS("abort..."); |
---|
2424 | while((currentVoice!=NULL) && (currentVoice->prev!=NULL)) exitVoice(); |
---|
2425 | if (currentVoice!=NULL) currentVoice->ifsw=0; |
---|
2426 | } |
---|
2427 | if (errorreported) /* also catches abort... */ |
---|
2428 | { |
---|
2429 | yyerror(""); |
---|
2430 | } |
---|
2431 | if (inerror==2) PrintLn(); |
---|
2432 | errorreported = inerror = cmdtok = 0; |
---|
2433 | lastreserved = currid = NULL; |
---|
2434 | expected_parms = siCntrlc = FALSE; |
---|
2435 | ;} |
---|
2436 | break; |
---|
2437 | |
---|
2438 | case 5: |
---|
2439 | #line 395 "grammar.y" |
---|
2440 | {currentVoice->ifsw=0;;} |
---|
2441 | break; |
---|
2442 | |
---|
2443 | case 6: |
---|
2444 | #line 397 "grammar.y" |
---|
2445 | { (yyvsp[(1) - (2)].lv).CleanUp(); currentVoice->ifsw=0;;} |
---|
2446 | break; |
---|
2447 | |
---|
2448 | case 7: |
---|
2449 | #line 399 "grammar.y" |
---|
2450 | { |
---|
2451 | YYACCEPT; |
---|
2452 | ;} |
---|
2453 | break; |
---|
2454 | |
---|
2455 | case 8: |
---|
2456 | #line 403 "grammar.y" |
---|
2457 | { |
---|
2458 | currentVoice->ifsw=0; |
---|
2459 | iiDebug(); |
---|
2460 | ;} |
---|
2461 | break; |
---|
2462 | |
---|
2463 | case 9: |
---|
2464 | #line 408 "grammar.y" |
---|
2465 | {currentVoice->ifsw=0;;} |
---|
2466 | break; |
---|
2467 | |
---|
2468 | case 10: |
---|
2469 | #line 410 "grammar.y" |
---|
2470 | { |
---|
2471 | #ifdef SIQ |
---|
2472 | siq=0; |
---|
2473 | #endif |
---|
2474 | yyInRingConstruction = FALSE; |
---|
2475 | currentVoice->ifsw=0; |
---|
2476 | if (inerror) |
---|
2477 | { |
---|
2478 | /* bison failed here*/ |
---|
2479 | if ((inerror!=3) && ((yyvsp[(1) - (2)]).i<UMINUS) && ((yyvsp[(1) - (2)]).i>' ')) |
---|
2480 | { |
---|
2481 | // 1: yyerror called |
---|
2482 | // 2: scanner put actual string |
---|
2483 | // 3: error rule put token+\n |
---|
2484 | inerror=3; |
---|
2485 | Print(" error at token `%s`\n",iiTwoOps((yyvsp[(1) - (2)]).i)); |
---|
2486 | } |
---|
2487 | /**/ |
---|
2488 | |
---|
2489 | } |
---|
2490 | if (!errorreported) WerrorS("...parse error"); |
---|
2491 | yyerror(""); |
---|
2492 | yyerrok; |
---|
2493 | #ifdef HAVE_SDB |
---|
2494 | if ((sdb_flags & 1) && currentVoice->pi!=NULL) |
---|
2495 | { |
---|
2496 | currentVoice->pi->trace_flag |=1; |
---|
2497 | } |
---|
2498 | else |
---|
2499 | #endif |
---|
2500 | if (myynest>0) |
---|
2501 | { |
---|
2502 | feBufferTypes t=currentVoice->Typ(); |
---|
2503 | //PrintS("leaving yyparse\n"); |
---|
2504 | exitBuffer(BT_proc); |
---|
2505 | if (t==BT_example) |
---|
2506 | YYACCEPT; |
---|
2507 | else |
---|
2508 | YYABORT; |
---|
2509 | } |
---|
2510 | else if (currentVoice->prev!=NULL) |
---|
2511 | { |
---|
2512 | exitVoice(); |
---|
2513 | } |
---|
2514 | #ifdef HAVE_SDB |
---|
2515 | if (sdb_flags &2) sdb_flags=1; |
---|
2516 | #endif |
---|
2517 | ;} |
---|
2518 | break; |
---|
2519 | |
---|
2520 | case 18: |
---|
2521 | #line 468 "grammar.y" |
---|
2522 | {if (currentVoice!=NULL) currentVoice->ifsw=0;;} |
---|
2523 | break; |
---|
2524 | |
---|
2525 | case 19: |
---|
2526 | #line 471 "grammar.y" |
---|
2527 | { omFree((ADDRESS)(yyvsp[(2) - (2)].name)); ;} |
---|
2528 | break; |
---|
2529 | |
---|
2530 | case 29: |
---|
2531 | #line 486 "grammar.y" |
---|
2532 | { |
---|
2533 | if(iiAssign(&(yyvsp[(1) - (2)].lv),&(yyvsp[(2) - (2)].lv))) YYERROR; |
---|
2534 | ;} |
---|
2535 | break; |
---|
2536 | |
---|
2537 | case 30: |
---|
2538 | #line 493 "grammar.y" |
---|
2539 | { |
---|
2540 | if (currRing==NULL) MYYERROR("no ring active"); |
---|
2541 | syMake(&(yyval.lv),omStrDup((yyvsp[(1) - (1)].name))); |
---|
2542 | ;} |
---|
2543 | break; |
---|
2544 | |
---|
2545 | case 31: |
---|
2546 | #line 498 "grammar.y" |
---|
2547 | { |
---|
2548 | syMake(&(yyval.lv),(yyvsp[(1) - (1)].name)); |
---|
2549 | ;} |
---|
2550 | break; |
---|
2551 | |
---|
2552 | case 32: |
---|
2553 | #line 502 "grammar.y" |
---|
2554 | { |
---|
2555 | if(iiExprArith2(&(yyval.lv), &(yyvsp[(1) - (3)].lv), COLONCOLON, &(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
2556 | ;} |
---|
2557 | break; |
---|
2558 | |
---|
2559 | case 33: |
---|
2560 | #line 506 "grammar.y" |
---|
2561 | { |
---|
2562 | if(iiExprArith2(&(yyval.lv), &(yyvsp[(1) - (3)].lv), '.', &(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
2563 | ;} |
---|
2564 | break; |
---|
2565 | |
---|
2566 | case 34: |
---|
2567 | #line 510 "grammar.y" |
---|
2568 | { |
---|
2569 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'(')) YYERROR; |
---|
2570 | ;} |
---|
2571 | break; |
---|
2572 | |
---|
2573 | case 35: |
---|
2574 | #line 514 "grammar.y" |
---|
2575 | { |
---|
2576 | if ((yyvsp[(1) - (4)].lv).rtyp==UNKNOWN) |
---|
2577 | { // for x(i)(j) |
---|
2578 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'(',&(yyvsp[(3) - (4)].lv))) YYERROR; |
---|
2579 | } |
---|
2580 | else |
---|
2581 | { |
---|
2582 | (yyvsp[(1) - (4)].lv).next=(leftv)omAllocBin(sleftv_bin); |
---|
2583 | memcpy((yyvsp[(1) - (4)].lv).next,&(yyvsp[(3) - (4)].lv),sizeof(sleftv)); |
---|
2584 | if(iiExprArithM(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'(')) YYERROR; |
---|
2585 | } |
---|
2586 | ;} |
---|
2587 | break; |
---|
2588 | |
---|
2589 | case 36: |
---|
2590 | #line 527 "grammar.y" |
---|
2591 | { |
---|
2592 | if (currRingHdl==NULL) MYYERROR("no ring active"); |
---|
2593 | int j = 0; |
---|
2594 | memset(&(yyval.lv),0,sizeof(sleftv)); |
---|
2595 | (yyval.lv).rtyp=VECTOR_CMD; |
---|
2596 | leftv v = &(yyvsp[(2) - (3)].lv); |
---|
2597 | while (v!=NULL) |
---|
2598 | { |
---|
2599 | int i,t; |
---|
2600 | sleftv tmp; |
---|
2601 | memset(&tmp,0,sizeof(tmp)); |
---|
2602 | i=iiTestConvert((t=v->Typ()),POLY_CMD); |
---|
2603 | if((i==0) || (iiConvert(t /*v->Typ()*/,POLY_CMD,i,v,&tmp))) |
---|
2604 | { |
---|
2605 | pDelete((poly *)&(yyval.lv).data); |
---|
2606 | (yyvsp[(2) - (3)].lv).CleanUp(); |
---|
2607 | MYYERROR("expected '[poly,...'"); |
---|
2608 | } |
---|
2609 | poly p = (poly)tmp.CopyD(POLY_CMD); |
---|
2610 | pSetCompP(p,++j); |
---|
2611 | (yyval.lv).data = (void *)pAdd((poly)(yyval.lv).data,p); |
---|
2612 | v->next=tmp.next;tmp.next=NULL; |
---|
2613 | tmp.CleanUp(); |
---|
2614 | v=v->next; |
---|
2615 | } |
---|
2616 | (yyvsp[(2) - (3)].lv).CleanUp(); |
---|
2617 | ;} |
---|
2618 | break; |
---|
2619 | |
---|
2620 | case 37: |
---|
2621 | #line 555 "grammar.y" |
---|
2622 | { |
---|
2623 | memset(&(yyval.lv),0,sizeof((yyval.lv))); |
---|
2624 | int i = atoi((yyvsp[(1) - (1)].name)); |
---|
2625 | /*remember not to omFree($1) |
---|
2626 | *because it is a part of the scanner buffer*/ |
---|
2627 | (yyval.lv).rtyp = INT_CMD; |
---|
2628 | (yyval.lv).data = (void *)(long)i; |
---|
2629 | |
---|
2630 | /* check: out of range input */ |
---|
2631 | int l = strlen((yyvsp[(1) - (1)].name))+2; |
---|
2632 | number n; |
---|
2633 | if (l >= MAX_INT_LEN) |
---|
2634 | { |
---|
2635 | char tmp[MAX_INT_LEN+5]; |
---|
2636 | sprintf(tmp,"%d",i); |
---|
2637 | if (strcmp(tmp,(yyvsp[(1) - (1)].name))!=0) |
---|
2638 | { |
---|
2639 | nlRead((yyvsp[(1) - (1)].name),&n); |
---|
2640 | (yyval.lv).rtyp=BIGINT_CMD; |
---|
2641 | (yyval.lv).data = n; |
---|
2642 | } |
---|
2643 | } |
---|
2644 | ;} |
---|
2645 | break; |
---|
2646 | |
---|
2647 | case 38: |
---|
2648 | #line 579 "grammar.y" |
---|
2649 | { |
---|
2650 | memset(&(yyval.lv),0,sizeof((yyval.lv))); |
---|
2651 | (yyval.lv).rtyp = (yyvsp[(1) - (1)].i); |
---|
2652 | (yyval.lv).data = (yyval.lv).Data(); |
---|
2653 | ;} |
---|
2654 | break; |
---|
2655 | |
---|
2656 | case 39: |
---|
2657 | #line 585 "grammar.y" |
---|
2658 | { |
---|
2659 | memset(&(yyval.lv),0,sizeof((yyval.lv))); |
---|
2660 | (yyval.lv).rtyp = STRING_CMD; |
---|
2661 | (yyval.lv).data = (yyvsp[(1) - (1)].name); |
---|
2662 | ;} |
---|
2663 | break; |
---|
2664 | |
---|
2665 | case 40: |
---|
2666 | #line 591 "grammar.y" |
---|
2667 | { |
---|
2668 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; |
---|
2669 | ;} |
---|
2670 | break; |
---|
2671 | |
---|
2672 | case 41: |
---|
2673 | #line 598 "grammar.y" |
---|
2674 | { |
---|
2675 | leftv v = &(yyvsp[(1) - (3)].lv); |
---|
2676 | while (v->next!=NULL) |
---|
2677 | { |
---|
2678 | v=v->next; |
---|
2679 | } |
---|
2680 | v->next = (leftv)omAllocBin(sleftv_bin); |
---|
2681 | memcpy(v->next,&((yyvsp[(3) - (3)].lv)),sizeof(sleftv)); |
---|
2682 | (yyval.lv) = (yyvsp[(1) - (3)].lv); |
---|
2683 | ;} |
---|
2684 | break; |
---|
2685 | |
---|
2686 | case 42: |
---|
2687 | #line 609 "grammar.y" |
---|
2688 | { |
---|
2689 | (yyval.lv) = (yyvsp[(1) - (1)].lv); |
---|
2690 | ;} |
---|
2691 | break; |
---|
2692 | |
---|
2693 | case 43: |
---|
2694 | #line 615 "grammar.y" |
---|
2695 | { |
---|
2696 | /*if ($1.typ == eunknown) YYERROR;*/ |
---|
2697 | (yyval.lv) = (yyvsp[(1) - (1)].lv); |
---|
2698 | ;} |
---|
2699 | break; |
---|
2700 | |
---|
2701 | case 44: |
---|
2702 | #line 619 "grammar.y" |
---|
2703 | { (yyval.lv) = (yyvsp[(1) - (1)].lv); ;} |
---|
2704 | break; |
---|
2705 | |
---|
2706 | case 45: |
---|
2707 | #line 620 "grammar.y" |
---|
2708 | { (yyval.lv) = (yyvsp[(2) - (3)].lv); ;} |
---|
2709 | break; |
---|
2710 | |
---|
2711 | case 46: |
---|
2712 | #line 622 "grammar.y" |
---|
2713 | { |
---|
2714 | if(iiExprArith3(&(yyval.lv),'[',&(yyvsp[(1) - (6)].lv),&(yyvsp[(3) - (6)].lv),&(yyvsp[(5) - (6)].lv))) YYERROR; |
---|
2715 | ;} |
---|
2716 | break; |
---|
2717 | |
---|
2718 | case 47: |
---|
2719 | #line 626 "grammar.y" |
---|
2720 | { |
---|
2721 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'[',&(yyvsp[(3) - (4)].lv))) YYERROR; |
---|
2722 | ;} |
---|
2723 | break; |
---|
2724 | |
---|
2725 | case 48: |
---|
2726 | #line 630 "grammar.y" |
---|
2727 | { |
---|
2728 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; |
---|
2729 | ;} |
---|
2730 | break; |
---|
2731 | |
---|
2732 | case 49: |
---|
2733 | #line 634 "grammar.y" |
---|
2734 | { |
---|
2735 | if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; |
---|
2736 | ;} |
---|
2737 | break; |
---|
2738 | |
---|
2739 | case 50: |
---|
2740 | #line 638 "grammar.y" |
---|
2741 | { |
---|
2742 | if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR; |
---|
2743 | ;} |
---|
2744 | break; |
---|
2745 | |
---|
2746 | case 51: |
---|
2747 | #line 642 "grammar.y" |
---|
2748 | { |
---|
2749 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; |
---|
2750 | ;} |
---|
2751 | break; |
---|
2752 | |
---|
2753 | case 52: |
---|
2754 | #line 646 "grammar.y" |
---|
2755 | { |
---|
2756 | if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; |
---|
2757 | ;} |
---|
2758 | break; |
---|
2759 | |
---|
2760 | case 53: |
---|
2761 | #line 650 "grammar.y" |
---|
2762 | { |
---|
2763 | if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR; |
---|
2764 | ;} |
---|
2765 | break; |
---|
2766 | |
---|
2767 | case 54: |
---|
2768 | #line 654 "grammar.y" |
---|
2769 | { |
---|
2770 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; |
---|
2771 | ;} |
---|
2772 | break; |
---|
2773 | |
---|
2774 | case 55: |
---|
2775 | #line 658 "grammar.y" |
---|
2776 | { |
---|
2777 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR; |
---|
2778 | ;} |
---|
2779 | break; |
---|
2780 | |
---|
2781 | case 56: |
---|
2782 | #line 662 "grammar.y" |
---|
2783 | { |
---|
2784 | if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; |
---|
2785 | ;} |
---|
2786 | break; |
---|
2787 | |
---|
2788 | case 57: |
---|
2789 | #line 666 "grammar.y" |
---|
2790 | { |
---|
2791 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR; |
---|
2792 | ;} |
---|
2793 | break; |
---|
2794 | |
---|
2795 | case 58: |
---|
2796 | #line 670 "grammar.y" |
---|
2797 | { |
---|
2798 | if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; |
---|
2799 | ;} |
---|
2800 | break; |
---|
2801 | |
---|
2802 | case 59: |
---|
2803 | #line 674 "grammar.y" |
---|
2804 | { |
---|
2805 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; |
---|
2806 | ;} |
---|
2807 | break; |
---|
2808 | |
---|
2809 | case 60: |
---|
2810 | #line 678 "grammar.y" |
---|
2811 | { |
---|
2812 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; |
---|
2813 | ;} |
---|
2814 | break; |
---|
2815 | |
---|
2816 | case 61: |
---|
2817 | #line 682 "grammar.y" |
---|
2818 | { |
---|
2819 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR; |
---|
2820 | ;} |
---|
2821 | break; |
---|
2822 | |
---|
2823 | case 62: |
---|
2824 | #line 686 "grammar.y" |
---|
2825 | { |
---|
2826 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; |
---|
2827 | ;} |
---|
2828 | break; |
---|
2829 | |
---|
2830 | case 63: |
---|
2831 | #line 690 "grammar.y" |
---|
2832 | { |
---|
2833 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR; |
---|
2834 | ;} |
---|
2835 | break; |
---|
2836 | |
---|
2837 | case 64: |
---|
2838 | #line 694 "grammar.y" |
---|
2839 | { |
---|
2840 | if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; |
---|
2841 | ;} |
---|
2842 | break; |
---|
2843 | |
---|
2844 | case 65: |
---|
2845 | #line 698 "grammar.y" |
---|
2846 | { |
---|
2847 | if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; |
---|
2848 | ;} |
---|
2849 | break; |
---|
2850 | |
---|
2851 | case 66: |
---|
2852 | #line 702 "grammar.y" |
---|
2853 | { |
---|
2854 | if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR; |
---|
2855 | ;} |
---|
2856 | break; |
---|
2857 | |
---|
2858 | case 67: |
---|
2859 | #line 706 "grammar.y" |
---|
2860 | { |
---|
2861 | if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR; |
---|
2862 | ;} |
---|
2863 | break; |
---|
2864 | |
---|
2865 | case 68: |
---|
2866 | #line 710 "grammar.y" |
---|
2867 | { |
---|
2868 | if(iiExprArith3(&(yyval.lv),MATRIX_CMD,&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; |
---|
2869 | ;} |
---|
2870 | break; |
---|
2871 | |
---|
2872 | case 69: |
---|
2873 | #line 714 "grammar.y" |
---|
2874 | { |
---|
2875 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),MATRIX_CMD)) YYERROR; |
---|
2876 | ;} |
---|
2877 | break; |
---|
2878 | |
---|
2879 | case 70: |
---|
2880 | #line 718 "grammar.y" |
---|
2881 | { |
---|
2882 | if(iiExprArith3(&(yyval.lv),INTMAT_CMD,&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; |
---|
2883 | ;} |
---|
2884 | break; |
---|
2885 | |
---|
2886 | case 71: |
---|
2887 | #line 722 "grammar.y" |
---|
2888 | { |
---|
2889 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),INTMAT_CMD)) YYERROR; |
---|
2890 | ;} |
---|
2891 | break; |
---|
2892 | |
---|
2893 | case 72: |
---|
2894 | #line 726 "grammar.y" |
---|
2895 | { |
---|
2896 | if(iiExprArith3(&(yyval.lv),RING_CMD,&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR; |
---|
2897 | ;} |
---|
2898 | break; |
---|
2899 | |
---|
2900 | case 73: |
---|
2901 | #line 730 "grammar.y" |
---|
2902 | { |
---|
2903 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),RING_CMD)) YYERROR; |
---|
2904 | ;} |
---|
2905 | break; |
---|
2906 | |
---|
2907 | case 74: |
---|
2908 | #line 734 "grammar.y" |
---|
2909 | { |
---|
2910 | (yyval.lv)=(yyvsp[(2) - (3)].lv); |
---|
2911 | ;} |
---|
2912 | break; |
---|
2913 | |
---|
2914 | case 75: |
---|
2915 | #line 738 "grammar.y" |
---|
2916 | { |
---|
2917 | #ifdef SIQ |
---|
2918 | siq++; |
---|
2919 | if (siq>0) |
---|
2920 | { if (iiExprArith2(&(yyval.lv),&(yyvsp[(2) - (5)].lv),'=',&(yyvsp[(4) - (5)].lv))) YYERROR; } |
---|
2921 | else |
---|
2922 | #endif |
---|
2923 | { |
---|
2924 | memset(&(yyval.lv),0,sizeof((yyval.lv))); |
---|
2925 | (yyval.lv).rtyp=NONE; |
---|
2926 | if (iiAssign(&(yyvsp[(2) - (5)].lv),&(yyvsp[(4) - (5)].lv))) YYERROR; |
---|
2927 | } |
---|
2928 | #ifdef SIQ |
---|
2929 | siq--; |
---|
2930 | #endif |
---|
2931 | ;} |
---|
2932 | break; |
---|
2933 | |
---|
2934 | case 76: |
---|
2935 | #line 755 "grammar.y" |
---|
2936 | { |
---|
2937 | #ifdef SIQ |
---|
2938 | siq--; |
---|
2939 | #endif |
---|
2940 | ;} |
---|
2941 | break; |
---|
2942 | |
---|
2943 | case 77: |
---|
2944 | #line 761 "grammar.y" |
---|
2945 | { |
---|
2946 | #ifdef SIQ |
---|
2947 | if (siq<=0) (yyvsp[(4) - (5)].lv).Eval(); |
---|
2948 | #endif |
---|
2949 | (yyval.lv)=(yyvsp[(4) - (5)].lv); |
---|
2950 | #ifdef SIQ |
---|
2951 | siq++; |
---|
2952 | #endif |
---|
2953 | ;} |
---|
2954 | break; |
---|
2955 | |
---|
2956 | case 78: |
---|
2957 | #line 773 "grammar.y" |
---|
2958 | { |
---|
2959 | #ifdef SIQ |
---|
2960 | siq++; |
---|
2961 | #endif |
---|
2962 | ;} |
---|
2963 | break; |
---|
2964 | |
---|
2965 | case 79: |
---|
2966 | #line 781 "grammar.y" |
---|
2967 | { |
---|
2968 | #ifdef SIQ |
---|
2969 | siq--; |
---|
2970 | #endif |
---|
2971 | ;} |
---|
2972 | break; |
---|
2973 | |
---|
2974 | case 80: |
---|
2975 | #line 790 "grammar.y" |
---|
2976 | { |
---|
2977 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (2)].lv),PLUSPLUS)) YYERROR; |
---|
2978 | ;} |
---|
2979 | break; |
---|
2980 | |
---|
2981 | case 81: |
---|
2982 | #line 794 "grammar.y" |
---|
2983 | { |
---|
2984 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (2)].lv),MINUSMINUS)) YYERROR; |
---|
2985 | ;} |
---|
2986 | break; |
---|
2987 | |
---|
2988 | case 82: |
---|
2989 | #line 798 "grammar.y" |
---|
2990 | { |
---|
2991 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'+',&(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
2992 | ;} |
---|
2993 | break; |
---|
2994 | |
---|
2995 | case 83: |
---|
2996 | #line 802 "grammar.y" |
---|
2997 | { |
---|
2998 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'-',&(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
2999 | ;} |
---|
3000 | break; |
---|
3001 | |
---|
3002 | case 84: |
---|
3003 | #line 806 "grammar.y" |
---|
3004 | { |
---|
3005 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
3006 | ;} |
---|
3007 | break; |
---|
3008 | |
---|
3009 | case 85: |
---|
3010 | #line 810 "grammar.y" |
---|
3011 | { |
---|
3012 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'^',&(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
3013 | ;} |
---|
3014 | break; |
---|
3015 | |
---|
3016 | case 86: |
---|
3017 | #line 814 "grammar.y" |
---|
3018 | { |
---|
3019 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
3020 | ;} |
---|
3021 | break; |
---|
3022 | |
---|
3023 | case 87: |
---|
3024 | #line 818 "grammar.y" |
---|
3025 | { |
---|
3026 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
3027 | ;} |
---|
3028 | break; |
---|
3029 | |
---|
3030 | case 88: |
---|
3031 | #line 822 "grammar.y" |
---|
3032 | { |
---|
3033 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),NOTEQUAL,&(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
3034 | ;} |
---|
3035 | break; |
---|
3036 | |
---|
3037 | case 89: |
---|
3038 | #line 826 "grammar.y" |
---|
3039 | { |
---|
3040 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),EQUAL_EQUAL,&(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
3041 | ;} |
---|
3042 | break; |
---|
3043 | |
---|
3044 | case 90: |
---|
3045 | #line 830 "grammar.y" |
---|
3046 | { |
---|
3047 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),DOTDOT,&(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
3048 | ;} |
---|
3049 | break; |
---|
3050 | |
---|
3051 | case 91: |
---|
3052 | #line 834 "grammar.y" |
---|
3053 | { |
---|
3054 | if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),':',&(yyvsp[(3) - (3)].lv))) YYERROR; |
---|
3055 | ;} |
---|
3056 | break; |
---|
3057 | |
---|
3058 | case 92: |
---|
3059 | #line 838 "grammar.y" |
---|
3060 | { |
---|
3061 | memset(&(yyval.lv),0,sizeof((yyval.lv))); |
---|
3062 | int i; TESTSETINT((yyvsp[(2) - (2)].lv),i); |
---|
3063 | (yyval.lv).rtyp = INT_CMD; |
---|
3064 | (yyval.lv).data = (void *)(long)(i == 0 ? 1 : 0); |
---|
3065 | ;} |
---|
3066 | break; |
---|
3067 | |
---|
3068 | case 93: |
---|
3069 | #line 845 "grammar.y" |
---|
3070 | { |
---|
3071 | if(iiExprArith1(&(yyval.lv),&(yyvsp[(2) - (2)].lv),'-')) YYERROR; |
---|
3072 | ;} |
---|
3073 | break; |
---|
3074 | |
---|
3075 | case 94: |
---|
3076 | #line 851 "grammar.y" |
---|
3077 | { (yyval.lv) = (yyvsp[(1) - (2)].lv); ;} |
---|
3078 | break; |
---|
3079 | |
---|
3080 | case 95: |
---|
3081 | #line 853 "grammar.y" |
---|
3082 | { |
---|
3083 | if ((yyvsp[(1) - (2)].lv).rtyp==0) |
---|
3084 | { |
---|
3085 | Werror("`%s` is undefined",(yyvsp[(1) - (2)].lv).Fullname()); |
---|
3086 | YYERROR; |
---|
3087 | } |
---|
3088 | else if (((yyvsp[(1) - (2)].lv).rtyp==MODUL_CMD) |
---|
3089 | // matrix m; m[2]=... |
---|
3090 | && ((yyvsp[(1) - (2)].lv).e!=NULL) && ((yyvsp[(1) - (2)].lv).e->next==NULL)) |
---|
3091 | { |
---|
3092 | MYYERROR("matrix must have 2 indices"); |
---|
3093 | } |
---|
3094 | (yyval.lv) = (yyvsp[(1) - (2)].lv); |
---|
3095 | ;} |
---|
3096 | break; |
---|
3097 | |
---|
3098 | case 97: |
---|
3099 | #line 873 "grammar.y" |
---|
3100 | { |
---|
3101 | if ((yyvsp[(2) - (3)].lv).Typ()!=STRING_CMD) |
---|
3102 | { |
---|
3103 | MYYERROR("string expression expected"); |
---|
3104 | } |
---|
3105 | (yyval.name) = (char *)(yyvsp[(2) - (3)].lv).CopyD(STRING_CMD); |
---|
3106 | (yyvsp[(2) - (3)].lv).CleanUp(); |
---|
3107 | ;} |
---|
3108 | break; |
---|
3109 | |
---|
3110 | case 100: |
---|
3111 | #line 890 "grammar.y" |
---|
3112 | { |
---|
3113 | if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot))) |
---|
3114 | YYERROR; |
---|
3115 | ;} |
---|
3116 | break; |
---|
3117 | |
---|
3118 | case 101: |
---|
3119 | #line 895 "grammar.y" |
---|
3120 | { |
---|
3121 | if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot))) |
---|
3122 | YYERROR; |
---|
3123 | ;} |
---|
3124 | break; |
---|
3125 | |
---|
3126 | case 102: |
---|
3127 | #line 900 "grammar.y" |
---|
3128 | { |
---|
3129 | if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR; |
---|
3130 | ;} |
---|
3131 | break; |
---|
3132 | |
---|
3133 | case 103: |
---|
3134 | #line 904 "grammar.y" |
---|
3135 | { |
---|
3136 | if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR; |
---|
3137 | ;} |
---|
3138 | break; |
---|
3139 | |
---|
3140 | case 104: |
---|
3141 | #line 908 "grammar.y" |
---|
3142 | { |
---|
3143 | if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (8)].lv),myynest,(yyvsp[(1) - (8)].i),&(currRing->idroot), TRUE)) YYERROR; |
---|
3144 | int r; TESTSETINT((yyvsp[(4) - (8)].lv),r); |
---|
3145 | int c; TESTSETINT((yyvsp[(7) - (8)].lv),c); |
---|
3146 | if (r < 1) |
---|
3147 | MYYERROR("rows must be greater than 0"); |
---|
3148 | if (c < 0) |
---|
3149 | MYYERROR("cols must be greater than -1"); |
---|
3150 | leftv v=&(yyval.lv); |
---|
3151 | //while (v->next!=NULL) { v=v->next; } |
---|
3152 | idhdl h=(idhdl)v->data; |
---|
3153 | idDelete(&IDIDEAL(h)); |
---|
3154 | IDMATRIX(h) = mpNew(r,c); |
---|
3155 | if (IDMATRIX(h)==NULL) YYERROR; |
---|
3156 | ;} |
---|
3157 | break; |
---|
3158 | |
---|
3159 | case 105: |
---|
3160 | #line 924 "grammar.y" |
---|
3161 | { |
---|
3162 | if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR; |
---|
3163 | ;} |
---|
3164 | break; |
---|
3165 | |
---|
3166 | case 106: |
---|
3167 | #line 928 "grammar.y" |
---|
3168 | { |
---|
3169 | int r; TESTSETINT((yyvsp[(4) - (8)].lv),r); |
---|
3170 | int c; TESTSETINT((yyvsp[(7) - (8)].lv),c); |
---|
3171 | if (r < 1) |
---|
3172 | MYYERROR("rows must be greater than 0"); |
---|
3173 | if (c < 0) |
---|
3174 | MYYERROR("cols must be greater than -1"); |
---|
3175 | if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (8)].lv),myynest,(yyvsp[(1) - (8)].i),&((yyvsp[(2) - (8)].lv).req_packhdl->idroot))) |
---|
3176 | YYERROR; |
---|
3177 | leftv v=&(yyval.lv); |
---|
3178 | idhdl h=(idhdl)v->data; |
---|
3179 | delete IDINTVEC(h); |
---|
3180 | IDINTVEC(h) = new intvec(r,c,0); |
---|
3181 | if (IDINTVEC(h)==NULL) YYERROR; |
---|
3182 | ;} |
---|
3183 | break; |
---|
3184 | |
---|
3185 | case 107: |
---|
3186 | #line 944 "grammar.y" |
---|
3187 | { |
---|
3188 | if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot))) |
---|
3189 | YYERROR; |
---|
3190 | leftv v=&(yyval.lv); |
---|
3191 | idhdl h; |
---|
3192 | do |
---|
3193 | { |
---|
3194 | h=(idhdl)v->data; |
---|
3195 | delete IDINTVEC(h); |
---|
3196 | IDINTVEC(h) = new intvec(1,1,0); |
---|
3197 | v=v->next; |
---|
3198 | } while (v!=NULL); |
---|
3199 | ;} |
---|
3200 | break; |
---|
3201 | |
---|
3202 | case 108: |
---|
3203 | #line 958 "grammar.y" |
---|
3204 | { |
---|
3205 | int t=(yyvsp[(1) - (3)].lv).Typ(); |
---|
3206 | sleftv r; |
---|
3207 | memset(&r,0,sizeof(sleftv)); |
---|
3208 | if ((BEGIN_RING<t) && (t<END_RING)) |
---|
3209 | { |
---|
3210 | if (iiDeclCommand(&r,&(yyvsp[(3) - (3)].lv),myynest,t,&(currRing->idroot), TRUE)) |
---|
3211 | YYERROR; |
---|
3212 | } |
---|
3213 | else |
---|
3214 | { |
---|
3215 | if (iiDeclCommand(&r,&(yyvsp[(3) - (3)].lv),myynest,t,&((yyvsp[(3) - (3)].lv).req_packhdl->idroot))) |
---|
3216 | YYERROR; |
---|
3217 | } |
---|
3218 | leftv v=&(yyvsp[(1) - (3)].lv); |
---|
3219 | while (v->next!=NULL) v=v->next; |
---|
3220 | v->next=(leftv)omAllocBin(sleftv_bin); |
---|
3221 | memcpy(v->next,&r,sizeof(sleftv)); |
---|
3222 | (yyval.lv)=(yyvsp[(1) - (3)].lv); |
---|
3223 | ;} |
---|
3224 | break; |
---|
3225 | |
---|
3226 | case 109: |
---|
3227 | #line 979 "grammar.y" |
---|
3228 | { |
---|
3229 | if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot))) |
---|
3230 | YYERROR; |
---|
3231 | ;} |
---|
3232 | break; |
---|
3233 | |
---|
3234 | case 112: |
---|
3235 | #line 992 "grammar.y" |
---|
3236 | { |
---|
3237 | leftv v = &(yyvsp[(2) - (5)].lv); |
---|
3238 | while (v->next!=NULL) |
---|
3239 | { |
---|
3240 | v=v->next; |
---|
3241 | } |
---|
3242 | v->next = (leftv)omAllocBin(sleftv_bin); |
---|
3243 | memcpy(v->next,&((yyvsp[(4) - (5)].lv)),sizeof(sleftv)); |
---|
3244 | (yyval.lv) = (yyvsp[(2) - (5)].lv); |
---|
3245 | ;} |
---|
3246 | break; |
---|
3247 | |
---|
3248 | case 113: |
---|
3249 | #line 1006 "grammar.y" |
---|
3250 | { |
---|
3251 | // let rInit take care of any errors |
---|
3252 | (yyval.i)=rOrderName((yyvsp[(1) - (1)].name)); |
---|
3253 | ;} |
---|
3254 | break; |
---|
3255 | |
---|
3256 | case 114: |
---|
3257 | #line 1014 "grammar.y" |
---|
3258 | { |
---|
3259 | memset(&(yyval.lv),0,sizeof((yyval.lv))); |
---|
3260 | intvec *iv = new intvec(2); |
---|
3261 | (*iv)[0] = 1; |
---|
3262 | (*iv)[1] = (yyvsp[(1) - (1)].i); |
---|
3263 | (yyval.lv).rtyp = INTVEC_CMD; |
---|
3264 | (yyval.lv).data = (void *)iv; |
---|
3265 | ;} |
---|
3266 | break; |
---|
3267 | |
---|
3268 | case 115: |
---|
3269 | #line 1023 "grammar.y" |
---|
3270 | { |
---|
3271 | memset(&(yyval.lv),0,sizeof((yyval.lv))); |
---|
3272 | leftv sl = &(yyvsp[(3) - (4)].lv); |
---|
3273 | int slLength; |
---|
3274 | { |
---|
3275 | slLength = exprlist_length(sl); |
---|
3276 | int l = 2 + slLength; |
---|
3277 | intvec *iv = new intvec(l); |
---|
3278 | (*iv)[0] = slLength; |
---|
3279 | (*iv)[1] = (yyvsp[(1) - (4)].i); |
---|
3280 | |
---|
3281 | int i = 2; |
---|
3282 | while ((i<l) && (sl!=NULL)) |
---|
3283 | { |
---|
3284 | if (sl->Typ() == INT_CMD) |
---|
3285 | { |
---|
3286 | (*iv)[i++] = (int)((long)(sl->Data())); |
---|
3287 | } |
---|
3288 | else if ((sl->Typ() == INTVEC_CMD) |
---|
3289 | ||(sl->Typ() == INTMAT_CMD)) |
---|
3290 | { |
---|
3291 | intvec *ivv = (intvec *)(sl->Data()); |
---|
3292 | int ll = 0,l = ivv->length(); |
---|
3293 | for (; l>0; l--) |
---|
3294 | { |
---|
3295 | (*iv)[i++] = (*ivv)[ll++]; |
---|
3296 | } |
---|
3297 | } |
---|
3298 | else |
---|
3299 | { |
---|
3300 | delete iv; |
---|
3301 | (yyvsp[(3) - (4)].lv).CleanUp(); |
---|
3302 | MYYERROR("wrong type in ordering"); |
---|
3303 | } |
---|
3304 | sl = sl->next; |
---|
3305 | } |
---|
3306 | (yyval.lv).rtyp = INTVEC_CMD; |
---|
3307 | (yyval.lv).data = (void *)iv; |
---|
3308 | } |
---|
3309 | (yyvsp[(3) - (4)].lv).CleanUp(); |
---|
3310 | ;} |
---|
3311 | break; |
---|
3312 | |
---|
3313 | case 117: |
---|
3314 | #line 1069 "grammar.y" |
---|
3315 | { |
---|
3316 | (yyval.lv) = (yyvsp[(1) - (3)].lv); |
---|
3317 | (yyval.lv).next = (sleftv *)omAllocBin(sleftv_bin); |
---|
3318 | memcpy((yyval.lv).next,&(yyvsp[(3) - (3)].lv),sizeof(sleftv)); |
---|
3319 | ;} |
---|
3320 | break; |
---|
3321 | |
---|
3322 | case 119: |
---|
3323 | #line 1079 "grammar.y" |
---|
3324 | { |
---|
3325 | (yyval.lv) = (yyvsp[(2) - (3)].lv); |
---|
3326 | ;} |
---|
3327 | break; |
---|
3328 | |
---|
3329 | case 120: |
---|
3330 | #line 1085 "grammar.y" |
---|
3331 | { |
---|
3332 | expected_parms = TRUE; |
---|
3333 | ;} |
---|
3334 | break; |
---|
3335 | |
---|
3336 | case 121: |
---|
3337 | #line 1097 "grammar.y" |
---|
3338 | { if ((yyvsp[(1) - (2)].i) != '<') YYERROR; |
---|
3339 | if((feFilePending=feFopen((yyvsp[(2) - (2)].name),"r",NULL,TRUE))==NULL) YYERROR; ;} |
---|
3340 | break; |
---|
3341 | |
---|
3342 | case 122: |
---|
3343 | #line 1100 "grammar.y" |
---|
3344 | { newFile((yyvsp[(2) - (4)].name),feFilePending); ;} |
---|
3345 | break; |
---|
3346 | |
---|
3347 | case 123: |
---|
3348 | #line 1105 "grammar.y" |
---|
3349 | { |
---|
3350 | feHelp((yyvsp[(2) - (3)].name)); |
---|
3351 | omFree((ADDRESS)(yyvsp[(2) - (3)].name)); |
---|
3352 | ;} |
---|
3353 | break; |
---|
3354 | |
---|
3355 | case 124: |
---|
3356 | #line 1110 "grammar.y" |
---|
3357 | { |
---|
3358 | feHelp(NULL); |
---|
3359 | ;} |
---|
3360 | break; |
---|
3361 | |
---|
3362 | case 125: |
---|
3363 | #line 1117 "grammar.y" |
---|
3364 | { |
---|
3365 | singular_example((yyvsp[(2) - (3)].name)); |
---|
3366 | omFree((ADDRESS)(yyvsp[(2) - (3)].name)); |
---|
3367 | ;} |
---|
3368 | break; |
---|
3369 | |
---|
3370 | case 126: |
---|
3371 | #line 1125 "grammar.y" |
---|
3372 | { |
---|
3373 | if (basePack!=(yyvsp[(2) - (2)].lv).req_packhdl) |
---|
3374 | { |
---|
3375 | if(iiExport(&(yyvsp[(2) - (2)].lv),0,currPackHdl)) YYERROR; |
---|
3376 | } |
---|
3377 | else |
---|
3378 | if (iiExport(&(yyvsp[(2) - (2)].lv),0)) YYERROR; |
---|
3379 | ;} |
---|
3380 | break; |
---|
3381 | |
---|
3382 | case 127: |
---|
3383 | #line 1137 "grammar.y" |
---|
3384 | { |
---|
3385 | leftv v=&(yyvsp[(2) - (2)].lv); |
---|
3386 | if (v->rtyp!=IDHDL) |
---|
3387 | { |
---|
3388 | if (v->name!=NULL) |
---|
3389 | { |
---|
3390 | Werror("`%s` is undefined in kill",v->name); |
---|
3391 | } |
---|
3392 | else WerrorS("kill what ?"); |
---|
3393 | } |
---|
3394 | else |
---|
3395 | { |
---|
3396 | killhdl((idhdl)v->data,v->req_packhdl); |
---|
3397 | } |
---|
3398 | ;} |
---|
3399 | break; |
---|
3400 | |
---|
3401 | case 128: |
---|
3402 | #line 1153 "grammar.y" |
---|
3403 | { |
---|
3404 | leftv v=&(yyvsp[(3) - (3)].lv); |
---|
3405 | if (v->rtyp!=IDHDL) |
---|
3406 | { |
---|
3407 | if (v->name!=NULL) |
---|
3408 | { |
---|
3409 | Werror("`%s` is undefined in kill",v->name); |
---|
3410 | } |
---|
3411 | else WerrorS("kill what ?"); |
---|
3412 | } |
---|
3413 | else |
---|
3414 | { |
---|
3415 | killhdl((idhdl)v->data,v->req_packhdl); |
---|
3416 | } |
---|
3417 | ;} |
---|
3418 | break; |
---|
3419 | |
---|
3420 | case 129: |
---|
3421 | #line 1172 "grammar.y" |
---|
3422 | { |
---|
3423 | list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE); |
---|
3424 | ;} |
---|
3425 | break; |
---|
3426 | |
---|
3427 | case 130: |
---|
3428 | #line 1176 "grammar.y" |
---|
3429 | { |
---|
3430 | list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE); |
---|
3431 | ;} |
---|
3432 | break; |
---|
3433 | |
---|
3434 | case 131: |
---|
3435 | #line 1180 "grammar.y" |
---|
3436 | { |
---|
3437 | if ((yyvsp[(3) - (4)].i)==QRING_CMD) (yyvsp[(3) - (4)].i)=RING_CMD; |
---|
3438 | list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE); |
---|
3439 | ;} |
---|
3440 | break; |
---|
3441 | |
---|
3442 | case 132: |
---|
3443 | #line 1185 "grammar.y" |
---|
3444 | { |
---|
3445 | list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE); |
---|
3446 | ;} |
---|
3447 | break; |
---|
3448 | |
---|
3449 | case 133: |
---|
3450 | #line 1189 "grammar.y" |
---|
3451 | { |
---|
3452 | list_cmd(RING_CMD,NULL,"// ",TRUE); |
---|
3453 | ;} |
---|
3454 | break; |
---|
3455 | |
---|
3456 | case 134: |
---|
3457 | #line 1193 "grammar.y" |
---|
3458 | { |
---|
3459 | list_cmd(MATRIX_CMD,NULL,"// ",TRUE); |
---|
3460 | ;} |
---|
3461 | break; |
---|
3462 | |
---|
3463 | case 135: |
---|
3464 | #line 1197 "grammar.y" |
---|
3465 | { |
---|
3466 | list_cmd(INTMAT_CMD,NULL,"// ",TRUE); |
---|
3467 | ;} |
---|
3468 | break; |
---|
3469 | |
---|
3470 | case 136: |
---|
3471 | #line 1201 "grammar.y" |
---|
3472 | { |
---|
3473 | list_cmd(PROC_CMD,NULL,"// ",TRUE); |
---|
3474 | ;} |
---|
3475 | break; |
---|
3476 | |
---|
3477 | case 137: |
---|
3478 | #line 1205 "grammar.y" |
---|
3479 | { |
---|
3480 | list_cmd(0,(yyvsp[(3) - (4)].lv).Fullname(),"// ",TRUE); |
---|
3481 | (yyvsp[(3) - (4)].lv).CleanUp(); |
---|
3482 | ;} |
---|
3483 | break; |
---|
3484 | |
---|
3485 | case 138: |
---|
3486 | #line 1210 "grammar.y" |
---|
3487 | { |
---|
3488 | if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) |
---|
3489 | list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE); |
---|
3490 | (yyvsp[(3) - (6)].lv).CleanUp(); |
---|
3491 | ;} |
---|
3492 | break; |
---|
3493 | |
---|
3494 | case 139: |
---|
3495 | #line 1216 "grammar.y" |
---|
3496 | { |
---|
3497 | if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) |
---|
3498 | list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE); |
---|
3499 | (yyvsp[(3) - (6)].lv).CleanUp(); |
---|
3500 | ;} |
---|
3501 | break; |
---|
3502 | |
---|
3503 | case 140: |
---|
3504 | #line 1222 "grammar.y" |
---|
3505 | { |
---|
3506 | if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) |
---|
3507 | list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE); |
---|
3508 | (yyvsp[(3) - (6)].lv).CleanUp(); |
---|
3509 | ;} |
---|
3510 | break; |
---|
3511 | |
---|
3512 | case 141: |
---|
3513 | #line 1228 "grammar.y" |
---|
3514 | { |
---|
3515 | if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) |
---|
3516 | list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE); |
---|
3517 | (yyvsp[(3) - (6)].lv).CleanUp(); |
---|
3518 | ;} |
---|
3519 | break; |
---|
3520 | |
---|
3521 | case 142: |
---|
3522 | #line 1234 "grammar.y" |
---|
3523 | { |
---|
3524 | if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) |
---|
3525 | list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE); |
---|
3526 | (yyvsp[(3) - (6)].lv).CleanUp(); |
---|
3527 | ;} |
---|
3528 | break; |
---|
3529 | |
---|
3530 | case 143: |
---|
3531 | #line 1240 "grammar.y" |
---|
3532 | { |
---|
3533 | if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) |
---|
3534 | list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE); |
---|
3535 | (yyvsp[(3) - (6)].lv).CleanUp(); |
---|
3536 | ;} |
---|
3537 | break; |
---|
3538 | |
---|
3539 | case 144: |
---|
3540 | #line 1246 "grammar.y" |
---|
3541 | { |
---|
3542 | if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) |
---|
3543 | list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE); |
---|
3544 | (yyvsp[(3) - (6)].lv).CleanUp(); |
---|
3545 | ;} |
---|
3546 | break; |
---|
3547 | |
---|
3548 | case 145: |
---|
3549 | #line 1252 "grammar.y" |
---|
3550 | { |
---|
3551 | if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD) |
---|
3552 | list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE); |
---|
3553 | (yyvsp[(3) - (6)].lv).CleanUp(); |
---|
3554 | ;} |
---|
3555 | break; |
---|
3556 | |
---|
3557 | case 146: |
---|
3558 | #line 1264 "grammar.y" |
---|
3559 | { |
---|
3560 | list_cmd(-1,NULL,"// ",TRUE); |
---|
3561 | ;} |
---|
3562 | break; |
---|
3563 | |
---|
3564 | case 147: |
---|
3565 | #line 1270 "grammar.y" |
---|
3566 | { yyInRingConstruction = TRUE; ;} |
---|
3567 | break; |
---|
3568 | |
---|
3569 | case 148: |
---|
3570 | #line 1279 "grammar.y" |
---|
3571 | { |
---|
3572 | const char *ring_name = (yyvsp[(2) - (8)].lv).name; |
---|
3573 | ring b= |
---|
3574 | rInit(&(yyvsp[(4) - (8)].lv), /* characteristik and list of parameters*/ |
---|
3575 | &(yyvsp[(6) - (8)].lv), /* names of ringvariables */ |
---|
3576 | &(yyvsp[(8) - (8)].lv)); /* ordering */ |
---|
3577 | idhdl newRingHdl=NULL; |
---|
3578 | |
---|
3579 | if (b!=NULL) |
---|
3580 | { |
---|
3581 | newRingHdl=enterid(ring_name, myynest, RING_CMD, |
---|
3582 | &((yyvsp[(2) - (8)].lv).req_packhdl->idroot)); |
---|
3583 | (yyvsp[(2) - (8)].lv).CleanUp(); |
---|
3584 | if (newRingHdl!=NULL) |
---|
3585 | { |
---|
3586 | omFreeSize(IDRING(newRingHdl),sizeof(ip_sring)); |
---|
3587 | IDRING(newRingHdl)=b; |
---|
3588 | } |
---|
3589 | else |
---|
3590 | { |
---|
3591 | rKill(b); |
---|
3592 | } |
---|
3593 | } |
---|
3594 | yyInRingConstruction = FALSE; |
---|
3595 | if (newRingHdl==NULL) |
---|
3596 | { |
---|
3597 | MYYERROR("cannot make ring"); |
---|
3598 | } |
---|
3599 | else |
---|
3600 | { |
---|
3601 | rSetHdl(newRingHdl); |
---|
3602 | } |
---|
3603 | ;} |
---|
3604 | break; |
---|
3605 | |
---|
3606 | case 149: |
---|
3607 | #line 1313 "grammar.y" |
---|
3608 | { |
---|
3609 | const char *ring_name = (yyvsp[(2) - (2)].lv).name; |
---|
3610 | if (!inerror) rDefault(ring_name); |
---|
3611 | yyInRingConstruction = FALSE; |
---|
3612 | (yyvsp[(2) - (2)].lv).CleanUp(); |
---|
3613 | ;} |
---|
3614 | break; |
---|
3615 | |
---|
3616 | case 150: |
---|
3617 | #line 1323 "grammar.y" |
---|
3618 | { |
---|
3619 | if (((yyvsp[(1) - (2)].i)!=LIB_CMD)||(iiLibCmd((yyvsp[(2) - (2)].name),TRUE,TRUE,TRUE))) |
---|
3620 | //if ($1==LIB_CMD) |
---|
3621 | //{ |
---|
3622 | // sleftv tmp; |
---|
3623 | // if(iiExprArith1(&tmp,&$2,LIB_CMD)) YYERROR; |
---|
3624 | //} |
---|
3625 | //else |
---|
3626 | YYERROR; |
---|
3627 | ;} |
---|
3628 | break; |
---|
3629 | |
---|
3630 | case 153: |
---|
3631 | #line 1339 "grammar.y" |
---|
3632 | { |
---|
3633 | if (((yyvsp[(1) - (2)].i)==KEEPRING_CMD) && (myynest==0)) |
---|
3634 | MYYERROR("only inside a proc allowed"); |
---|
3635 | const char * n=(yyvsp[(2) - (2)].lv).Name(); |
---|
3636 | if ((((yyvsp[(2) - (2)].lv).Typ()==RING_CMD)||((yyvsp[(2) - (2)].lv).Typ()==QRING_CMD)) |
---|
3637 | && ((yyvsp[(2) - (2)].lv).rtyp==IDHDL)) |
---|
3638 | { |
---|
3639 | idhdl h=(idhdl)(yyvsp[(2) - (2)].lv).data; |
---|
3640 | if ((yyvsp[(2) - (2)].lv).e!=NULL) h=rFindHdl((ring)(yyvsp[(2) - (2)].lv).Data(),NULL, NULL); |
---|
3641 | //Print("setring %s lev %d (ptr:%x)\n",IDID(h),IDLEV(h),IDRING(h)); |
---|
3642 | if ((yyvsp[(1) - (2)].i)==KEEPRING_CMD) |
---|
3643 | { |
---|
3644 | if (h!=NULL) |
---|
3645 | { |
---|
3646 | if (IDLEV(h)!=0) |
---|
3647 | { |
---|
3648 | if (iiExport(&(yyvsp[(2) - (2)].lv),myynest-1)) YYERROR; |
---|
3649 | #if 1 |
---|
3650 | idhdl p=IDRING(h)->idroot; |
---|
3651 | idhdl root=p; |
---|
3652 | int prevlev=myynest-1; |
---|
3653 | while (p!=NULL) |
---|
3654 | { |
---|
3655 | if (IDLEV(p)==myynest) |
---|
3656 | { |
---|
3657 | idhdl old=root->get(IDID(p),prevlev); |
---|
3658 | if (old!=NULL) |
---|
3659 | { |
---|
3660 | if (BVERBOSE(V_REDEFINE)) |
---|
3661 | Warn("redefining %s",IDID(p)); |
---|
3662 | killhdl2(old,&root,IDRING(h)); |
---|
3663 | IDRING(h)->idroot=root; |
---|
3664 | } |
---|
3665 | IDLEV(p)=prevlev; |
---|
3666 | } |
---|
3667 | p=IDNEXT(p); |
---|
3668 | } |
---|
3669 | #endif |
---|
3670 | } |
---|
3671 | #ifdef USE_IILOCALRING |
---|
3672 | iiLocalRing[myynest-1]=IDRING(h); |
---|
3673 | #endif |
---|
3674 | procstack->cRing=IDRING(h); |
---|
3675 | procstack->cRingHdl=h; |
---|
3676 | } |
---|
3677 | else |
---|
3678 | { |
---|
3679 | Werror("%s is no identifier",n); |
---|
3680 | (yyvsp[(2) - (2)].lv).CleanUp(); |
---|
3681 | YYERROR; |
---|
3682 | } |
---|
3683 | } |
---|
3684 | if (h!=NULL) rSetHdl(h); |
---|
3685 | else |
---|
3686 | { |
---|
3687 | Werror("cannot find the name of the basering %s",n); |
---|
3688 | (yyvsp[(2) - (2)].lv).CleanUp(); |
---|
3689 | YYERROR; |
---|
3690 | } |
---|
3691 | (yyvsp[(2) - (2)].lv).CleanUp(); |
---|
3692 | } |
---|
3693 | else |
---|
3694 | { |
---|
3695 | Werror("%s is no name of a ring/qring",n); |
---|
3696 | (yyvsp[(2) - (2)].lv).CleanUp(); |
---|
3697 | YYERROR; |
---|
3698 | } |
---|
3699 | ;} |
---|
3700 | break; |
---|
3701 | |
---|
3702 | case 154: |
---|
3703 | #line 1411 "grammar.y" |
---|
3704 | { |
---|
3705 | if ((yyvsp[(2) - (2)].lv).rtyp!=IDHDL) MYYERROR("identifier expected"); |
---|
3706 | idhdl h = (idhdl)(yyvsp[(2) - (2)].lv).data; |
---|
3707 | type_cmd(h); |
---|
3708 | ;} |
---|
3709 | break; |
---|
3710 | |
---|
3711 | case 155: |
---|
3712 | #line 1417 "grammar.y" |
---|
3713 | { |
---|
3714 | //Print("typ is %d, rtyp:%d\n",$1.Typ(),$1.rtyp); |
---|
3715 | #ifdef SIQ |
---|
3716 | if ((yyvsp[(1) - (1)].lv).rtyp!=COMMAND) |
---|
3717 | { |
---|
3718 | #endif |
---|
3719 | if ((yyvsp[(1) - (1)].lv).Typ()==UNKNOWN) |
---|
3720 | { |
---|
3721 | if ((yyvsp[(1) - (1)].lv).name!=NULL) |
---|
3722 | { |
---|
3723 | Werror("`%s` is undefined",(yyvsp[(1) - (1)].lv).name); |
---|
3724 | omFree((ADDRESS)(yyvsp[(1) - (1)].lv).name); |
---|
3725 | } |
---|
3726 | YYERROR; |
---|
3727 | } |
---|
3728 | #ifdef SIQ |
---|
3729 | } |
---|
3730 | #endif |
---|
3731 | (yyvsp[(1) - (1)].lv).Print(&sLastPrinted); |
---|
3732 | (yyvsp[(1) - (1)].lv).CleanUp(currRing); |
---|
3733 | if (errorreported) YYERROR; |
---|
3734 | ;} |
---|
3735 | break; |
---|
3736 | |
---|
3737 | case 156: |
---|
3738 | #line 1446 "grammar.y" |
---|
3739 | { |
---|
3740 | int i; TESTSETINT((yyvsp[(3) - (5)].lv),i); |
---|
3741 | if (i!=0) |
---|
3742 | { |
---|
3743 | newBuffer( (yyvsp[(5) - (5)].name), BT_if); |
---|
3744 | } |
---|
3745 | else |
---|
3746 | { |
---|
3747 | omFree((ADDRESS)(yyvsp[(5) - (5)].name)); |
---|
3748 | currentVoice->ifsw=1; |
---|
3749 | } |
---|
3750 | ;} |
---|
3751 | break; |
---|
3752 | |
---|
3753 | case 157: |
---|
3754 | #line 1459 "grammar.y" |
---|
3755 | { |
---|
3756 | if (currentVoice->ifsw==1) |
---|
3757 | { |
---|
3758 | currentVoice->ifsw=0; |
---|
3759 | newBuffer( (yyvsp[(2) - (2)].name), BT_else); |
---|
3760 | } |
---|
3761 | else |
---|
3762 | { |
---|
3763 | if (currentVoice->ifsw!=2) |
---|
3764 | { |
---|
3765 | Warn("`else` without `if` in level %d",myynest); |
---|
3766 | } |
---|
3767 | omFree((ADDRESS)(yyvsp[(2) - (2)].name)); |
---|
3768 | } |
---|
3769 | currentVoice->ifsw=0; |
---|
3770 | ;} |
---|
3771 | break; |
---|
3772 | |
---|
3773 | case 158: |
---|
3774 | #line 1476 "grammar.y" |
---|
3775 | { |
---|
3776 | int i; TESTSETINT((yyvsp[(3) - (5)].lv),i); |
---|
3777 | if (i) |
---|
3778 | { |
---|
3779 | if (exitBuffer(BT_break)) YYERROR; |
---|
3780 | } |
---|
3781 | currentVoice->ifsw=0; |
---|
3782 | ;} |
---|
3783 | break; |
---|
3784 | |
---|
3785 | case 159: |
---|
3786 | #line 1485 "grammar.y" |
---|
3787 | { |
---|
3788 | if (exitBuffer(BT_break)) YYERROR; |
---|
3789 | currentVoice->ifsw=0; |
---|
3790 | ;} |
---|
3791 | break; |
---|
3792 | |
---|
3793 | case 160: |
---|
3794 | #line 1490 "grammar.y" |
---|
3795 | { |
---|
3796 | if (contBuffer(BT_break)) YYERROR; |
---|
3797 | currentVoice->ifsw=0; |
---|
3798 | ;} |
---|
3799 | break; |
---|
3800 | |
---|
3801 | case 161: |
---|
3802 | #line 1498 "grammar.y" |
---|
3803 | { |
---|
3804 | /* -> if(!$2) break; $3; continue;*/ |
---|
3805 | char * s = (char *)omAlloc( strlen((yyvsp[(2) - (3)].name)) + strlen((yyvsp[(3) - (3)].name)) + 36); |
---|
3806 | sprintf(s,"whileif (!(%s)) break;\n%scontinue;\n " ,(yyvsp[(2) - (3)].name),(yyvsp[(3) - (3)].name)); |
---|
3807 | newBuffer(s,BT_break); |
---|
3808 | omFree((ADDRESS)(yyvsp[(2) - (3)].name)); |
---|
3809 | omFree((ADDRESS)(yyvsp[(3) - (3)].name)); |
---|
3810 | ;} |
---|
3811 | break; |
---|
3812 | |
---|
3813 | case 162: |
---|
3814 | #line 1510 "grammar.y" |
---|
3815 | { |
---|
3816 | /* $2 */ |
---|
3817 | /* if (!$3) break; $5; $4; continue; */ |
---|
3818 | char * s = (char *)omAlloc( strlen((yyvsp[(3) - (5)].name))+strlen((yyvsp[(4) - (5)].name))+strlen((yyvsp[(5) - (5)].name))+36); |
---|
3819 | sprintf(s,"forif (!(%s)) break;\n%s%s;\ncontinue;\n " |
---|
3820 | ,(yyvsp[(3) - (5)].name),(yyvsp[(5) - (5)].name),(yyvsp[(4) - (5)].name)); |
---|
3821 | omFree((ADDRESS)(yyvsp[(3) - (5)].name)); |
---|
3822 | omFree((ADDRESS)(yyvsp[(4) - (5)].name)); |
---|
3823 | omFree((ADDRESS)(yyvsp[(5) - (5)].name)); |
---|
3824 | newBuffer(s,BT_break); |
---|
3825 | s = (char *)omAlloc( strlen((yyvsp[(2) - (5)].name)) + 3); |
---|
3826 | sprintf(s,"%s;\n",(yyvsp[(2) - (5)].name)); |
---|
3827 | omFree((ADDRESS)(yyvsp[(2) - (5)].name)); |
---|
3828 | newBuffer(s,BT_if); |
---|
3829 | ;} |
---|
3830 | break; |
---|
3831 | |
---|
3832 | case 163: |
---|
3833 | #line 1529 "grammar.y" |
---|
3834 | { |
---|
3835 | procinfov pi; |
---|
3836 | idhdl h = enterid((yyvsp[(2) - (3)].name),myynest,PROC_CMD,&IDROOT,TRUE); |
---|
3837 | if (h==NULL) {omFree((ADDRESS)(yyvsp[(2) - (3)].name));omFree((ADDRESS)(yyvsp[(3) - (3)].name)); YYERROR;} |
---|
3838 | iiInitSingularProcinfo(IDPROC(h),"", (yyvsp[(2) - (3)].name), 0, 0); |
---|
3839 | IDPROC(h)->data.s.body = (char *)omAlloc(strlen((yyvsp[(3) - (3)].name))+31);; |
---|
3840 | sprintf(IDPROC(h)->data.s.body,"parameter list #;\n%s;return();\n\n",(yyvsp[(3) - (3)].name)); |
---|
3841 | omFree((ADDRESS)(yyvsp[(3) - (3)].name)); |
---|
3842 | omFree((ADDRESS)(yyvsp[(2) - (3)].name)); |
---|
3843 | ;} |
---|
3844 | break; |
---|
3845 | |
---|
3846 | case 164: |
---|
3847 | #line 1540 "grammar.y" |
---|
3848 | { |
---|
3849 | idhdl h = enterid((yyvsp[(1) - (3)].name),myynest,PROC_CMD,&IDROOT,TRUE); |
---|
3850 | if (h==NULL) |
---|
3851 | { |
---|
3852 | omFree((ADDRESS)(yyvsp[(1) - (3)].name)); |
---|
3853 | omFree((ADDRESS)(yyvsp[(2) - (3)].name)); |
---|
3854 | omFree((ADDRESS)(yyvsp[(3) - (3)].name)); |
---|
3855 | YYERROR; |
---|
3856 | } |
---|
3857 | char *args=iiProcArgs((yyvsp[(2) - (3)].name),FALSE); |
---|
3858 | omFree((ADDRESS)(yyvsp[(2) - (3)].name)); |
---|
3859 | procinfov pi; |
---|
3860 | iiInitSingularProcinfo(IDPROC(h),"", (yyvsp[(1) - (3)].name), 0, 0); |
---|
3861 | IDPROC(h)->data.s.body = (char *)omAlloc(strlen((yyvsp[(3) - (3)].name))+strlen(args)+14);; |
---|
3862 | sprintf(IDPROC(h)->data.s.body,"%s\n%s;return();\n\n",args,(yyvsp[(3) - (3)].name)); |
---|
3863 | omFree((ADDRESS)args); |
---|
3864 | omFree((ADDRESS)(yyvsp[(3) - (3)].name)); |
---|
3865 | omFree((ADDRESS)(yyvsp[(1) - (3)].name)); |
---|
3866 | ;} |
---|
3867 | break; |
---|
3868 | |
---|
3869 | case 165: |
---|
3870 | #line 1560 "grammar.y" |
---|
3871 | { |
---|
3872 | omFree((ADDRESS)(yyvsp[(3) - (4)].name)); |
---|
3873 | idhdl h = enterid((yyvsp[(1) - (4)].name),myynest,PROC_CMD,&IDROOT,TRUE); |
---|
3874 | if (h==NULL) |
---|
3875 | { |
---|
3876 | omFree((ADDRESS)(yyvsp[(1) - (4)].name)); |
---|
3877 | omFree((ADDRESS)(yyvsp[(2) - (4)].name)); |
---|
3878 | omFree((ADDRESS)(yyvsp[(4) - (4)].name)); |
---|
3879 | YYERROR; |
---|
3880 | } |
---|
3881 | char *args=iiProcArgs((yyvsp[(2) - (4)].name),FALSE); |
---|
3882 | omFree((ADDRESS)(yyvsp[(2) - (4)].name)); |
---|
3883 | procinfov pi; |
---|
3884 | iiInitSingularProcinfo(IDPROC(h),"", (yyvsp[(1) - (4)].name), 0, 0); |
---|
3885 | omFree((ADDRESS)(yyvsp[(1) - (4)].name)); |
---|
3886 | IDPROC(h)->data.s.body = (char *)omAlloc(strlen((yyvsp[(4) - (4)].name))+strlen(args)+14);; |
---|
3887 | sprintf(IDPROC(h)->data.s.body,"%s\n%s;return();\n\n",args,(yyvsp[(4) - (4)].name)); |
---|
3888 | omFree((ADDRESS)args); |
---|
3889 | omFree((ADDRESS)(yyvsp[(4) - (4)].name)); |
---|
3890 | ;} |
---|
3891 | break; |
---|
3892 | |
---|
3893 | case 166: |
---|
3894 | #line 1584 "grammar.y" |
---|
3895 | { |
---|
3896 | // decl. of type proc p(int i) |
---|
3897 | if ((yyvsp[(1) - (2)].i)==PARAMETER) { if (iiParameter(&(yyvsp[(2) - (2)].lv))) YYERROR; } |
---|
3898 | else { if (iiAlias(&(yyvsp[(2) - (2)].lv))) YYERROR; } |
---|
3899 | ;} |
---|
3900 | break; |
---|
3901 | |
---|
3902 | case 167: |
---|
3903 | #line 1590 "grammar.y" |
---|
3904 | { |
---|
3905 | // decl. of type proc p(i) |
---|
3906 | sleftv tmp_expr; |
---|
3907 | if ((yyvsp[(1) - (2)].i)==ALIAS_CMD) MYYERROR("alias requires a type"); |
---|
3908 | if ((iiDeclCommand(&tmp_expr,&(yyvsp[(2) - (2)].lv),myynest,DEF_CMD,&IDROOT)) |
---|
3909 | || (iiParameter(&tmp_expr))) |
---|
3910 | YYERROR; |
---|
3911 | ;} |
---|
3912 | break; |
---|
3913 | |
---|
3914 | case 168: |
---|
3915 | #line 1602 "grammar.y" |
---|
3916 | { |
---|
3917 | if(iiRETURNEXPR==NULL) YYERROR; |
---|
3918 | iiRETURNEXPR[myynest].Copy(&(yyvsp[(3) - (4)].lv)); |
---|
3919 | (yyvsp[(3) - (4)].lv).CleanUp(); |
---|
3920 | if (exitBuffer(BT_proc)) YYERROR; |
---|
3921 | ;} |
---|
3922 | break; |
---|
3923 | |
---|
3924 | case 169: |
---|
3925 | #line 1609 "grammar.y" |
---|
3926 | { |
---|
3927 | if ((yyvsp[(1) - (3)].i)==RETURN) |
---|
3928 | { |
---|
3929 | if(iiRETURNEXPR==NULL) YYERROR; |
---|
3930 | iiRETURNEXPR[myynest].Init(); |
---|
3931 | iiRETURNEXPR[myynest].rtyp=NONE; |
---|
3932 | if (exitBuffer(BT_proc)) YYERROR; |
---|
3933 | } |
---|
3934 | ;} |
---|
3935 | break; |
---|
3936 | |
---|
3937 | |
---|
3938 | /* Line 1267 of yacc.c. */ |
---|
3939 | #line 3940 "grammar.cc" |
---|
3940 | default: break; |
---|
3941 | } |
---|
3942 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
---|
3943 | |
---|
3944 | YYPOPSTACK (yylen); |
---|
3945 | yylen = 0; |
---|
3946 | YY_STACK_PRINT (yyss, yyssp); |
---|
3947 | |
---|
3948 | *++yyvsp = yyval; |
---|
3949 | |
---|
3950 | |
---|
3951 | /* Now `shift' the result of the reduction. Determine what state |
---|
3952 | that goes to, based on the state we popped back to and the rule |
---|
3953 | number reduced by. */ |
---|
3954 | |
---|
3955 | yyn = yyr1[yyn]; |
---|
3956 | |
---|
3957 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
---|
3958 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
---|
3959 | yystate = yytable[yystate]; |
---|
3960 | else |
---|
3961 | yystate = yydefgoto[yyn - YYNTOKENS]; |
---|
3962 | |
---|
3963 | goto yynewstate; |
---|
3964 | |
---|
3965 | |
---|
3966 | /*------------------------------------. |
---|
3967 | | yyerrlab -- here on detecting error | |
---|
3968 | `------------------------------------*/ |
---|
3969 | yyerrlab: |
---|
3970 | /* If not already recovering from an error, report this error. */ |
---|
3971 | if (!yyerrstatus) |
---|
3972 | { |
---|
3973 | ++yynerrs; |
---|
3974 | #if ! YYERROR_VERBOSE |
---|
3975 | yyerror (YY_("syntax error")); |
---|
3976 | #else |
---|
3977 | { |
---|
3978 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); |
---|
3979 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) |
---|
3980 | { |
---|
3981 | YYSIZE_T yyalloc = 2 * yysize; |
---|
3982 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) |
---|
3983 | yyalloc = YYSTACK_ALLOC_MAXIMUM; |
---|
3984 | if (yymsg != yymsgbuf) |
---|
3985 | YYSTACK_FREE (yymsg); |
---|
3986 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); |
---|
3987 | if (yymsg) |
---|
3988 | yymsg_alloc = yyalloc; |
---|
3989 | else |
---|
3990 | { |
---|
3991 | yymsg = yymsgbuf; |
---|
3992 | yymsg_alloc = sizeof yymsgbuf; |
---|
3993 | } |
---|
3994 | } |
---|
3995 | |
---|
3996 | if (0 < yysize && yysize <= yymsg_alloc) |
---|
3997 | { |
---|
3998 | (void) yysyntax_error (yymsg, yystate, yychar); |
---|
3999 | yyerror (yymsg); |
---|
4000 | } |
---|
4001 | else |
---|
4002 | { |
---|
4003 | yyerror (YY_("syntax error")); |
---|
4004 | if (yysize != 0) |
---|
4005 | goto yyexhaustedlab; |
---|
4006 | } |
---|
4007 | } |
---|
4008 | #endif |
---|
4009 | } |
---|
4010 | |
---|
4011 | |
---|
4012 | |
---|
4013 | if (yyerrstatus == 3) |
---|
4014 | { |
---|
4015 | /* If just tried and failed to reuse look-ahead token after an |
---|
4016 | error, discard it. */ |
---|
4017 | |
---|
4018 | if (yychar <= YYEOF) |
---|
4019 | { |
---|
4020 | /* Return failure if at end of input. */ |
---|
4021 | if (yychar == YYEOF) |
---|
4022 | YYABORT; |
---|
4023 | } |
---|
4024 | else |
---|
4025 | { |
---|
4026 | yydestruct ("Error: discarding", |
---|
4027 | yytoken, &yylval); |
---|
4028 | yychar = YYEMPTY; |
---|
4029 | } |
---|
4030 | } |
---|
4031 | |
---|
4032 | /* Else will try to reuse look-ahead token after shifting the error |
---|
4033 | token. */ |
---|
4034 | goto yyerrlab1; |
---|
4035 | |
---|
4036 | |
---|
4037 | /*---------------------------------------------------. |
---|
4038 | | yyerrorlab -- error raised explicitly by YYERROR. | |
---|
4039 | `---------------------------------------------------*/ |
---|
4040 | yyerrorlab: |
---|
4041 | |
---|
4042 | /* Pacify compilers like GCC when the user code never invokes |
---|
4043 | YYERROR and the label yyerrorlab therefore never appears in user |
---|
4044 | code. */ |
---|
4045 | if (/*CONSTCOND*/ 0) |
---|
4046 | goto yyerrorlab; |
---|
4047 | |
---|
4048 | /* Do not reclaim the symbols of the rule which action triggered |
---|
4049 | this YYERROR. */ |
---|
4050 | YYPOPSTACK (yylen); |
---|
4051 | yylen = 0; |
---|
4052 | YY_STACK_PRINT (yyss, yyssp); |
---|
4053 | yystate = *yyssp; |
---|
4054 | goto yyerrlab1; |
---|
4055 | |
---|
4056 | |
---|
4057 | /*-------------------------------------------------------------. |
---|
4058 | | yyerrlab1 -- common code for both syntax error and YYERROR. | |
---|
4059 | `-------------------------------------------------------------*/ |
---|
4060 | yyerrlab1: |
---|
4061 | yyerrstatus = 3; /* Each real token shifted decrements this. */ |
---|
4062 | |
---|
4063 | for (;;) |
---|
4064 | { |
---|
4065 | yyn = yypact[yystate]; |
---|
4066 | if (yyn != YYPACT_NINF) |
---|
4067 | { |
---|
4068 | yyn += YYTERROR; |
---|
4069 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
---|
4070 | { |
---|
4071 | yyn = yytable[yyn]; |
---|
4072 | if (0 < yyn) |
---|
4073 | break; |
---|
4074 | } |
---|
4075 | } |
---|
4076 | |
---|
4077 | /* Pop the current state because it cannot handle the error token. */ |
---|
4078 | if (yyssp == yyss) |
---|
4079 | YYABORT; |
---|
4080 | |
---|
4081 | |
---|
4082 | yydestruct ("Error: popping", |
---|
4083 | yystos[yystate], yyvsp); |
---|
4084 | YYPOPSTACK (1); |
---|
4085 | yystate = *yyssp; |
---|
4086 | YY_STACK_PRINT (yyss, yyssp); |
---|
4087 | } |
---|
4088 | |
---|
4089 | if (yyn == YYFINAL) |
---|
4090 | YYACCEPT; |
---|
4091 | |
---|
4092 | *++yyvsp = yylval; |
---|
4093 | |
---|
4094 | |
---|
4095 | /* Shift the error token. */ |
---|
4096 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
---|
4097 | |
---|
4098 | yystate = yyn; |
---|
4099 | goto yynewstate; |
---|
4100 | |
---|
4101 | |
---|
4102 | /*-------------------------------------. |
---|
4103 | | yyacceptlab -- YYACCEPT comes here. | |
---|
4104 | `-------------------------------------*/ |
---|
4105 | yyacceptlab: |
---|
4106 | yyresult = 0; |
---|
4107 | goto yyreturn; |
---|
4108 | |
---|
4109 | /*-----------------------------------. |
---|
4110 | | yyabortlab -- YYABORT comes here. | |
---|
4111 | `-----------------------------------*/ |
---|
4112 | yyabortlab: |
---|
4113 | yyresult = 1; |
---|
4114 | goto yyreturn; |
---|
4115 | |
---|
4116 | #ifndef yyoverflow |
---|
4117 | /*-------------------------------------------------. |
---|
4118 | | yyexhaustedlab -- memory exhaustion comes here. | |
---|
4119 | `-------------------------------------------------*/ |
---|
4120 | yyexhaustedlab: |
---|
4121 | yyerror (YY_("memory exhausted")); |
---|
4122 | yyresult = 2; |
---|
4123 | /* Fall through. */ |
---|
4124 | #endif |
---|
4125 | |
---|
4126 | yyreturn: |
---|
4127 | if (yychar != YYEOF && yychar != YYEMPTY) |
---|
4128 | yydestruct ("Cleanup: discarding lookahead", |
---|
4129 | yytoken, &yylval); |
---|
4130 | /* Do not reclaim the symbols of the rule which action triggered |
---|
4131 | this YYABORT or YYACCEPT. */ |
---|
4132 | YYPOPSTACK (yylen); |
---|
4133 | YY_STACK_PRINT (yyss, yyssp); |
---|
4134 | while (yyssp != yyss) |
---|
4135 | { |
---|
4136 | yydestruct ("Cleanup: popping", |
---|
4137 | yystos[ |
---|