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