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