source: git/Singular/grammar.cc @ fe02b1

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