source: git/Singular/grammar.cc @ 6d672b4

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