source: git/Singular/grammar.cc @ 5b6807

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