source: git/Singular/grammar.cc @ 88ece17

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