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

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