source: git/Singular/grammar.cc @ 1b2216

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