source: git/Singular/grammar.cc @ f92a39

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