Macros | Typedefs | Enumerations | Functions | Variables
grammar.cc File Reference
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <kernel/mod2.h>
#include <misc/auxiliary.h>
#include <misc/mylimits.h>
#include <omalloc/omalloc.h>
#include <Singular/tok.h>
#include <misc/options.h>
#include <Singular/stype.h>
#include <Singular/fehelp.h>
#include <Singular/ipid.h>
#include <misc/intvec.h>
#include <kernel/oswrapper/feread.h>
#include <Singular/fevoices.h>
#include <polys/matpol.h>
#include <polys/monomials/ring.h>
#include <kernel/GBEngine/kstd1.h>
#include <Singular/subexpr.h>
#include <Singular/ipshell.h>
#include <Singular/ipconv.h>
#include <Singular/sdb.h>
#include <kernel/ideals.h>
#include <coeffs/numbers.h>
#include <kernel/polys.h>
#include <kernel/combinatorics/stairc.h>
#include <kernel/oswrapper/timer.h>
#include <Singular/cntrlc.h>
#include <polys/monomials/maps.h>
#include <kernel/GBEngine/syz.h>
#include <Singular/lists.h>
#include <Singular/libparse.h>
#include <coeffs/bigintmat.h>

Go to the source code of this file.

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "2.4.3"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   1
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define YYLSP_NEEDED   0
 
#define YYMAXDEPTH   MAX_INT_VAL
 
#define TESTSETINT(a, i)
 
#define MYYERROR(a)   { WerrorS(a); YYERROR; }
 
#define YYERROR_VERBOSE   0
 
#define YYTOKEN_TABLE   0
 
#define YYTOKENTYPE
 
#define YYSIZE_T   size_t
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_(msgid)   msgid
 
#define YYUSE(e)   ((void) (e))
 
#define YYID(n)   (n)
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define _STDLIB_H   1
 
#define YYMALLOC   malloc
 
#define YYFREE   free
 
#define YYFINAL   2
 
#define YYLAST   2508
 
#define YYNTOKENS   103
 
#define YYNNTS   45
 
#define YYNRULES   174
 
#define YYNSTATES   396
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   340
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -365
 
#define YYTABLE_NINF   -155
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYFAIL   goto yyerrlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
 
#define YYLLOC_DEFAULT(Current, Rhs, N)
 
#define YY_LOCATION_PRINT(File, Loc)   ((void) 0)
 
#define YYLEX   yylex (&yylval)
 
#define YYFPRINTF   fprintf
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 

Typedefs

typedef unsigned char yytype_uint8
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  yytokentype {
  DOTDOT = 258, EQUAL_EQUAL = 259, GE = 260, LE = 261,
  MINUSMINUS = 262, NOT = 263, NOTEQUAL = 264, PLUSPLUS = 265,
  COLONCOLON = 266, ARROW = 267, GRING_CMD = 268, BIGINTMAT_CMD = 269,
  INTMAT_CMD = 270, PROC_CMD = 271, RING_CMD = 272, BEGIN_RING = 273,
  IDEAL_CMD = 274, MAP_CMD = 275, MATRIX_CMD = 276, MODUL_CMD = 277,
  NUMBER_CMD = 278, POLY_CMD = 279, RESOLUTION_CMD = 280, VECTOR_CMD = 281,
  BETTI_CMD = 282, E_CMD = 283, FETCH_CMD = 284, FREEMODULE_CMD = 285,
  KEEPRING_CMD = 286, IMAP_CMD = 287, KOSZUL_CMD = 288, MAXID_CMD = 289,
  MONOM_CMD = 290, PAR_CMD = 291, PREIMAGE_CMD = 292, VAR_CMD = 293,
  VALTVARS = 294, VMAXDEG = 295, VMAXMULT = 296, VNOETHER = 297,
  VMINPOLY = 298, END_RING = 299, CMD_1 = 300, CMD_2 = 301,
  CMD_3 = 302, CMD_12 = 303, CMD_13 = 304, CMD_23 = 305,
  CMD_123 = 306, CMD_M = 307, ROOT_DECL = 308, ROOT_DECL_LIST = 309,
  RING_DECL = 310, RING_DECL_LIST = 311, EXAMPLE_CMD = 312, EXPORT_CMD = 313,
  HELP_CMD = 314, KILL_CMD = 315, LIB_CMD = 316, LISTVAR_CMD = 317,
  SETRING_CMD = 318, TYPE_CMD = 319, STRINGTOK = 320, BLOCKTOK = 321,
  INT_CONST = 322, UNKNOWN_IDENT = 323, RINGVAR = 324, PROC_DEF = 325,
  APPLY = 326, ASSUME_CMD = 327, BREAK_CMD = 328, CONTINUE_CMD = 329,
  ELSE_CMD = 330, EVAL = 331, QUOTE = 332, FOR_CMD = 333,
  IF_CMD = 334, SYS_BREAK = 335, WHILE_CMD = 336, RETURN = 337,
  PARAMETER = 338, SYSVAR = 339, UMINUS = 340, DOTDOT = 258,
  EQUAL_EQUAL = 259, GE = 260, LE = 261, MINUSMINUS = 262,
  NOT = 263, NOTEQUAL = 264, PLUSPLUS = 265, COLONCOLON = 266,
  ARROW = 267, GRING_CMD = 268, BIGINTMAT_CMD = 269, INTMAT_CMD = 270,
  PROC_CMD = 271, RING_CMD = 272, BEGIN_RING = 273, IDEAL_CMD = 274,
  MAP_CMD = 275, MATRIX_CMD = 276, MODUL_CMD = 277, NUMBER_CMD = 278,
  POLY_CMD = 279, RESOLUTION_CMD = 280, VECTOR_CMD = 281, BETTI_CMD = 282,
  E_CMD = 283, FETCH_CMD = 284, FREEMODULE_CMD = 285, KEEPRING_CMD = 286,
  IMAP_CMD = 287, KOSZUL_CMD = 288, MAXID_CMD = 289, MONOM_CMD = 290,
  PAR_CMD = 291, PREIMAGE_CMD = 292, VAR_CMD = 293, VALTVARS = 294,
  VMAXDEG = 295, VMAXMULT = 296, VNOETHER = 297, VMINPOLY = 298,
  END_RING = 299, CMD_1 = 300, CMD_2 = 301, CMD_3 = 302,
  CMD_12 = 303, CMD_13 = 304, CMD_23 = 305, CMD_123 = 306,
  CMD_M = 307, ROOT_DECL = 308, ROOT_DECL_LIST = 309, RING_DECL = 310,
  RING_DECL_LIST = 311, EXAMPLE_CMD = 312, EXPORT_CMD = 313, HELP_CMD = 314,
  KILL_CMD = 315, LIB_CMD = 316, LISTVAR_CMD = 317, SETRING_CMD = 318,
  TYPE_CMD = 319, STRINGTOK = 320, BLOCKTOK = 321, INT_CONST = 322,
  UNKNOWN_IDENT = 323, RINGVAR = 324, PROC_DEF = 325, APPLY = 326,
  ASSUME_CMD = 327, BREAK_CMD = 328, CONTINUE_CMD = 329, ELSE_CMD = 330,
  EVAL = 331, QUOTE = 332, FOR_CMD = 333, IF_CMD = 334,
  SYS_BREAK = 335, WHILE_CMD = 336, RETURN = 337, PARAMETER = 338,
  SYSVAR = 339, UMINUS = 340
}
 

Functions

void yyerror (const char *fmt)
 
static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
 
static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
 
static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
 
static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
 
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 
int yyparse (void)
 

Variables

int yylineno
 
FILE * yyin
 
const char * currid
 
BOOLEAN yyInRingConstruction =FALSE
 
BOOLEAN expected_parms
 
int cmdtok
 
int inerror = 0
 
static const yytype_uint8 yytranslate []
 
static const yytype_uint16 yyprhs []
 
static const yytype_int16 yyrhs []
 
static const yytype_uint16 yyrline []
 
static const char *const yytname []
 
static const yytype_uint8 yyr1 []
 
static const yytype_uint8 yyr2 []
 
static const yytype_uint8 yydefact []
 
static const yytype_int16 yydefgoto []
 
static const yytype_int16 yypact []
 
static const yytype_int16 yypgoto []
 
static const yytype_int16 yytable []
 
static const yytype_int16 yycheck []
 
static const yytype_uint8 yystos []
 
int yydebug
 

Macro Definition Documentation

#define _STDLIB_H   1

Definition at line 502 of file grammar.cc.

#define MYYERROR (   a)    { WerrorS(a); YYERROR; }

Definition at line 186 of file grammar.cc.

#define TESTSETINT (   a,
  i 
)
Value:
if ((a).Typ() != INT_CMD) \
{ \
WerrorS("no int expression"); \
} \
(i) = (int)((long)(a).Data());(a).CleanUp()
const poly a
Definition: syzextra.cc:212
Definition: tok.h:98
void WerrorS(const char *s)
Definition: feFopen.cc:24
int i
Definition: cfEzgcd.cc:123
#define YYERROR
Definition: grammar.cc:1544

Definition at line 178 of file grammar.cc.

#define YY_ (   msgid)    msgid

Definition at line 424 of file grammar.cc.

#define YY_LOCATION_PRINT (   File,
  Loc 
)    ((void) 0)

Definition at line 1623 of file grammar.cc.

#define YY_REDUCE_PRINT (   Rule)
Value:
do { \
yy_reduce_print (yyvsp, Rule); \
} while (YYID (0))
if(0 > strat->sl)
Definition: myNF.cc:73
static void yy_reduce_print(YYSTYPE *yyvsp, int yyrule)
Definition: grammar.cc:1759
int yydebug
Definition: grammar.cc:1791
#define YYID(n)
Definition: grammar.cc:437

Definition at line 1783 of file grammar.cc.

#define YY_STACK_PRINT (   Bottom,
  Top 
)
Value:
do { \
yy_stack_print ((Bottom), (Top)); \
} while (YYID (0))
if(0 > strat->sl)
Definition: myNF.cc:73
static void yy_stack_print(yytype_int16 *yybottom, yytype_int16 *yytop)
Definition: grammar.cc:1728
int yydebug
Definition: grammar.cc:1791
#define YYID(n)
Definition: grammar.cc:437

Definition at line 1745 of file grammar.cc.

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
Value:
do { \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (YYID (0))
#define YYFPRINTF
Definition: grammar.cc:1641
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: grammar.cc:1702
if(0 > strat->sl)
Definition: myNF.cc:73
int yydebug
Definition: grammar.cc:1791
#define YYID(n)
Definition: grammar.cc:437

Definition at line 1650 of file grammar.cc.

#define YYABORT   goto yyabortlab

Definition at line 1543 of file grammar.cc.

#define YYACCEPT   goto yyacceptlab

Definition at line 1542 of file grammar.cc.

#define YYBACKUP (   Token,
  Value 
)
Value:
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
goto yybackup; \
} \
{ \
yyerror (YY_("syntax error: cannot back up")); \
} \
while (YYID (0))
else
Definition: myNF.cc:189
if(0 > strat->sl)
Definition: myNF.cc:73
#define YYTRANSLATE(YYX)
Definition: grammar.cc:597
#define YYPOPSTACK(N)
#define YYEMPTY
Definition: grammar.cc:1539
while(1)
Definition: libparse.cc:1442
void yyerror(const char *fmt)
Definition: grammar.cc:188
#define YY_(msgid)
Definition: grammar.cc:424
YYSTYPE yylval
#define YYID(n)
Definition: grammar.cc:437
#define YYERROR
Definition: grammar.cc:1544

Definition at line 1564 of file grammar.cc.

#define YYBISON   1

Definition at line 45 of file grammar.cc.

#define YYBISON_VERSION   "2.4.3"

Definition at line 48 of file grammar.cc.

#define yyclearin   (yychar = YYEMPTY)

Definition at line 1538 of file grammar.cc.

#define YYDPRINTF (   Args)
Value:
do { \
YYFPRINTF Args; \
} while (YYID (0))
#define YYFPRINTF
Definition: grammar.cc:1641
if(0 > strat->sl)
Definition: myNF.cc:73
int yydebug
Definition: grammar.cc:1791
#define YYID(n)
Definition: grammar.cc:437

Definition at line 1644 of file grammar.cc.

#define YYEMPTY   (-2)

Definition at line 1539 of file grammar.cc.

#define YYEOF   0

Definition at line 1540 of file grammar.cc.

#define YYERRCODE   256

Definition at line 1583 of file grammar.cc.

#define yyerrok   (yyerrstatus = 0)

Definition at line 1537 of file grammar.cc.

#define YYERROR   goto yyerrorlab

Definition at line 1544 of file grammar.cc.

#define YYERROR_VERBOSE   0

Definition at line 253 of file grammar.cc.

#define YYFAIL   goto yyerrlab

Definition at line 1554 of file grammar.cc.

#define YYFINAL   2

Definition at line 580 of file grammar.cc.

#define YYFPRINTF   fprintf

Definition at line 1641 of file grammar.cc.

#define YYFREE   free

Definition at line 513 of file grammar.cc.

#define YYID (   n)    (n)

Definition at line 437 of file grammar.cc.

#define YYINITDEPTH   200

Definition at line 1802 of file grammar.cc.

#define YYLAST   2508

Definition at line 582 of file grammar.cc.

#define YYLEX   yylex (&yylval)

Definition at line 1633 of file grammar.cc.

#define YYLLOC_DEFAULT (   Current,
  Rhs,
  N 
)
Value:
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (YYID (0))
else
Definition: myNF.cc:189
if(0 > strat->sl)
Definition: myNF.cc:73
#define YYRHSLOC(Rhs, K)
Definition: grammar.cc:1590
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:49
while(1)
Definition: libparse.cc:1442
#define YYID(n)
Definition: grammar.cc:437

Definition at line 1592 of file grammar.cc.

#define YYLSP_NEEDED   0

Definition at line 63 of file grammar.cc.

#define YYMALLOC   malloc

Definition at line 506 of file grammar.cc.

#define YYMAXDEPTH   MAX_INT_VAL

Definition at line 167 of file grammar.cc.

#define YYMAXUTOK   340

Definition at line 595 of file grammar.cc.

#define YYNNTS   45

Definition at line 587 of file grammar.cc.

#define YYNRULES   174

Definition at line 589 of file grammar.cc.

#define YYNSTATES   396

Definition at line 591 of file grammar.cc.

#define YYNTOKENS   103

Definition at line 585 of file grammar.cc.

#define YYPACT_NINF   -365

Definition at line 921 of file grammar.cc.

#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))
#define YYPULL   1

Definition at line 60 of file grammar.cc.

#define YYPURE   1

Definition at line 54 of file grammar.cc.

#define YYPUSH   0

Definition at line 57 of file grammar.cc.

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 1562 of file grammar.cc.

#define YYRHSLOC (   Rhs,
 
)    ((Rhs)[K])

Definition at line 1590 of file grammar.cc.

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 414 of file grammar.cc.

#define YYSIZE_T   size_t

Definition at line 408 of file grammar.cc.

#define YYSKELETON_NAME   "yacc.c"

Definition at line 51 of file grammar.cc.

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 492 of file grammar.cc.

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 495 of file grammar.cc.

#define YYSTACK_FREE   YYFREE

Definition at line 493 of file grammar.cc.

#define YYTABLE_NINF   -155

Definition at line 980 of file grammar.cc.

#define YYTERROR   1

Definition at line 1582 of file grammar.cc.

#define YYTOKEN_TABLE   0

Definition at line 258 of file grammar.cc.

#define YYTOKENTYPE

Definition at line 264 of file grammar.cc.

#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 597 of file grammar.cc.

#define YYUNDEFTOK   2

Definition at line 594 of file grammar.cc.

#define YYUSE (   e)    ((void) (e))

Definition at line 430 of file grammar.cc.

Typedef Documentation

typedef short int yytype_int16

Definition at line 397 of file grammar.cc.

typedef signed char yytype_int8

Definition at line 383 of file grammar.cc.

typedef unsigned short int yytype_uint16

Definition at line 391 of file grammar.cc.

typedef unsigned char yytype_uint8

Definition at line 376 of file grammar.cc.

Enumeration Type Documentation

Enumerator
DOTDOT 
EQUAL_EQUAL 
GE 
LE 
MINUSMINUS 
NOT 
NOTEQUAL 
PLUSPLUS 
COLONCOLON 
ARROW 
GRING_CMD 
BIGINTMAT_CMD 
INTMAT_CMD 
PROC_CMD 
RING_CMD 
BEGIN_RING 
IDEAL_CMD 
MAP_CMD 
MATRIX_CMD 
MODUL_CMD 
NUMBER_CMD 
POLY_CMD 
RESOLUTION_CMD 
VECTOR_CMD 
BETTI_CMD 
E_CMD 
FETCH_CMD 
FREEMODULE_CMD 
KEEPRING_CMD 
IMAP_CMD 
KOSZUL_CMD 
MAXID_CMD 
MONOM_CMD 
PAR_CMD 
PREIMAGE_CMD 
VAR_CMD 
VALTVARS 
VMAXDEG 
VMAXMULT 
VNOETHER 
VMINPOLY 
END_RING 
CMD_1 
CMD_2 
CMD_3 
CMD_12 
CMD_13 
CMD_23 
CMD_123 
CMD_M 
ROOT_DECL 
ROOT_DECL_LIST 
RING_DECL 
RING_DECL_LIST 
EXAMPLE_CMD 
EXPORT_CMD 
HELP_CMD 
KILL_CMD 
LIB_CMD 
LISTVAR_CMD 
SETRING_CMD 
TYPE_CMD 
STRINGTOK 
BLOCKTOK 
INT_CONST 
UNKNOWN_IDENT 
RINGVAR 
PROC_DEF 
APPLY 
ASSUME_CMD 
BREAK_CMD 
CONTINUE_CMD 
ELSE_CMD 
EVAL 
QUOTE 
FOR_CMD 
IF_CMD 
SYS_BREAK 
WHILE_CMD 
RETURN 
PARAMETER 
SYSVAR 
UMINUS 
DOTDOT 
EQUAL_EQUAL 
GE 
LE 
MINUSMINUS 
NOT 
NOTEQUAL 
PLUSPLUS 
COLONCOLON 
ARROW 
GRING_CMD 
BIGINTMAT_CMD 
INTMAT_CMD 
PROC_CMD 
RING_CMD 
BEGIN_RING 
IDEAL_CMD 
MAP_CMD 
MATRIX_CMD 
MODUL_CMD 
NUMBER_CMD 
POLY_CMD 
RESOLUTION_CMD 
VECTOR_CMD 
BETTI_CMD 
E_CMD 
FETCH_CMD 
FREEMODULE_CMD 
KEEPRING_CMD 
IMAP_CMD 
KOSZUL_CMD 
MAXID_CMD 
MONOM_CMD 
PAR_CMD 
PREIMAGE_CMD 
VAR_CMD 
VALTVARS 
VMAXDEG 
VMAXMULT 
VNOETHER 
VMINPOLY 
END_RING 
CMD_1 
CMD_2 
CMD_3 
CMD_12 
CMD_13 
CMD_23 
CMD_123 
CMD_M 
ROOT_DECL 
ROOT_DECL_LIST 
RING_DECL 
RING_DECL_LIST 
EXAMPLE_CMD 
EXPORT_CMD 
HELP_CMD 
KILL_CMD 
LIB_CMD 
LISTVAR_CMD 
SETRING_CMD 
TYPE_CMD 
STRINGTOK 
BLOCKTOK 
INT_CONST 
UNKNOWN_IDENT 
RINGVAR 
PROC_DEF 
APPLY 
ASSUME_CMD 
BREAK_CMD 
CONTINUE_CMD 
ELSE_CMD 
EVAL 
QUOTE 
FOR_CMD 
IF_CMD 
SYS_BREAK 
WHILE_CMD 
RETURN 
PARAMETER 
SYSVAR 
UMINUS 

Definition at line 267 of file grammar.cc.

267  {
268  DOTDOT = 258,
269  EQUAL_EQUAL = 259,
270  GE = 260,
271  LE = 261,
272  MINUSMINUS = 262,
273  NOT = 263,
274  NOTEQUAL = 264,
275  PLUSPLUS = 265,
276  COLONCOLON = 266,
277  ARROW = 267,
278  GRING_CMD = 268,
279  BIGINTMAT_CMD = 269,
280  INTMAT_CMD = 270,
281  PROC_CMD = 271,
282  RING_CMD = 272,
283  BEGIN_RING = 273,
284  IDEAL_CMD = 274,
285  MAP_CMD = 275,
286  MATRIX_CMD = 276,
287  MODUL_CMD = 277,
288  NUMBER_CMD = 278,
289  POLY_CMD = 279,
290  RESOLUTION_CMD = 280,
291  VECTOR_CMD = 281,
292  BETTI_CMD = 282,
293  E_CMD = 283,
294  FETCH_CMD = 284,
295  FREEMODULE_CMD = 285,
296  KEEPRING_CMD = 286,
297  IMAP_CMD = 287,
298  KOSZUL_CMD = 288,
299  MAXID_CMD = 289,
300  MONOM_CMD = 290,
301  PAR_CMD = 291,
302  PREIMAGE_CMD = 292,
303  VAR_CMD = 293,
304  VALTVARS = 294,
305  VMAXDEG = 295,
306  VMAXMULT = 296,
307  VNOETHER = 297,
308  VMINPOLY = 298,
309  END_RING = 299,
310  CMD_1 = 300,
311  CMD_2 = 301,
312  CMD_3 = 302,
313  CMD_12 = 303,
314  CMD_13 = 304,
315  CMD_23 = 305,
316  CMD_123 = 306,
317  CMD_M = 307,
318  ROOT_DECL = 308,
319  ROOT_DECL_LIST = 309,
320  RING_DECL = 310,
321  RING_DECL_LIST = 311,
322  EXAMPLE_CMD = 312,
323  EXPORT_CMD = 313,
324  HELP_CMD = 314,
325  KILL_CMD = 315,
326  LIB_CMD = 316,
327  LISTVAR_CMD = 317,
328  SETRING_CMD = 318,
329  TYPE_CMD = 319,
330  STRINGTOK = 320,
331  BLOCKTOK = 321,
332  INT_CONST = 322,
333  UNKNOWN_IDENT = 323,
334  RINGVAR = 324,
335  PROC_DEF = 325,
336  APPLY = 326,
337  ASSUME_CMD = 327,
338  BREAK_CMD = 328,
339  CONTINUE_CMD = 329,
340  ELSE_CMD = 330,
341  EVAL = 331,
342  QUOTE = 332,
343  FOR_CMD = 333,
344  IF_CMD = 334,
345  SYS_BREAK = 335,
346  WHILE_CMD = 336,
347  RETURN = 337,
348  PARAMETER = 338,
349  SYSVAR = 339,
350  UMINUS = 340
351  };
Definition: grammar.cc:273
Definition: grammar.cc:341
Definition: grammar.cc:271
Definition: grammar.cc:270

Function Documentation

static void yy_reduce_print ( YYSTYPE yyvsp,
int  yyrule 
)
static

Definition at line 1759 of file grammar.cc.

1766 {
1767  int yynrhs = yyr2[yyrule];
1768  int yyi;
1769  unsigned long int yylno = yyrline[yyrule];
1770  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1771  yyrule - 1, yylno);
1772  /* The symbols being reduced. */
1773  for (yyi = 0; yyi < yynrhs; yyi++)
1774  {
1775  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1776  yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1777  &(yyvsp[(yyi + 1) - (yynrhs)])
1778  );
1779  YYFPRINTF (stderr, "\n");
1780  }
1781 }
#define YYFPRINTF
Definition: grammar.cc:1641
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: grammar.cc:1702
static const yytype_uint16 yyrline[]
Definition: grammar.cc:741
static const yytype_uint16 yyprhs[]
Definition: grammar.cc:643
static const yytype_uint8 yyr2[]
Definition: grammar.cc:840
static const yytype_int16 yyrhs[]
Definition: grammar.cc:666
static void yy_stack_print ( yytype_int16 yybottom,
yytype_int16 yytop 
)
static

Definition at line 1728 of file grammar.cc.

1735 {
1736  YYFPRINTF (stderr, "Stack now");
1737  for (; yybottom <= yytop; yybottom++)
1738  {
1739  int yybot = *yybottom;
1740  YYFPRINTF (stderr, " %d", yybot);
1741  }
1742  YYFPRINTF (stderr, "\n");
1743 }
#define YYFPRINTF
Definition: grammar.cc:1641
static void yy_symbol_print ( FILE *  yyoutput,
int  yytype,
YYSTYPE const *const  yyvaluep 
)
static

Definition at line 1702 of file grammar.cc.

1710 {
1711  if (yytype < YYNTOKENS)
1712  YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1713  else
1714  YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1715 
1716  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1717  YYFPRINTF (yyoutput, ")");
1718 }
#define YYFPRINTF
Definition: grammar.cc:1641
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: grammar.cc:1670
#define YYNTOKENS
Definition: grammar.cc:585
static const char *const yytname[]
Definition: grammar.cc:767
static void yy_symbol_value_print ( FILE *  yyoutput,
int  yytype,
YYSTYPE const *const  yyvaluep 
)
static

Definition at line 1670 of file grammar.cc.

1678 {
1679  if (!yyvaluep)
1680  return;
1681 # ifdef YYPRINT
1682  if (yytype < YYNTOKENS)
1683  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1684 # else
1685  YYUSE (yyoutput);
1686 # endif
1687  switch (yytype)
1688  {
1689  default:
1690  break;
1691  }
1692 }
#define YYUSE(e)
Definition: grammar.cc:430
#define YYNTOKENS
Definition: grammar.cc:585
static void yydestruct ( const char *  yymsg,
int  yytype,
YYSTYPE yyvaluep 
)
static

Definition at line 2037 of file grammar.cc.

2045 {
2046  YYUSE (yyvaluep);
2047 
2048  if (!yymsg)
2049  yymsg = "Deleting";
2050  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2051 
2052  switch (yytype)
2053  {
2054 
2055  default:
2056  break;
2057  }
2058 }
#define YYUSE(e)
Definition: grammar.cc:430
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: grammar.cc:1650
void yyerror ( const char *  fmt)

Definition at line 188 of file grammar.cc.

189 {
190 
191  BOOLEAN old_errorreported=errorreported;
193  if (currid!=NULL)
194  {
195  killid(currid,&IDROOT);
196  currid = NULL;
197  }
198  if(inerror==0)
199  {
200  {
201  if ((strlen(fmt)>1)
202  && (strncmp(fmt,"parse",5)!=0)
203  && (strncmp(fmt,"syntax",6)!=0))
204  WerrorS(fmt);
205  Werror( "error occurred in or before %s line %d: `%s`"
207  }
208  if (cmdtok!=0)
209  {
210  const char *s=Tok2Cmdname(cmdtok);
211  if (expected_parms)
212  {
213  Werror("expected %s-expression. type \'help %s;\'",s,s);
214  }
215  else
216  {
217  Werror("wrong type declaration. type \'help %s;\'",s);
218  }
219  }
220  if (!old_errorreported && (lastreserved!=NULL))
221  {
222  Werror("last reserved name was `%s`",lastreserved);
223  }
224  inerror=1;
225  }
226  if ((currentVoice!=NULL)
227  && (currentVoice->prev!=NULL)
228  && (myynest>0)
229 #ifdef HAVE_SDB
230  && ((sdb_flags &1)==0)
231 #endif
232  )
233  {
234  Werror("leaving %s",VoiceName());
235  }
236 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
int sdb_flags
Definition: sdb.cc:32
void killid(const char *id, idhdl *ih)
Definition: ipid.cc:345
#define IDROOT
Definition: ipid.h:20
#define TRUE
Definition: auxiliary.h:144
void WerrorS(const char *s)
Definition: feFopen.cc:24
int inerror
Definition: grammar.cc:176
const char * currid
Definition: grammar.cc:172
int myynest
Definition: febase.cc:46
char my_yylinebuf[80]
Definition: febase.cc:48
int cmdtok
Definition: grammar.cc:175
#define HAVE_SDB
Definition: sdb.h:10
const char * VoiceName()
Definition: fevoices.cc:66
short errorreported
Definition: feFopen.cc:23
Voice * prev
Definition: fevoices.h:61
#define NULL
Definition: omList.c:10
const char * Tok2Cmdname(int tok)
Definition: gentable.cc:128
int yylineno
Definition: febase.cc:45
Voice * currentVoice
Definition: fevoices.cc:57
int BOOLEAN
Definition: auxiliary.h:131
void Werror(const char *fmt,...)
Definition: reporter.cc:199
BOOLEAN expected_parms
Definition: grammar.cc:174
const char * lastreserved
Definition: ipshell.cc:81
int yyparse ( void  )

Definition at line 2097 of file grammar.cc.

2104 {
2105 /* The lookahead symbol. */
2106 int yychar;
2107 
2108 /* The semantic value of the lookahead symbol. */
2109 YYSTYPE yylval;
2110 
2111  /* Number of syntax errors so far. */
2112  int yynerrs;
2113 
2114  int yystate;
2115  /* Number of tokens to shift before error messages enabled. */
2116  int yyerrstatus;
2117 
2118  /* The stacks and their tools:
2119  `yyss': related to states.
2120  `yyvs': related to semantic values.
2121 
2122  Refer to the stacks thru separate pointers, to allow yyoverflow
2123  to reallocate them elsewhere. */
2124 
2125  /* The state stack. */
2126  yytype_int16 yyssa[YYINITDEPTH];
2127  yytype_int16 *yyss;
2128  yytype_int16 *yyssp;
2129 
2130  /* The semantic value stack. */
2131  YYSTYPE yyvsa[YYINITDEPTH];
2132  YYSTYPE *yyvs;
2133  YYSTYPE *yyvsp;
2134 
2135  YYSIZE_T yystacksize;
2136 
2137  int yyn;
2138  int yyresult;
2139  /* Lookahead token as an internal (translated) token number. */
2140  int yytoken;
2141  /* The variables used to return semantic value and location from the
2142  action routines. */
2143  YYSTYPE yyval;
2144 
2145 #if YYERROR_VERBOSE
2146  /* Buffer for error messages, and its allocated size. */
2147  char yymsgbuf[128];
2148  char *yymsg = yymsgbuf;
2149  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2150 #endif
2151 
2152 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
2153 
2154  /* The number of symbols on the RHS of the reduced rule.
2155  Keep to zero when no symbol should be popped. */
2156  int yylen = 0;
2157 
2158  yytoken = 0;
2159  yyss = yyssa;
2160  yyvs = yyvsa;
2161  yystacksize = YYINITDEPTH;
2162 
2163  YYDPRINTF ((stderr, "Starting parse\n"));
2164 
2165  yystate = 0;
2166  yyerrstatus = 0;
2167  yynerrs = 0;
2168  yychar = YYEMPTY; /* Cause a token to be read. */
2169 
2170  /* Initialize stack pointers.
2171  Waste one element of value and location stack
2172  so that they stay on the same level as the state stack.
2173  The wasted elements are never initialized. */
2174  yyssp = yyss;
2175  yyvsp = yyvs;
2176 
2177  goto yysetstate;
2178 
2179 /*------------------------------------------------------------.
2180 | yynewstate -- Push a new state, which is found in yystate. |
2181 `------------------------------------------------------------*/
2182  yynewstate:
2183  /* In all cases, when you get here, the value and location stacks
2184  have just been pushed. So pushing a state here evens the stacks. */
2185  yyssp++;
2186 
2187  yysetstate:
2188  *yyssp = yystate;
2189 
2190  if (yyss + yystacksize - 1 <= yyssp)
2191  {
2192  /* Get the current used size of the three stacks, in elements. */
2193  YYSIZE_T yysize = yyssp - yyss + 1;
2194 
2195 #ifdef yyoverflow
2196  {
2197  /* Give user a chance to reallocate the stack. Use copies of
2198  these so that the &'s don't force the real ones into
2199  memory. */
2200  YYSTYPE *yyvs1 = yyvs;
2201  yytype_int16 *yyss1 = yyss;
2202 
2203  /* Each stack pointer address is followed by the size of the
2204  data in use in that stack, in bytes. This used to be a
2205  conditional around just the two extra args, but that might
2206  be undefined if yyoverflow is a macro. */
2207  yyoverflow (YY_("memory exhausted"),
2208  &yyss1, yysize * sizeof (*yyssp),
2209  &yyvs1, yysize * sizeof (*yyvsp),
2210  &yystacksize);
2211 
2212  yyss = yyss1;
2213  yyvs = yyvs1;
2214  }
2215 #else /* no yyoverflow */
2216 # ifndef YYSTACK_RELOCATE
2217  goto yyexhaustedlab;
2218 # else
2219  /* Extend the stack our own way. */
2220  if (YYMAXDEPTH <= yystacksize)
2221  goto yyexhaustedlab;
2222  yystacksize *= 2;
2223  if (YYMAXDEPTH < yystacksize)
2224  yystacksize = YYMAXDEPTH;
2225 
2226  {
2227  yytype_int16 *yyss1 = yyss;
2228  union yyalloc *yyptr =
2229  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2230  if (! yyptr)
2231  goto yyexhaustedlab;
2232  YYSTACK_RELOCATE (yyss_alloc, yyss);
2233  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2234 # undef YYSTACK_RELOCATE
2235  if (yyss1 != yyssa)
2236  YYSTACK_FREE (yyss1);
2237  }
2238 # endif
2239 #endif /* no yyoverflow */
2240 
2241  yyssp = yyss + yysize - 1;
2242  yyvsp = yyvs + yysize - 1;
2243 
2244  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2245  (unsigned long int) yystacksize));
2246 
2247  if (yyss + yystacksize - 1 <= yyssp)
2248  YYABORT;
2249  }
2250 
2251  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2252 
2253  if (yystate == YYFINAL)
2254  YYACCEPT;
2255 
2256  goto yybackup;
2257 
2258 /*-----------.
2259 | yybackup. |
2260 `-----------*/
2261 yybackup:
2262 
2263  /* Do appropriate processing given the current state. Read a
2264  lookahead token if we need one and don't already have one. */
2265 
2266  /* First try to decide what to do without reference to lookahead token. */
2267  yyn = yypact[yystate];
2268  if (yyn == YYPACT_NINF)
2269  goto yydefault;
2270 
2271  /* Not known => get a lookahead token if don't already have one. */
2272 
2273  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2274  if (yychar == YYEMPTY)
2275  {
2276  YYDPRINTF ((stderr, "Reading a token: "));
2277  yychar = YYLEX;
2278  }
2279 
2280  if (yychar <= YYEOF)
2281  {
2282  yychar = yytoken = YYEOF;
2283  YYDPRINTF ((stderr, "Now at end of input.\n"));
2284  }
2285  else
2286  {
2287  yytoken = YYTRANSLATE (yychar);
2288  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2289  }
2290 
2291  /* If the proper action on seeing token YYTOKEN is to reduce or to
2292  detect an error, take that action. */
2293  yyn += yytoken;
2294  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2295  goto yydefault;
2296  yyn = yytable[yyn];
2297  if (yyn <= 0)
2298  {
2299  if (yyn == 0 || yyn == YYTABLE_NINF)
2300  goto yyerrlab;
2301  yyn = -yyn;
2302  goto yyreduce;
2303  }
2304 
2305  /* Count tokens shifted since error; after three, turn off error
2306  status. */
2307  if (yyerrstatus)
2308  yyerrstatus--;
2309 
2310  /* Shift the lookahead token. */
2311  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2312 
2313  /* Discard the shifted token. */
2314  yychar = YYEMPTY;
2315 
2316  yystate = yyn;
2317  *++yyvsp = yylval;
2318 
2319  goto yynewstate;
2320 
2321 
2322 /*-----------------------------------------------------------.
2323 | yydefault -- do the default action for the current state. |
2324 `-----------------------------------------------------------*/
2325 yydefault:
2326  yyn = yydefact[yystate];
2327  if (yyn == 0)
2328  goto yyerrlab;
2329  goto yyreduce;
2330 
2331 
2332 /*-----------------------------.
2333 | yyreduce -- Do a reduction. |
2334 `-----------------------------*/
2335 yyreduce:
2336  /* yyn is the number of a rule to reduce with. */
2337  yylen = yyr2[yyn];
2338 
2339  /* If YYLEN is nonzero, implement the default value of the action:
2340  `$$ = $1'.
2341 
2342  Otherwise, the following line sets YYVAL to garbage.
2343  This behavior is undocumented and Bison
2344  users should not rely upon it. Assigning to YYVAL
2345  unconditionally makes the parser a bit smaller, and it avoids a
2346  GCC warning that YYVAL may be used uninitialized. */
2347  yyval = yyvsp[1-yylen];
2348 
2349 
2350  YY_REDUCE_PRINT (yyn);
2351  switch (yyn)
2352  {
2353  case 3:
2354 
2355 /* Line 1464 of yacc.c */
2356 #line 319 "grammar.y"
2357  {
2358  if (timerv)
2359  {
2360  writeTime("used time:");
2361  startTimer();
2362  }
2363  if (rtimerv)
2364  {
2365  writeRTime("used real time:");
2366  startRTimer();
2367  }
2368  prompt_char = '>';
2369 #ifdef HAVE_SDB
2370  if (sdb_flags & 2) { sdb_flags=1; YYERROR; }
2371 #endif
2372  if(siCntrlc)
2373  {
2374  WerrorS("abort...");
2375  while((currentVoice!=NULL) && (currentVoice->prev!=NULL)) exitVoice();
2377  }
2378  if (errorreported) /* also catches abort... */
2379  {
2380  yyerror("");
2381  }
2382  if (inerror==2) PrintLn();
2383  errorreported = inerror = cmdtok = 0;
2384  lastreserved = currid = NULL;
2386  ;}
2387  break;
2388 
2389  case 5:
2390 
2391 /* Line 1464 of yacc.c */
2392 #line 354 "grammar.y"
2393  {currentVoice->ifsw=0;;}
2394  break;
2395 
2396  case 6:
2397 
2398 /* Line 1464 of yacc.c */
2399 #line 356 "grammar.y"
2400  { (yyvsp[(1) - (2)].lv).CleanUp(); currentVoice->ifsw=0;;}
2401  break;
2402 
2403  case 7:
2404 
2405 /* Line 1464 of yacc.c */
2406 #line 358 "grammar.y"
2407  {
2408  YYACCEPT;
2409  ;}
2410  break;
2411 
2412  case 8:
2413 
2414 /* Line 1464 of yacc.c */
2415 #line 362 "grammar.y"
2416  {
2417  currentVoice->ifsw=0;
2418  iiDebug();
2419  ;}
2420  break;
2421 
2422  case 9:
2423 
2424 /* Line 1464 of yacc.c */
2425 #line 367 "grammar.y"
2426  {currentVoice->ifsw=0;;}
2427  break;
2428 
2429  case 10:
2430 
2431 /* Line 1464 of yacc.c */
2432 #line 369 "grammar.y"
2433  {
2434  #ifdef SIQ
2435  siq=0;
2436  #endif
2438  currentVoice->ifsw=0;
2439  if (inerror)
2440  {
2441 /* bison failed here*/
2442  if ((inerror!=3) && ((yyvsp[(1) - (2)].i)<UMINUS) && ((yyvsp[(1) - (2)].i)>' '))
2443  {
2444  // 1: yyerror called
2445  // 2: scanner put actual string
2446  // 3: error rule put token+\n
2447  inerror=3;
2448  Print(" error at token `%s`\n",iiTwoOps((yyvsp[(1) - (2)].i)));
2449  }
2450 /**/
2451 
2452  }
2453  if (!errorreported) WerrorS("...parse error");
2454  yyerror("");
2455  yyerrok;
2456 #ifdef HAVE_SDB
2457  if ((sdb_flags & 1) && currentVoice->pi!=NULL)
2458  {
2459  currentVoice->pi->trace_flag |=1;
2460  }
2461  else
2462 #endif
2463  if (myynest>0)
2464  {
2466  //PrintS("leaving yyparse\n");
2468  if (t==BT_example)
2469  YYACCEPT;
2470  else
2471  YYABORT;
2472  }
2473  else if (currentVoice->prev!=NULL)
2474  {
2475  exitVoice();
2476  }
2477 #ifdef HAVE_SDB
2478  if (sdb_flags &2) sdb_flags=1;
2479 #endif
2480  ;}
2481  break;
2482 
2483  case 18:
2484 
2485 /* Line 1464 of yacc.c */
2486 #line 427 "grammar.y"
2487  {if (currentVoice!=NULL) currentVoice->ifsw=0;;}
2488  break;
2489 
2490  case 19:
2491 
2492 /* Line 1464 of yacc.c */
2493 #line 430 "grammar.y"
2494  { omFree((ADDRESS)(yyvsp[(2) - (2)].name)); ;}
2495  break;
2496 
2497  case 29:
2498 
2499 /* Line 1464 of yacc.c */
2500 #line 445 "grammar.y"
2501  {
2502  if(iiAssign(&(yyvsp[(1) - (2)].lv),&(yyvsp[(2) - (2)].lv))) YYERROR;
2503  ;}
2504  break;
2505 
2506  case 30:
2507 
2508 /* Line 1464 of yacc.c */
2509 #line 452 "grammar.y"
2510  {
2511  if (currRing==NULL) MYYERROR("no ring active");
2512  syMake(&(yyval.lv),omStrDup((yyvsp[(1) - (1)].name)));
2513  ;}
2514  break;
2515 
2516  case 31:
2517 
2518 /* Line 1464 of yacc.c */
2519 #line 457 "grammar.y"
2520  {
2521  syMake(&(yyval.lv),(yyvsp[(1) - (1)].name));
2522  ;}
2523  break;
2524 
2525  case 32:
2526 
2527 /* Line 1464 of yacc.c */
2528 #line 461 "grammar.y"
2529  {
2530  if(iiExprArith2(&(yyval.lv), &(yyvsp[(1) - (3)].lv), COLONCOLON, &(yyvsp[(3) - (3)].lv))) YYERROR;
2531  ;}
2532  break;
2533 
2534  case 33:
2535 
2536 /* Line 1464 of yacc.c */
2537 #line 465 "grammar.y"
2538  {
2539  if(iiExprArith2(&(yyval.lv), &(yyvsp[(1) - (3)].lv), '.', &(yyvsp[(3) - (3)].lv))) YYERROR;
2540  ;}
2541  break;
2542 
2543  case 34:
2544 
2545 /* Line 1464 of yacc.c */
2546 #line 469 "grammar.y"
2547  {
2548  if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'(')) YYERROR;
2549  ;}
2550  break;
2551 
2552  case 35:
2553 
2554 /* Line 1464 of yacc.c */
2555 #line 473 "grammar.y"
2556  {
2557  if ((yyvsp[(1) - (4)].lv).rtyp==UNKNOWN)
2558  { // for x(i)(j)
2559  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'(',&(yyvsp[(3) - (4)].lv))) YYERROR;
2560  }
2561  else
2562  {
2563  (yyvsp[(1) - (4)].lv).next=(leftv)omAllocBin(sleftv_bin);
2564  memcpy((yyvsp[(1) - (4)].lv).next,&(yyvsp[(3) - (4)].lv),sizeof(sleftv));
2565  if(iiExprArithM(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'(')) YYERROR;
2566  }
2567  ;}
2568  break;
2569 
2570  case 36:
2571 
2572 /* Line 1464 of yacc.c */
2573 #line 486 "grammar.y"
2574  {
2575  if (currRingHdl==NULL) MYYERROR("no ring active");
2576  int j = 0;
2577  memset(&(yyval.lv),0,sizeof(sleftv));
2578  (yyval.lv).rtyp=VECTOR_CMD;
2579  leftv v = &(yyvsp[(2) - (3)].lv);
2580  while (v!=NULL)
2581  {
2582  int i,t;
2583  sleftv tmp;
2584  memset(&tmp,0,sizeof(tmp));
2585  i=iiTestConvert((t=v->Typ()),POLY_CMD);
2586  if((i==0) || (iiConvert(t /*v->Typ()*/,POLY_CMD,i,v,&tmp)))
2587  {
2588  pDelete((poly *)&(yyval.lv).data);
2589  (yyvsp[(2) - (3)].lv).CleanUp();
2590  MYYERROR("expected '[poly,...'");
2591  }
2592  poly p = (poly)tmp.CopyD(POLY_CMD);
2593  pSetCompP(p,++j);
2594  (yyval.lv).data = (void *)pAdd((poly)(yyval.lv).data,p);
2595  v->next=tmp.next;tmp.next=NULL;
2596  tmp.CleanUp();
2597  v=v->next;
2598  }
2599  (yyvsp[(2) - (3)].lv).CleanUp();
2600  ;}
2601  break;
2602 
2603  case 37:
2604 
2605 /* Line 1464 of yacc.c */
2606 #line 514 "grammar.y"
2607  {
2608  memset(&(yyval.lv),0,sizeof((yyval.lv)));
2609  int i = atoi((yyvsp[(1) - (1)].name));
2610  /*remember not to omFree($1)
2611  *because it is a part of the scanner buffer*/
2612  (yyval.lv).rtyp = INT_CMD;
2613  (yyval.lv).data = (void *)(long)i;
2614 
2615  /* check: out of range input */
2616  int l = strlen((yyvsp[(1) - (1)].name))+2;
2617  number n;
2618  if (l >= MAX_INT_LEN)
2619  {
2620  char tmp[MAX_INT_LEN+5];
2621  sprintf(tmp,"%d",i);
2622  if (strcmp(tmp,(yyvsp[(1) - (1)].name))!=0)
2623  {
2624  n_Read((yyvsp[(1) - (1)].name),&n,coeffs_BIGINT);
2625  (yyval.lv).rtyp=BIGINT_CMD;
2626  (yyval.lv).data = n;
2627  }
2628  }
2629  ;}
2630  break;
2631 
2632  case 38:
2633 
2634 /* Line 1464 of yacc.c */
2635 #line 538 "grammar.y"
2636  {
2637  memset(&(yyval.lv),0,sizeof((yyval.lv)));
2638  (yyval.lv).rtyp = (yyvsp[(1) - (1)].i);
2639  (yyval.lv).data = (yyval.lv).Data();
2640  ;}
2641  break;
2642 
2643  case 39:
2644 
2645 /* Line 1464 of yacc.c */
2646 #line 544 "grammar.y"
2647  {
2648  memset(&(yyval.lv),0,sizeof((yyval.lv)));
2649  (yyval.lv).rtyp = STRING_CMD;
2650  (yyval.lv).data = (yyvsp[(1) - (1)].name);
2651  ;}
2652  break;
2653 
2654  case 40:
2655 
2656 /* Line 1464 of yacc.c */
2657 #line 550 "grammar.y"
2658  {
2659  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2660  ;}
2661  break;
2662 
2663  case 41:
2664 
2665 /* Line 1464 of yacc.c */
2666 #line 554 "grammar.y"
2667  {
2668  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2669  ;}
2670  break;
2671 
2672  case 42:
2673 
2674 /* Line 1464 of yacc.c */
2675 #line 558 "grammar.y"
2676  {
2677  if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2678  ;}
2679  break;
2680 
2681  case 43:
2682 
2683 /* Line 1464 of yacc.c */
2684 #line 562 "grammar.y"
2685  {
2686  if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR;
2687  ;}
2688  break;
2689 
2690  case 44:
2691 
2692 /* Line 1464 of yacc.c */
2693 #line 566 "grammar.y"
2694  {
2695  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2696  ;}
2697  break;
2698 
2699  case 45:
2700 
2701 /* Line 1464 of yacc.c */
2702 #line 570 "grammar.y"
2703  {
2704  if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2705  ;}
2706  break;
2707 
2708  case 46:
2709 
2710 /* Line 1464 of yacc.c */
2711 #line 574 "grammar.y"
2712  {
2713  if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR;
2714  ;}
2715  break;
2716 
2717  case 47:
2718 
2719 /* Line 1464 of yacc.c */
2720 #line 578 "grammar.y"
2721  {
2722  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2723  ;}
2724  break;
2725 
2726  case 48:
2727 
2728 /* Line 1464 of yacc.c */
2729 #line 582 "grammar.y"
2730  {
2731  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2732  ;}
2733  break;
2734 
2735  case 49:
2736 
2737 /* Line 1464 of yacc.c */
2738 #line 586 "grammar.y"
2739  {
2740  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2741  ;}
2742  break;
2743 
2744  case 50:
2745 
2746 /* Line 1464 of yacc.c */
2747 #line 590 "grammar.y"
2748  {
2749  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2750  ;}
2751  break;
2752 
2753  case 51:
2754 
2755 /* Line 1464 of yacc.c */
2756 #line 594 "grammar.y"
2757  {
2758  if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
2759  ;}
2760  break;
2761 
2762  case 52:
2763 
2764 /* Line 1464 of yacc.c */
2765 #line 598 "grammar.y"
2766  {
2767  if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
2768  ;}
2769  break;
2770 
2771  case 53:
2772 
2773 /* Line 1464 of yacc.c */
2774 #line 602 "grammar.y"
2775  {
2776  if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
2777  ;}
2778  break;
2779 
2780  case 54:
2781 
2782 /* Line 1464 of yacc.c */
2783 #line 606 "grammar.y"
2784  {
2785  if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
2786  ;}
2787  break;
2788 
2789  case 55:
2790 
2791 /* Line 1464 of yacc.c */
2792 #line 610 "grammar.y"
2793  {
2794  if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2795  ;}
2796  break;
2797 
2798  case 56:
2799 
2800 /* Line 1464 of yacc.c */
2801 #line 614 "grammar.y"
2802  {
2803  if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2804  ;}
2805  break;
2806 
2807  case 57:
2808 
2809 /* Line 1464 of yacc.c */
2810 #line 618 "grammar.y"
2811  {
2812  if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2813  ;}
2814  break;
2815 
2816  case 58:
2817 
2818 /* Line 1464 of yacc.c */
2819 #line 622 "grammar.y"
2820  {
2821  if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2822  ;}
2823  break;
2824 
2825  case 59:
2826 
2827 /* Line 1464 of yacc.c */
2828 #line 626 "grammar.y"
2829  {
2830  if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR;
2831  ;}
2832  break;
2833 
2834  case 60:
2835 
2836 /* Line 1464 of yacc.c */
2837 #line 630 "grammar.y"
2838  {
2839  int b=iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i)); // handle branchTo
2840  if (b==TRUE) YYERROR;
2841  if (b==2) YYACCEPT;
2842  ;}
2843  break;
2844 
2845  case 61:
2846 
2847 /* Line 1464 of yacc.c */
2848 #line 636 "grammar.y"
2849  {
2850  if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2851  ;}
2852  break;
2853 
2854  case 62:
2855 
2856 /* Line 1464 of yacc.c */
2857 #line 640 "grammar.y"
2858  {
2859  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2860  ;}
2861  break;
2862 
2863  case 63:
2864 
2865 /* Line 1464 of yacc.c */
2866 #line 644 "grammar.y"
2867  {
2868  if(iiExprArith3(&(yyval.lv),RING_CMD,&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2869  ;}
2870  break;
2871 
2872  case 64:
2873 
2874 /* Line 1464 of yacc.c */
2875 #line 648 "grammar.y"
2876  {
2877  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),RING_CMD)) YYERROR;
2878  ;}
2879  break;
2880 
2881  case 65:
2882 
2883 /* Line 1464 of yacc.c */
2884 #line 652 "grammar.y"
2885  {
2886  if (iiARROW(&(yyval.lv),(yyvsp[(1) - (3)].name),(yyvsp[(3) - (3)].name))) YYERROR;
2887  ;}
2888  break;
2889 
2890  case 66:
2891 
2892 /* Line 1464 of yacc.c */
2893 #line 659 "grammar.y"
2894  {
2895  leftv v = &(yyvsp[(1) - (3)].lv);
2896  while (v->next!=NULL)
2897  {
2898  v=v->next;
2899  }
2901  memcpy(v->next,&((yyvsp[(3) - (3)].lv)),sizeof(sleftv));
2902  (yyval.lv) = (yyvsp[(1) - (3)].lv);
2903  ;}
2904  break;
2905 
2906  case 67:
2907 
2908 /* Line 1464 of yacc.c */
2909 #line 670 "grammar.y"
2910  {
2911  (yyval.lv) = (yyvsp[(1) - (1)].lv);
2912  ;}
2913  break;
2914 
2915  case 68:
2916 
2917 /* Line 1464 of yacc.c */
2918 #line 676 "grammar.y"
2919  {
2920  /*if ($1.typ == eunknown) YYERROR;*/
2921  (yyval.lv) = (yyvsp[(1) - (1)].lv);
2922  ;}
2923  break;
2924 
2925  case 69:
2926 
2927 /* Line 1464 of yacc.c */
2928 #line 680 "grammar.y"
2929  { (yyval.lv) = (yyvsp[(1) - (1)].lv); ;}
2930  break;
2931 
2932  case 70:
2933 
2934 /* Line 1464 of yacc.c */
2935 #line 681 "grammar.y"
2936  { (yyval.lv) = (yyvsp[(2) - (3)].lv); ;}
2937  break;
2938 
2939  case 71:
2940 
2941 /* Line 1464 of yacc.c */
2942 #line 683 "grammar.y"
2943  {
2944  if(iiExprArith3(&(yyval.lv),'[',&(yyvsp[(1) - (6)].lv),&(yyvsp[(3) - (6)].lv),&(yyvsp[(5) - (6)].lv))) YYERROR;
2945  ;}
2946  break;
2947 
2948  case 72:
2949 
2950 /* Line 1464 of yacc.c */
2951 #line 687 "grammar.y"
2952  {
2953  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'[',&(yyvsp[(3) - (4)].lv))) YYERROR;
2954  ;}
2955  break;
2956 
2957  case 73:
2958 
2959 /* Line 1464 of yacc.c */
2960 #line 691 "grammar.y"
2961  {
2962  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
2963  ;}
2964  break;
2965 
2966  case 74:
2967 
2968 /* Line 1464 of yacc.c */
2969 #line 695 "grammar.y"
2970  {
2971  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
2972  ;}
2973  break;
2974 
2975  case 75:
2976 
2977 /* Line 1464 of yacc.c */
2978 #line 699 "grammar.y"
2979  {
2980  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
2981  ;}
2982  break;
2983 
2984  case 76:
2985 
2986 /* Line 1464 of yacc.c */
2987 #line 703 "grammar.y"
2988  {
2989  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
2990  ;}
2991  break;
2992 
2993  case 77:
2994 
2995 /* Line 1464 of yacc.c */
2996 #line 707 "grammar.y"
2997  {
2998  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
2999  ;}
3000  break;
3001 
3002  case 78:
3003 
3004 /* Line 1464 of yacc.c */
3005 #line 711 "grammar.y"
3006  {
3007  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), 0, &(yyvsp[(5) - (6)].lv))) YYERROR;
3008  ;}
3009  break;
3010 
3011  case 79:
3012 
3013 /* Line 1464 of yacc.c */
3014 #line 715 "grammar.y"
3015  {
3016  (yyval.lv)=(yyvsp[(2) - (3)].lv);
3017  ;}
3018  break;
3019 
3020  case 80:
3021 
3022 /* Line 1464 of yacc.c */
3023 #line 719 "grammar.y"
3024  {
3025  #ifdef SIQ
3026  siq++;
3027  if (siq>0)
3028  { if (iiExprArith2(&(yyval.lv),&(yyvsp[(2) - (5)].lv),'=',&(yyvsp[(4) - (5)].lv))) YYERROR; }
3029  else
3030  #endif
3031  {
3032  memset(&(yyval.lv),0,sizeof((yyval.lv)));
3033  (yyval.lv).rtyp=NONE;
3034  if (iiAssign(&(yyvsp[(2) - (5)].lv),&(yyvsp[(4) - (5)].lv))) YYERROR;
3035  }
3036  #ifdef SIQ
3037  siq--;
3038  #endif
3039  ;}
3040  break;
3041 
3042  case 81:
3043 
3044 /* Line 1464 of yacc.c */
3045 #line 736 "grammar.y"
3046  {
3047  iiTestAssume(&(yyvsp[(2) - (5)].lv),&(yyvsp[(4) - (5)].lv));
3048  memset(&(yyval.lv),0,sizeof((yyval.lv)));
3049  (yyval.lv).rtyp=NONE;
3050  ;}
3051  break;
3052 
3053  case 82:
3054 
3055 /* Line 1464 of yacc.c */
3056 #line 742 "grammar.y"
3057  {
3058  #ifdef SIQ
3059  siq--;
3060  #endif
3061  ;}
3062  break;
3063 
3064  case 83:
3065 
3066 /* Line 1464 of yacc.c */
3067 #line 748 "grammar.y"
3068  {
3069  #ifdef SIQ
3070  if (siq<=0) (yyvsp[(4) - (5)].lv).Eval();
3071  #endif
3072  (yyval.lv)=(yyvsp[(4) - (5)].lv);
3073  #ifdef SIQ
3074  siq++;
3075  #endif
3076  ;}
3077  break;
3078 
3079  case 84:
3080 
3081 /* Line 1464 of yacc.c */
3082 #line 760 "grammar.y"
3083  {
3084  #ifdef SIQ
3085  siq++;
3086  #endif
3087  ;}
3088  break;
3089 
3090  case 85:
3091 
3092 /* Line 1464 of yacc.c */
3093 #line 768 "grammar.y"
3094  {
3095  #ifdef SIQ
3096  siq++;
3097  #endif
3098  ;}
3099  break;
3100 
3101  case 86:
3102 
3103 /* Line 1464 of yacc.c */
3104 #line 776 "grammar.y"
3105  {
3106  #ifdef SIQ
3107  siq--;
3108  #endif
3109  ;}
3110  break;
3111 
3112  case 87:
3113 
3114 /* Line 1464 of yacc.c */
3115 #line 785 "grammar.y"
3116  {
3117  if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (2)].lv),PLUSPLUS)) YYERROR;
3118  ;}
3119  break;
3120 
3121  case 88:
3122 
3123 /* Line 1464 of yacc.c */
3124 #line 789 "grammar.y"
3125  {
3126  if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (2)].lv),MINUSMINUS)) YYERROR;
3127  ;}
3128  break;
3129 
3130  case 89:
3131 
3132 /* Line 1464 of yacc.c */
3133 #line 793 "grammar.y"
3134  {
3135  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'+',&(yyvsp[(3) - (3)].lv))) YYERROR;
3136  ;}
3137  break;
3138 
3139  case 90:
3140 
3141 /* Line 1464 of yacc.c */
3142 #line 797 "grammar.y"
3143  {
3144  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'-',&(yyvsp[(3) - (3)].lv))) YYERROR;
3145  ;}
3146  break;
3147 
3148  case 91:
3149 
3150 /* Line 1464 of yacc.c */
3151 #line 801 "grammar.y"
3152  {
3153  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR;
3154  ;}
3155  break;
3156 
3157  case 92:
3158 
3159 /* Line 1464 of yacc.c */
3160 #line 805 "grammar.y"
3161  {
3162  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'^',&(yyvsp[(3) - (3)].lv))) YYERROR;
3163  ;}
3164  break;
3165 
3166  case 93:
3167 
3168 /* Line 1464 of yacc.c */
3169 #line 809 "grammar.y"
3170  {
3171  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR;
3172  ;}
3173  break;
3174 
3175  case 94:
3176 
3177 /* Line 1464 of yacc.c */
3178 #line 813 "grammar.y"
3179  {
3180  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR;
3181  ;}
3182  break;
3183 
3184  case 95:
3185 
3186 /* Line 1464 of yacc.c */
3187 #line 817 "grammar.y"
3188  {
3189  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),NOTEQUAL,&(yyvsp[(3) - (3)].lv))) YYERROR;
3190  ;}
3191  break;
3192 
3193  case 96:
3194 
3195 /* Line 1464 of yacc.c */
3196 #line 821 "grammar.y"
3197  {
3198  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),EQUAL_EQUAL,&(yyvsp[(3) - (3)].lv))) YYERROR;
3199  ;}
3200  break;
3201 
3202  case 97:
3203 
3204 /* Line 1464 of yacc.c */
3205 #line 825 "grammar.y"
3206  {
3207  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),DOTDOT,&(yyvsp[(3) - (3)].lv))) YYERROR;
3208  ;}
3209  break;
3210 
3211  case 98:
3212 
3213 /* Line 1464 of yacc.c */
3214 #line 829 "grammar.y"
3215  {
3216  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),':',&(yyvsp[(3) - (3)].lv))) YYERROR;
3217  ;}
3218  break;
3219 
3220  case 99:
3221 
3222 /* Line 1464 of yacc.c */
3223 #line 833 "grammar.y"
3224  {
3225  if (siq>0)
3226  { if (iiExprArith1(&(yyval.lv),&(yyvsp[(2) - (2)].lv),NOT)) YYERROR; }
3227  else
3228  {
3229  memset(&(yyval.lv),0,sizeof((yyval.lv)));
3230  int i; TESTSETINT((yyvsp[(2) - (2)].lv),i);
3231  (yyval.lv).rtyp = INT_CMD;
3232  (yyval.lv).data = (void *)(long)(i == 0 ? 1 : 0);
3233  }
3234  ;}
3235  break;
3236 
3237  case 100:
3238 
3239 /* Line 1464 of yacc.c */
3240 #line 845 "grammar.y"
3241  {
3242  if(iiExprArith1(&(yyval.lv),&(yyvsp[(2) - (2)].lv),'-')) YYERROR;
3243  ;}
3244  break;
3245 
3246  case 101:
3247 
3248 /* Line 1464 of yacc.c */
3249 #line 851 "grammar.y"
3250  { (yyval.lv) = (yyvsp[(1) - (2)].lv); ;}
3251  break;
3252 
3253  case 102:
3254 
3255 /* Line 1464 of yacc.c */
3256 #line 853 "grammar.y"
3257  {
3258  if ((yyvsp[(1) - (2)].lv).rtyp==0)
3259  {
3260  Werror("`%s` is undefined",(yyvsp[(1) - (2)].lv).Fullname());
3261  YYERROR;
3262  }
3263  else if (((yyvsp[(1) - (2)].lv).rtyp==MODUL_CMD)
3264  // matrix m; m[2]=...
3265  && ((yyvsp[(1) - (2)].lv).e!=NULL) && ((yyvsp[(1) - (2)].lv).e->next==NULL))
3266  {
3267  MYYERROR("matrix must have 2 indices");
3268  }
3269  (yyval.lv) = (yyvsp[(1) - (2)].lv);
3270  ;}
3271  break;
3272 
3273  case 104:
3274 
3275 /* Line 1464 of yacc.c */
3276 #line 873 "grammar.y"
3277  {
3278  if ((yyvsp[(2) - (3)].lv).Typ()!=STRING_CMD)
3279  {
3280  MYYERROR("string expression expected");
3281  }
3282  (yyval.name) = (char *)(yyvsp[(2) - (3)].lv).CopyD(STRING_CMD);
3283  (yyvsp[(2) - (3)].lv).CleanUp();
3284  ;}
3285  break;
3286 
3287  case 105:
3288 
3289 /* Line 1464 of yacc.c */
3290 #line 885 "grammar.y"
3291  {
3292  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
3293  YYERROR;
3294  ;}
3295  break;
3296 
3297  case 106:
3298 
3299 /* Line 1464 of yacc.c */
3300 #line 890 "grammar.y"
3301  {
3302  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
3303  YYERROR;
3304  ;}
3305  break;
3306 
3307  case 107:
3308 
3309 /* Line 1464 of yacc.c */
3310 #line 895 "grammar.y"
3311  {
3312  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR;
3313  ;}
3314  break;
3315 
3316  case 108:
3317 
3318 /* Line 1464 of yacc.c */
3319 #line 899 "grammar.y"
3320  {
3321  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR;
3322  ;}
3323  break;
3324 
3325  case 109:
3326 
3327 /* Line 1464 of yacc.c */
3328 #line 903 "grammar.y"
3329  {
3330  int r; TESTSETINT((yyvsp[(4) - (8)].lv),r);
3331  int c; TESTSETINT((yyvsp[(7) - (8)].lv),c);
3332  leftv v;
3333  idhdl h;
3334  if ((yyvsp[(1) - (8)].i) == MATRIX_CMD)
3335  {
3336  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (8)].lv),myynest,(yyvsp[(1) - (8)].i),&(currRing->idroot), TRUE)) YYERROR;
3337  v=&(yyval.lv);
3338  h=(idhdl)v->data;
3339  idDelete(&IDIDEAL(h));
3340  IDMATRIX(h) = mpNew(r,c);
3341  if (IDMATRIX(h)==NULL) YYERROR;
3342  }
3343  else if ((yyvsp[(1) - (8)].i) == INTMAT_CMD)
3344  {
3345  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (8)].lv),myynest,(yyvsp[(1) - (8)].i),&((yyvsp[(2) - (8)].lv).req_packhdl->idroot)))
3346  YYERROR;
3347  v=&(yyval.lv);
3348  h=(idhdl)v->data;
3349  delete IDINTVEC(h);
3350  IDINTVEC(h) = new intvec(r,c,0);
3351  if (IDINTVEC(h)==NULL) YYERROR;
3352  }
3353  else /* BIGINTMAT_CMD */
3354  {
3355  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (8)].lv),myynest,(yyvsp[(1) - (8)].i),&((yyvsp[(2) - (8)].lv).req_packhdl->idroot)))
3356  YYERROR;
3357  v=&(yyval.lv);
3358  h=(idhdl)v->data;
3359  delete IDBIMAT(h);
3360  IDBIMAT(h) = new bigintmat(r, c, coeffs_BIGINT);
3361  if (IDBIMAT(h)==NULL) YYERROR;
3362  }
3363  ;}
3364  break;
3365 
3366  case 110:
3367 
3368 /* Line 1464 of yacc.c */
3369 #line 939 "grammar.y"
3370  {
3371  if ((yyvsp[(1) - (2)].i) == MATRIX_CMD)
3372  {
3373  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR;
3374  }
3375  else if ((yyvsp[(1) - (2)].i) == INTMAT_CMD)
3376  {
3377  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
3378  YYERROR;
3379  leftv v=&(yyval.lv);
3380  idhdl h;
3381  do
3382  {
3383  h=(idhdl)v->data;
3384  delete IDINTVEC(h);
3385  IDINTVEC(h) = new intvec(1,1,0);
3386  v=v->next;
3387  } while (v!=NULL);
3388  }
3389  else /* BIGINTMAT_CMD */
3390  {
3391  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
3392  YYERROR;
3393  }
3394  ;}
3395  break;
3396 
3397  case 111:
3398 
3399 /* Line 1464 of yacc.c */
3400 #line 965 "grammar.y"
3401  {
3402  int t=(yyvsp[(1) - (3)].lv).Typ();
3403  sleftv r;
3404  memset(&r,0,sizeof(sleftv));
3405  if ((BEGIN_RING<t) && (t<END_RING))
3406  {
3407  if (iiDeclCommand(&r,&(yyvsp[(3) - (3)].lv),myynest,t,&(currRing->idroot), TRUE))
3408  YYERROR;
3409  }
3410  else
3411  {
3412  if (iiDeclCommand(&r,&(yyvsp[(3) - (3)].lv),myynest,t,&((yyvsp[(3) - (3)].lv).req_packhdl->idroot)))
3413  YYERROR;
3414  }
3415  leftv v=&(yyvsp[(1) - (3)].lv);
3416  while (v->next!=NULL) v=v->next;
3418  memcpy(v->next,&r,sizeof(sleftv));
3419  (yyval.lv)=(yyvsp[(1) - (3)].lv);
3420  ;}
3421  break;
3422 
3423  case 112:
3424 
3425 /* Line 1464 of yacc.c */
3426 #line 986 "grammar.y"
3427  {
3428  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
3429  YYERROR;
3430  ;}
3431  break;
3432 
3433  case 115:
3434 
3435 /* Line 1464 of yacc.c */
3436 #line 999 "grammar.y"
3437  {
3438  leftv v = &(yyvsp[(2) - (5)].lv);
3439  while (v->next!=NULL)
3440  {
3441  v=v->next;
3442  }
3444  memcpy(v->next,&((yyvsp[(4) - (5)].lv)),sizeof(sleftv));
3445  (yyval.lv) = (yyvsp[(2) - (5)].lv);
3446  ;}
3447  break;
3448 
3449  case 116:
3450 
3451 /* Line 1464 of yacc.c */
3452 #line 1013 "grammar.y"
3453  {
3454  // let rInit take care of any errors
3455  (yyval.i)=rOrderName((yyvsp[(1) - (1)].name));
3456  ;}
3457  break;
3458 
3459  case 117:
3460 
3461 /* Line 1464 of yacc.c */
3462 #line 1021 "grammar.y"
3463  {
3464  memset(&(yyval.lv),0,sizeof((yyval.lv)));
3465  intvec *iv = new intvec(2);
3466  (*iv)[0] = 1;
3467  (*iv)[1] = (yyvsp[(1) - (1)].i);
3468  (yyval.lv).rtyp = INTVEC_CMD;
3469  (yyval.lv).data = (void *)iv;
3470  ;}
3471  break;
3472 
3473  case 118:
3474 
3475 /* Line 1464 of yacc.c */
3476 #line 1030 "grammar.y"
3477  {
3478  memset(&(yyval.lv),0,sizeof((yyval.lv)));
3479  leftv sl = &(yyvsp[(3) - (4)].lv);
3480  int slLength;
3481  {
3482  slLength = exprlist_length(sl);
3483  int l = 2 + slLength;
3484  intvec *iv = new intvec(l);
3485  (*iv)[0] = slLength;
3486  (*iv)[1] = (yyvsp[(1) - (4)].i);
3487 
3488  int i = 2;
3489  while ((i<l) && (sl!=NULL))
3490  {
3491  if (sl->Typ() == INT_CMD)
3492  {
3493  (*iv)[i++] = (int)((long)(sl->Data()));
3494  }
3495  else if ((sl->Typ() == INTVEC_CMD)
3496  ||(sl->Typ() == INTMAT_CMD))
3497  {
3498  intvec *ivv = (intvec *)(sl->Data());
3499  int ll = 0,l = ivv->length();
3500  for (; l>0; l--)
3501  {
3502  (*iv)[i++] = (*ivv)[ll++];
3503  }
3504  }
3505  else
3506  {
3507  delete iv;
3508  (yyvsp[(3) - (4)].lv).CleanUp();
3509  MYYERROR("wrong type in ordering");
3510  }
3511  sl = sl->next;
3512  }
3513  (yyval.lv).rtyp = INTVEC_CMD;
3514  (yyval.lv).data = (void *)iv;
3515  }
3516  (yyvsp[(3) - (4)].lv).CleanUp();
3517  ;}
3518  break;
3519 
3520  case 120:
3521 
3522 /* Line 1464 of yacc.c */
3523 #line 1076 "grammar.y"
3524  {
3525  (yyval.lv) = (yyvsp[(1) - (3)].lv);
3526  (yyval.lv).next = (sleftv *)omAllocBin(sleftv_bin);
3527  memcpy((yyval.lv).next,&(yyvsp[(3) - (3)].lv),sizeof(sleftv));
3528  ;}
3529  break;
3530 
3531  case 122:
3532 
3533 /* Line 1464 of yacc.c */
3534 #line 1086 "grammar.y"
3535  {
3536  (yyval.lv) = (yyvsp[(2) - (3)].lv);
3537  ;}
3538  break;
3539 
3540  case 123:
3541 
3542 /* Line 1464 of yacc.c */
3543 #line 1092 "grammar.y"
3544  {
3545  expected_parms = TRUE;
3546  ;}
3547  break;
3548 
3549  case 124:
3550 
3551 /* Line 1464 of yacc.c */
3552 #line 1099 "grammar.y"
3553  { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
3554  break;
3555 
3556  case 125:
3557 
3558 /* Line 1464 of yacc.c */
3559 #line 1101 "grammar.y"
3560  { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
3561  break;
3562 
3563  case 126:
3564 
3565 /* Line 1464 of yacc.c */
3566 #line 1103 "grammar.y"
3567  { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
3568  break;
3569 
3570  case 127:
3571 
3572 /* Line 1464 of yacc.c */
3573 #line 1112 "grammar.y"
3574  { if ((yyvsp[(1) - (2)].i) != '<') YYERROR;
3575  if((feFilePending=feFopen((yyvsp[(2) - (2)].name),"r",NULL,TRUE))==NULL) YYERROR; ;}
3576  break;
3577 
3578  case 128:
3579 
3580 /* Line 1464 of yacc.c */
3581 #line 1115 "grammar.y"
3582  { newFile((yyvsp[(2) - (4)].name),feFilePending); ;}
3583  break;
3584 
3585  case 129:
3586 
3587 /* Line 1464 of yacc.c */
3588 #line 1120 "grammar.y"
3589  {
3590  feHelp((yyvsp[(2) - (3)].name));
3591  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
3592  ;}
3593  break;
3594 
3595  case 130:
3596 
3597 /* Line 1464 of yacc.c */
3598 #line 1125 "grammar.y"
3599  {
3600  feHelp(NULL);
3601  ;}
3602  break;
3603 
3604  case 131:
3605 
3606 /* Line 1464 of yacc.c */
3607 #line 1132 "grammar.y"
3608  {
3609  singular_example((yyvsp[(2) - (3)].name));
3610  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
3611  ;}
3612  break;
3613 
3614  case 132:
3615 
3616 /* Line 1464 of yacc.c */
3617 #line 1140 "grammar.y"
3618  {
3619  if (basePack!=(yyvsp[(2) - (2)].lv).req_packhdl)
3620  {
3621  if(iiExport(&(yyvsp[(2) - (2)].lv),0,currPack)) YYERROR;
3622  }
3623  else
3624  if (iiExport(&(yyvsp[(2) - (2)].lv),0)) YYERROR;
3625  ;}
3626  break;
3627 
3628  case 133:
3629 
3630 /* Line 1464 of yacc.c */
3631 #line 1152 "grammar.y"
3632  {
3633  leftv v=&(yyvsp[(2) - (2)].lv);
3634  if (v->rtyp!=IDHDL)
3635  {
3636  if (v->name!=NULL)
3637  {
3638  Werror("`%s` is undefined in kill",v->name);
3639  }
3640  else WerrorS("kill what ?");
3641  }
3642  else
3643  {
3644  killhdl((idhdl)v->data,v->req_packhdl);
3645  }
3646  ;}
3647  break;
3648 
3649  case 134:
3650 
3651 /* Line 1464 of yacc.c */
3652 #line 1168 "grammar.y"
3653  {
3654  leftv v=&(yyvsp[(3) - (3)].lv);
3655  if (v->rtyp!=IDHDL)
3656  {
3657  if (v->name!=NULL)
3658  {
3659  Werror("`%s` is undefined in kill",v->name);
3660  }
3661  else WerrorS("kill what ?");
3662  }
3663  else
3664  {
3665  killhdl((idhdl)v->data,v->req_packhdl);
3666  }
3667  ;}
3668  break;
3669 
3670  case 135:
3671 
3672 /* Line 1464 of yacc.c */
3673 #line 1187 "grammar.y"
3674  {
3675  list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE);
3676  ;}
3677  break;
3678 
3679  case 136:
3680 
3681 /* Line 1464 of yacc.c */
3682 #line 1191 "grammar.y"
3683  {
3684  list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE);
3685  ;}
3686  break;
3687 
3688  case 137:
3689 
3690 /* Line 1464 of yacc.c */
3691 #line 1195 "grammar.y"
3692  {
3693  if ((yyvsp[(3) - (4)].i)==QRING_CMD) (yyvsp[(3) - (4)].i)=RING_CMD;
3694  list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE);
3695  ;}
3696  break;
3697 
3698  case 138:
3699 
3700 /* Line 1464 of yacc.c */
3701 #line 1200 "grammar.y"
3702  {
3703  list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE);
3704  ;}
3705  break;
3706 
3707  case 139:
3708 
3709 /* Line 1464 of yacc.c */
3710 #line 1204 "grammar.y"
3711  {
3712  list_cmd(RING_CMD,NULL,"// ",TRUE);
3713  ;}
3714  break;
3715 
3716  case 140:
3717 
3718 /* Line 1464 of yacc.c */
3719 #line 1208 "grammar.y"
3720  {
3721  list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE);
3722  ;}
3723  break;
3724 
3725  case 141:
3726 
3727 /* Line 1464 of yacc.c */
3728 #line 1212 "grammar.y"
3729  {
3730  list_cmd(PROC_CMD,NULL,"// ",TRUE);
3731  ;}
3732  break;
3733 
3734  case 142:
3735 
3736 /* Line 1464 of yacc.c */
3737 #line 1216 "grammar.y"
3738  {
3739  list_cmd(0,(yyvsp[(3) - (4)].lv).Fullname(),"// ",TRUE);
3740  (yyvsp[(3) - (4)].lv).CleanUp();
3741  ;}
3742  break;
3743 
3744  case 143:
3745 
3746 /* Line 1464 of yacc.c */
3747 #line 1221 "grammar.y"
3748  {
3749  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3750  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3751  (yyvsp[(3) - (6)].lv).CleanUp();
3752  ;}
3753  break;
3754 
3755  case 144:
3756 
3757 /* Line 1464 of yacc.c */
3758 #line 1227 "grammar.y"
3759  {
3760  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3761  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3762  (yyvsp[(3) - (6)].lv).CleanUp();
3763  ;}
3764  break;
3765 
3766  case 145:
3767 
3768 /* Line 1464 of yacc.c */
3769 #line 1233 "grammar.y"
3770  {
3771  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3772  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3773  (yyvsp[(3) - (6)].lv).CleanUp();
3774  ;}
3775  break;
3776 
3777  case 146:
3778 
3779 /* Line 1464 of yacc.c */
3780 #line 1239 "grammar.y"
3781  {
3782  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3783  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3784  (yyvsp[(3) - (6)].lv).CleanUp();
3785  ;}
3786  break;
3787 
3788  case 147:
3789 
3790 /* Line 1464 of yacc.c */
3791 #line 1245 "grammar.y"
3792  {
3793  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3794  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3795  (yyvsp[(3) - (6)].lv).CleanUp();
3796  ;}
3797  break;
3798 
3799  case 148:
3800 
3801 /* Line 1464 of yacc.c */
3802 #line 1251 "grammar.y"
3803  {
3804  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3805  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3806  (yyvsp[(3) - (6)].lv).CleanUp();
3807  ;}
3808  break;
3809 
3810  case 149:
3811 
3812 /* Line 1464 of yacc.c */
3813 #line 1257 "grammar.y"
3814  {
3815  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3816  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3817  (yyvsp[(3) - (6)].lv).CleanUp();
3818  ;}
3819  break;
3820 
3821  case 150:
3822 
3823 /* Line 1464 of yacc.c */
3824 #line 1269 "grammar.y"
3825  {
3826  list_cmd(-1,NULL,"// ",TRUE);
3827  ;}
3828  break;
3829 
3830  case 151:
3831 
3832 /* Line 1464 of yacc.c */
3833 #line 1275 "grammar.y"
3834  { yyInRingConstruction = TRUE; ;}
3835  break;
3836 
3837  case 152:
3838 
3839 /* Line 1464 of yacc.c */
3840 #line 1284 "grammar.y"
3841  {
3842  const char *ring_name = (yyvsp[(2) - (8)].lv).name;
3843  ring b=
3844  rInit(&(yyvsp[(4) - (8)].lv), /* characteristik and list of parameters*/
3845  &(yyvsp[(6) - (8)].lv), /* names of ringvariables */
3846  &(yyvsp[(8) - (8)].lv)); /* ordering */
3847  idhdl newRingHdl=NULL;
3848 
3849  if (b!=NULL)
3850  {
3851  newRingHdl=enterid(ring_name, myynest, RING_CMD,
3852  &((yyvsp[(2) - (8)].lv).req_packhdl->idroot),FALSE);
3853  (yyvsp[(2) - (8)].lv).CleanUp();
3854  if (newRingHdl!=NULL)
3855  {
3856  IDRING(newRingHdl)=b;
3857  }
3858  else
3859  {
3860  rKill(b);
3861  }
3862  }
3864  if (newRingHdl==NULL)
3865  {
3866  MYYERROR("cannot make ring");
3867  }
3868  else
3869  {
3870  rSetHdl(newRingHdl);
3871  }
3872  ;}
3873  break;
3874 
3875  case 153:
3876 
3877 /* Line 1464 of yacc.c */
3878 #line 1317 "grammar.y"
3879  {
3880  const char *ring_name = (yyvsp[(2) - (2)].lv).name;
3881  if (!inerror) rDefault(ring_name);
3883  (yyvsp[(2) - (2)].lv).CleanUp();
3884  ;}
3885  break;
3886 
3887  case 154:
3888 
3889 /* Line 1464 of yacc.c */
3890 #line 1324 "grammar.y"
3891  {
3893  if (iiAssignCR(&(yyvsp[(2) - (4)].lv),&(yyvsp[(4) - (4)].lv))) YYERROR;
3894  ;}
3895  break;
3896 
3897  case 155:
3898 
3899 /* Line 1464 of yacc.c */
3900 #line 1332 "grammar.y"
3901  {
3902  if (((yyvsp[(1) - (2)].i)!=LIB_CMD)||(jjLOAD((yyvsp[(2) - (2)].name),TRUE))) YYERROR;
3903  ;}
3904  break;
3905 
3906  case 158:
3907 
3908 /* Line 1464 of yacc.c */
3909 #line 1341 "grammar.y"
3910  {
3911  if (((yyvsp[(1) - (2)].i)==KEEPRING_CMD) && (myynest==0))
3912  MYYERROR("only inside a proc allowed");
3913  const char * n=(yyvsp[(2) - (2)].lv).Name();
3914  if ((((yyvsp[(2) - (2)].lv).Typ()==RING_CMD)||((yyvsp[(2) - (2)].lv).Typ()==QRING_CMD))
3915  && ((yyvsp[(2) - (2)].lv).rtyp==IDHDL))
3916  {
3917  idhdl h=(idhdl)(yyvsp[(2) - (2)].lv).data;
3918  if ((yyvsp[(2) - (2)].lv).e!=NULL) h=rFindHdl((ring)(yyvsp[(2) - (2)].lv).Data(),NULL);
3919  //Print("setring %s lev %d (ptr:%x)\n",IDID(h),IDLEV(h),IDRING(h));
3920  if ((yyvsp[(1) - (2)].i)==KEEPRING_CMD)
3921  {
3922  if (h!=NULL)
3923  {
3924  if (IDLEV(h)!=0)
3925  {
3926  if (iiExport(&(yyvsp[(2) - (2)].lv),myynest-1)) YYERROR;
3927 #if 1
3928  idhdl p=IDRING(h)->idroot;
3929  idhdl root=p;
3930  int prevlev=myynest-1;
3931  while (p!=NULL)
3932  {
3933  if (IDLEV(p)==myynest)
3934  {
3935  idhdl old=root->get(IDID(p),prevlev);
3936  if (old!=NULL)
3937  {
3938  if (BVERBOSE(V_REDEFINE))
3939  Warn("redefining %s",IDID(p));
3940  killhdl2(old,&root,IDRING(h));
3941  IDRING(h)->idroot=root;
3942  }
3943  IDLEV(p)=prevlev;
3944  }
3945  p=IDNEXT(p);
3946  }
3947 #endif
3948  }
3949 #ifdef USE_IILOCALRING
3950  iiLocalRing[myynest-1]=IDRING(h);
3951 #endif
3952  procstack->cRing=IDRING(h);
3953  procstack->cRingHdl=h;
3954  }
3955  else
3956  {
3957  Werror("%s is no identifier",n);
3958  (yyvsp[(2) - (2)].lv).CleanUp();
3959  YYERROR;
3960  }
3961  }
3962  if (h!=NULL) rSetHdl(h);
3963  else
3964  {
3965  Werror("cannot find the name of the basering %s",n);
3966  (yyvsp[(2) - (2)].lv).CleanUp();
3967  YYERROR;
3968  }
3969  (yyvsp[(2) - (2)].lv).CleanUp();
3970  }
3971  else
3972  {
3973  Werror("%s is no name of a ring/qring",n);
3974  (yyvsp[(2) - (2)].lv).CleanUp();
3975  YYERROR;
3976  }
3977  ;}
3978  break;
3979 
3980  case 159:
3981 
3982 /* Line 1464 of yacc.c */
3983 #line 1413 "grammar.y"
3984  {
3985  type_cmd(&((yyvsp[(2) - (2)].lv)));
3986  ;}
3987  break;
3988 
3989  case 160:
3990 
3991 /* Line 1464 of yacc.c */
3992 #line 1417 "grammar.y"
3993  {
3994  //Print("typ is %d, rtyp:%d\n",$1.Typ(),$1.rtyp);
3995  #ifdef SIQ
3996  if ((yyvsp[(1) - (1)].lv).rtyp!=COMMAND)
3997  {
3998  #endif
3999  if ((yyvsp[(1) - (1)].lv).Typ()==UNKNOWN)
4000  {
4001  if ((yyvsp[(1) - (1)].lv).name!=NULL)
4002  {
4003  Werror("`%s` is undefined",(yyvsp[(1) - (1)].lv).name);
4004  omFree((ADDRESS)(yyvsp[(1) - (1)].lv).name);
4005  }
4006  YYERROR;
4007  }
4008  #ifdef SIQ
4009  }
4010  #endif
4011  (yyvsp[(1) - (1)].lv).Print(&sLastPrinted);
4012  (yyvsp[(1) - (1)].lv).CleanUp(currRing);
4013  if (errorreported) YYERROR;
4014  ;}
4015  break;
4016 
4017  case 161:
4018 
4019 /* Line 1464 of yacc.c */
4020 #line 1446 "grammar.y"
4021  {
4022  int i; TESTSETINT((yyvsp[(3) - (5)].lv),i);
4023  if (i!=0)
4024  {
4025  newBuffer( (yyvsp[(5) - (5)].name), BT_if);
4026  }
4027  else
4028  {
4029  omFree((ADDRESS)(yyvsp[(5) - (5)].name));
4030  currentVoice->ifsw=1;
4031  }
4032  ;}
4033  break;
4034 
4035  case 162:
4036 
4037 /* Line 1464 of yacc.c */
4038 #line 1459 "grammar.y"
4039  {
4040  if (currentVoice->ifsw==1)
4041  {
4042  currentVoice->ifsw=0;
4043  newBuffer( (yyvsp[(2) - (2)].name), BT_else);
4044  }
4045  else
4046  {
4047  if (currentVoice->ifsw!=2)
4048  {
4049  Warn("`else` without `if` in level %d",myynest);
4050  }
4051  omFree((ADDRESS)(yyvsp[(2) - (2)].name));
4052  }
4053  currentVoice->ifsw=0;
4054  ;}
4055  break;
4056 
4057  case 163:
4058 
4059 /* Line 1464 of yacc.c */
4060 #line 1476 "grammar.y"
4061  {
4062  int i; TESTSETINT((yyvsp[(3) - (5)].lv),i);
4063  if (i)
4064  {
4065  if (exitBuffer(BT_break)) YYERROR;
4066  }
4067  currentVoice->ifsw=0;
4068  ;}
4069  break;
4070 
4071  case 164:
4072 
4073 /* Line 1464 of yacc.c */
4074 #line 1485 "grammar.y"
4075  {
4076  if (exitBuffer(BT_break)) YYERROR;
4077  currentVoice->ifsw=0;
4078  ;}
4079  break;
4080 
4081  case 165:
4082 
4083 /* Line 1464 of yacc.c */
4084 #line 1490 "grammar.y"
4085  {
4086  if (contBuffer(BT_break)) YYERROR;
4087  currentVoice->ifsw=0;
4088  ;}
4089  break;
4090 
4091  case 166:
4092 
4093 /* Line 1464 of yacc.c */
4094 #line 1498 "grammar.y"
4095  {
4096  /* -> if(!$2) break; $3; continue;*/
4097  char * s = (char *)omAlloc( strlen((yyvsp[(2) - (3)].name)) + strlen((yyvsp[(3) - (3)].name)) + 36);
4098  sprintf(s,"whileif (!(%s)) break;\n%scontinue;\n " ,(yyvsp[(2) - (3)].name),(yyvsp[(3) - (3)].name));
4099  newBuffer(s,BT_break);
4100  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
4101  omFree((ADDRESS)(yyvsp[(3) - (3)].name));
4102  ;}
4103  break;
4104 
4105  case 167:
4106 
4107 /* Line 1464 of yacc.c */
4108 #line 1510 "grammar.y"
4109  {
4110  /* $2 */
4111  /* if (!$3) break; $5; $4; continue; */
4112  char * s = (char *)omAlloc( strlen((yyvsp[(3) - (5)].name))+strlen((yyvsp[(4) - (5)].name))+strlen((yyvsp[(5) - (5)].name))+36);
4113  sprintf(s,"forif (!(%s)) break;\n%s%s;\ncontinue;\n "
4114  ,(yyvsp[(3) - (5)].name),(yyvsp[(5) - (5)].name),(yyvsp[(4) - (5)].name));
4115  omFree((ADDRESS)(yyvsp[(3) - (5)].name));
4116  omFree((ADDRESS)(yyvsp[(4) - (5)].name));
4117  omFree((ADDRESS)(yyvsp[(5) - (5)].name));
4118  newBuffer(s,BT_break);
4119  s = (char *)omAlloc( strlen((yyvsp[(2) - (5)].name)) + 3);
4120  sprintf(s,"%s;\n",(yyvsp[(2) - (5)].name));
4121  omFree((ADDRESS)(yyvsp[(2) - (5)].name));
4122  newBuffer(s,BT_if);
4123  ;}
4124  break;
4125 
4126  case 168:
4127 
4128 /* Line 1464 of yacc.c */
4129 #line 1529 "grammar.y"
4130  {
4131  idhdl h = enterid((yyvsp[(2) - (3)].name),myynest,PROC_CMD,&IDROOT,TRUE);
4132  if (h==NULL) {omFree((ADDRESS)(yyvsp[(2) - (3)].name));omFree((ADDRESS)(yyvsp[(3) - (3)].name)); YYERROR;}
4133  iiInitSingularProcinfo(IDPROC(h),"", (yyvsp[(2) - (3)].name), 0, 0);
4134  IDPROC(h)->data.s.body = (char *)omAlloc(strlen((yyvsp[(3) - (3)].name))+31);;
4135  sprintf(IDPROC(h)->data.s.body,"parameter list #;\n%s;return();\n\n",(yyvsp[(3) - (3)].name));
4136  omFree((ADDRESS)(yyvsp[(3) - (3)].name));
4137  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
4138  ;}
4139  break;
4140 
4141  case 169:
4142 
4143 /* Line 1464 of yacc.c */
4144 #line 1539 "grammar.y"
4145  {
4146  idhdl h = enterid((yyvsp[(1) - (3)].name),myynest,PROC_CMD,&IDROOT,TRUE);
4147  if (h==NULL)
4148  {
4149  omFree((ADDRESS)(yyvsp[(1) - (3)].name));
4150  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
4151  omFree((ADDRESS)(yyvsp[(3) - (3)].name));
4152  YYERROR;
4153  }
4154  char *args=iiProcArgs((yyvsp[(2) - (3)].name),FALSE);
4155  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
4156  iiInitSingularProcinfo(IDPROC(h),"", (yyvsp[(1) - (3)].name), 0, 0);
4157  IDPROC(h)->data.s.body = (char *)omAlloc(strlen((yyvsp[(3) - (3)].name))+strlen(args)+14);;
4158  sprintf(IDPROC(h)->data.s.body,"%s\n%s;return();\n\n",args,(yyvsp[(3) - (3)].name));
4159  omFree((ADDRESS)args);
4160  omFree((ADDRESS)(yyvsp[(3) - (3)].name));
4161  omFree((ADDRESS)(yyvsp[(1) - (3)].name));
4162  ;}
4163  break;
4164 
4165  case 170:
4166 
4167 /* Line 1464 of yacc.c */
4168 #line 1558 "grammar.y"
4169  {
4170  omFree((ADDRESS)(yyvsp[(3) - (4)].name));
4171  idhdl h = enterid((yyvsp[(1) - (4)].name),myynest,PROC_CMD,&IDROOT,TRUE);
4172  if (h==NULL)
4173  {
4174  omFree((ADDRESS)(yyvsp[(1) - (4)].name));
4175  omFree((ADDRESS)(yyvsp[(2) - (4)].name));
4176  omFree((ADDRESS)(yyvsp[(4) - (4)].name));
4177  YYERROR;
4178  }
4179  char *args=iiProcArgs((yyvsp[(2) - (4)].name),FALSE);
4180  omFree((ADDRESS)(yyvsp[(2) - (4)].name));
4181  iiInitSingularProcinfo(IDPROC(h),"", (yyvsp[(1) - (4)].name), 0, 0);
4182  omFree((ADDRESS)(yyvsp[(1) - (4)].name));
4183  IDPROC(h)->data.s.body = (char *)omAlloc(strlen((yyvsp[(4) - (4)].name))+strlen(args)+14);;
4184  sprintf(IDPROC(h)->data.s.body,"%s\n%s;return();\n\n",args,(yyvsp[(4) - (4)].name));
4185  omFree((ADDRESS)args);
4186  omFree((ADDRESS)(yyvsp[(4) - (4)].name));
4187  ;}
4188  break;
4189 
4190  case 171:
4191 
4192 /* Line 1464 of yacc.c */
4193 #line 1581 "grammar.y"
4194  {
4195  // decl. of type proc p(int i)
4196  if ((yyvsp[(1) - (2)].i)==PARAMETER) { if (iiParameter(&(yyvsp[(2) - (2)].lv))) YYERROR; }
4197  else { if (iiAlias(&(yyvsp[(2) - (2)].lv))) YYERROR; }
4198  ;}
4199  break;
4200 
4201  case 172:
4202 
4203 /* Line 1464 of yacc.c */
4204 #line 1587 "grammar.y"
4205  {
4206  // decl. of type proc p(i)
4207  sleftv tmp_expr;
4208  if ((yyvsp[(1) - (2)].i)==ALIAS_CMD) MYYERROR("alias requires a type");
4209  if ((iiDeclCommand(&tmp_expr,&(yyvsp[(2) - (2)].lv),myynest,DEF_CMD,&IDROOT))
4210  || (iiParameter(&tmp_expr)))
4211  YYERROR;
4212  ;}
4213  break;
4214 
4215  case 173:
4216 
4217 /* Line 1464 of yacc.c */
4218 #line 1599 "grammar.y"
4219  {
4220  iiRETURNEXPR.Copy(&(yyvsp[(3) - (4)].lv));
4221  (yyvsp[(3) - (4)].lv).CleanUp();
4222  if (exitBuffer(BT_proc)) YYERROR;
4223  ;}
4224  break;
4225 
4226  case 174:
4227 
4228 /* Line 1464 of yacc.c */
4229 #line 1605 "grammar.y"
4230  {
4231  if ((yyvsp[(1) - (3)].i)==RETURN)
4232  {
4233  iiRETURNEXPR.Init();
4235  if (exitBuffer(BT_proc)) YYERROR;
4236  }
4237  ;}
4238  break;
4239 
4240 
4241 
4242 /* Line 1464 of yacc.c */
4243 #line 4244 "grammar.cc"
4244  default: break;
4245  }
4246  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4247 
4248  YYPOPSTACK (yylen);
4249  yylen = 0;
4250  YY_STACK_PRINT (yyss, yyssp);
4251 
4252  *++yyvsp = yyval;
4253 
4254  /* Now `shift' the result of the reduction. Determine what state
4255  that goes to, based on the state we popped back to and the rule
4256  number reduced by. */
4257 
4258  yyn = yyr1[yyn];
4259 
4260  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4261  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4262  yystate = yytable[yystate];
4263  else
4264  yystate = yydefgoto[yyn - YYNTOKENS];
4265 
4266  goto yynewstate;
4267 
4268 
4269 /*------------------------------------.
4270 | yyerrlab -- here on detecting error |
4271 `------------------------------------*/
4272 yyerrlab:
4273  /* If not already recovering from an error, report this error. */
4274  if (!yyerrstatus)
4275  {
4276  ++yynerrs;
4277 #if ! YYERROR_VERBOSE
4278  yyerror (YY_("syntax error"));
4279 #else
4280  {
4281  YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4282  if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4283  {
4284  YYSIZE_T yyalloc = 2 * yysize;
4285  if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
4286  yyalloc = YYSTACK_ALLOC_MAXIMUM;
4287  if (yymsg != yymsgbuf)
4288  YYSTACK_FREE (yymsg);
4289  yymsg = (char *) YYSTACK_ALLOC (yyalloc);
4290  if (yymsg)
4291  yymsg_alloc = yyalloc;
4292  else
4293  {
4294  yymsg = yymsgbuf;
4295  yymsg_alloc = sizeof yymsgbuf;
4296  }
4297  }
4298 
4299  if (0 < yysize && yysize <= yymsg_alloc)
4300  {
4301  (void) yysyntax_error (yymsg, yystate, yychar);
4302  yyerror (yymsg);
4303  }
4304  else
4305  {
4306  yyerror (YY_("syntax error"));
4307  if (yysize != 0)
4308  goto yyexhaustedlab;
4309  }
4310  }
4311 #endif
4312  }
4313 
4314 
4315 
4316  if (yyerrstatus == 3)
4317  {
4318  /* If just tried and failed to reuse lookahead token after an
4319  error, discard it. */
4320 
4321  if (yychar <= YYEOF)
4322  {
4323  /* Return failure if at end of input. */
4324  if (yychar == YYEOF)
4325  YYABORT;
4326  }
4327  else
4328  {
4329  yydestruct ("Error: discarding",
4330  yytoken, &yylval);
4331  yychar = YYEMPTY;
4332  }
4333  }
4334 
4335  /* Else will try to reuse lookahead token after shifting the error
4336  token. */
4337  goto yyerrlab1;
4338 
4339 
4340 /*---------------------------------------------------.
4341 | yyerrorlab -- error raised explicitly by YYERROR. |
4342 `---------------------------------------------------*/
4343 yyerrorlab:
4344 
4345  /* Pacify compilers like GCC when the user code never invokes
4346  YYERROR and the label yyerrorlab therefore never appears in user
4347  code. */
4348  if (/*CONSTCOND*/ 0)
4349  goto yyerrorlab;
4350 
4351  /* Do not reclaim the symbols of the rule which action triggered
4352  this YYERROR. */
4353  YYPOPSTACK (yylen);
4354  yylen = 0;
4355  YY_STACK_PRINT (yyss, yyssp);
4356  yystate = *yyssp;
4357  goto yyerrlab1;
4358 
4359 
4360 /*-------------------------------------------------------------.
4361 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4362 `-------------------------------------------------------------*/
4363 yyerrlab1:
4364  yyerrstatus = 3; /* Each real token shifted decrements this. */
4365 
4366  for (;;)
4367  {
4368  yyn = yypact[yystate];
4369  if (yyn != YYPACT_NINF)
4370  {
4371  yyn += YYTERROR;
4372  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4373  {
4374  yyn = yytable[yyn];
4375  if (0 < yyn)
4376  break;
4377  }
4378  }
4379 
4380  /* Pop the current state because it cannot handle the error token. */
4381  if (yyssp == yyss)
4382  YYABORT;
4383 
4384 
4385  yydestruct ("Error: popping",
4386  yystos[yystate], yyvsp);
4387  YYPOPSTACK (1);
4388  yystate = *yyssp;
4389  YY_STACK_PRINT (yyss, yyssp);
4390  }
4391 
4392  *++yyvsp = yylval;
4393 
4394 
4395  /* Shift the error token. */
4396  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4397 
4398  yystate = yyn;
4399  goto yynewstate;
4400 
4401 
4402 /*-------------------------------------.
4403 | yyacceptlab -- YYACCEPT comes here. |
4404 `-------------------------------------*/
4405 yyacceptlab:
4406  yyresult = 0;
4407  goto yyreturn;
4408 
4409 /*-----------------------------------.
4410 | yyabortlab -- YYABORT comes here. |
4411 `-----------------------------------*/
4412 yyabortlab:
4413  yyresult = 1;
4414  goto yyreturn;
4415 
4416 #if !defined(yyoverflow) || YYERROR_VERBOSE
4417 /*-------------------------------------------------.
4418 | yyexhaustedlab -- memory exhaustion comes here. |
4419 `-------------------------------------------------*/
4420 yyexhaustedlab:
4421  yyerror (YY_("memory exhausted"));
4422  yyresult = 2;
4423  /* Fall through. */
4424 #endif
4425 
4426 yyreturn:
4427  if (yychar != YYEMPTY)
4428  yydestruct ("Cleanup: discarding lookahead",
4429  yytoken, &yylval);
4430  /* Do not reclaim the symbols of the rule which action triggered
4431  this YYABORT or YYACCEPT. */
4432  YYPOPSTACK (yylen);
4433  YY_STACK_PRINT (yyss, yyssp);
4434  while (yyssp != yyss)
4435  {
4436  yydestruct ("Cleanup: popping",
4437  yystos[*yyssp], yyvsp);
4438  YYPOPSTACK (1);
4439  }
4440 #ifndef yyoverflow
4441  if (yyss != yyssa)
4442  YYSTACK_FREE (yyss);
4443 #endif
4444 #if YYERROR_VERBOSE
4445  if (yymsg != yymsgbuf)
4446  YYSTACK_FREE (yymsg);
4447 #endif
4448  /* Make sure YYID is used. */
4449  return YYID (yyresult);
4450 }
char * iiProcArgs(char *e, BOOLEAN withParenth)
Definition: iplib.cc:128
Definition: grammar.cc:273
#define omAllocBin(bin)
Definition: omAllocDecl.h:205
BOOLEAN yyInRingConstruction
Definition: grammar.cc:173
const CanonicalForm int s
Definition: facAbsFact.cc:55
int iiTestConvert(int inputType, int outputType)
Definition: gentable.cc:292
Class used for (list of) interpreter objects.
Definition: subexpr.h:83
void singular_example(char *str)
Definition: misc_ip.cc:439
#define YYFINAL
Definition: grammar.cc:580
#define yyerrok
Definition: grammar.cc:1537
static FORCE_INLINE const char * n_Read(const char *s, number *a, const coeffs r)
!!! Recommendation: This method is too cryptic to be part of the user- !!! interface. As defined here, it is merely a helper !!! method for parsing number input strings.
Definition: coeffs.h:599
int sdb_flags
Definition: sdb.cc:32
void PrintLn()
Definition: reporter.cc:327
#define Print
Definition: emacs.cc:83
Definition: tok.h:98
#define pAdd(p, q)
Definition: polys.h:174
#define idDelete(H)
delete an ideal
Definition: ideals.h:31
procinfo * iiInitSingularProcinfo(procinfov pi, const char *libname, const char *procname, int line, long pos, BOOLEAN pstatic)
Definition: iplib.cc:968
#define IDINTVEC(a)
Definition: ipid.h:127
#define IDID(a)
Definition: ipid.h:121
BOOLEAN iiExprArith1(leftv res, leftv a, int op)
Definition: iparith.cc:8414
#define FALSE
Definition: auxiliary.h:140
BOOLEAN iiConvert(int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
Definition: ipconv.cc:358
const int MAX_INT_LEN
Definition: mylimits.h:13
Definition: tok.h:42
return P p
Definition: myNF.cc:203
int exprlist_length(leftv v)
Definition: ipshell.cc:554
Matrices of numbers.
Definition: bigintmat.h:51
feBufferTypes Typ()
Definition: fevoices.cc:111
BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c)
Definition: iparith.cc:8626
#define YYACCEPT
Definition: grammar.cc:1542
#define YYSTACK_ALLOC
Definition: grammar.cc:492
#define YYTRANSLATE(YYX)
Definition: grammar.cc:597
char prompt_char
Definition: febase.cc:44
sleftv iiRETURNEXPR
Definition: iplib.cc:517
void writeTime(const char *v)
Definition: timer.cc:121
#define IDNEXT(a)
Definition: ipid.h:117
proclevel * procstack
Definition: ipid.cc:58
#define IDROOT
Definition: ipid.h:20
BOOLEAN siq
Definition: subexpr.cc:58
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: grammar.cc:1650
#define TRUE
Definition: auxiliary.h:144
int length() const
Definition: intvec.h:86
void type_cmd(leftv v)
Definition: ipshell.cc:246
BOOLEAN iiAssignCR(leftv r, leftv arg)
Definition: ipshell.cc:6434
#define IDIDEAL(a)
Definition: ipid.h:132
void Init()
Definition: subexpr.h:108
#define UNKNOWN
Definition: tok.h:221
void * ADDRESS
Definition: auxiliary.h:161
sleftv * leftv
Definition: structs.h:60
BOOLEAN iiExprArithM(leftv res, leftv a, int op)
Definition: iparith.cc:8714
#define IDBIMAT(a)
Definition: ipid.h:128
void WerrorS(const char *s)
Definition: feFopen.cc:24
int inerror
Definition: grammar.cc:176
#define YYNTOKENS
Definition: grammar.cc:585
int timerv
Definition: timer.cc:19
BOOLEAN jjLOAD(const char *s, BOOLEAN autoexport)
load lib/module given in v
Definition: iparith.cc:5345
coeffs coeffs_BIGINT
Definition: ipid.cc:54
int Typ()
Definition: subexpr.cc:976
#define omAlloc(size)
Definition: omAllocDecl.h:210
idhdl cRingHdl
Definition: ipid.h:60
BOOLEAN exitBuffer(feBufferTypes typ)
Definition: fevoices.cc:241
BOOLEAN iiExport(leftv v, int toLev)
Definition: ipshell.cc:1392
Definition: idrec.h:34
#define IDHDL
Definition: tok.h:35
idhdl get(const char *s, int lev)
Definition: ipid.cc:91
BOOLEAN iiParameter(leftv p)
Definition: ipshell.cc:1248
const char * currid
Definition: grammar.cc:172
void * data
Definition: subexpr.h:89
char ifsw
Definition: fevoices.h:78
#define YYSTYPE
Definition: stype.h:19
Definition: fevoices.h:24
BOOLEAN iiTestAssume(leftv a, leftv b)
Definition: ipshell.cc:6373
int myynest
Definition: febase.cc:46
#define YYPOPSTACK(N)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
void killhdl2(idhdl h, idhdl *ih, ring r)
Definition: ipid.cc:403
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
Definition: ipid.cc:259
#define YYTERROR
Definition: grammar.cc:1582
#define YYEMPTY
Definition: grammar.cc:1539
const ring r
Definition: syzextra.cc:208
#define YYSTACK_FREE
Definition: grammar.cc:493
static const yytype_uint8 yyr2[]
Definition: grammar.cc:840
int cmdtok
Definition: grammar.cc:175
Definition: intvec.h:14
const char * iiTwoOps(int t)
Definition: gentable.cc:252
void rKill(ring r)
Definition: ipshell.cc:6057
void list_cmd(int typ, const char *what, const char *prefix, BOOLEAN iterate, BOOLEAN fullname)
Definition: ipshell.cc:420
int j
Definition: myNF.cc:70
Definition: tok.h:61
procinfo * pi
Definition: fevoices.h:63
const char * name
Definition: subexpr.h:88
#define pSetCompP(a, i)
Definition: polys.h:274
#define omFree(addr)
Definition: omAllocDecl.h:261
BOOLEAN siCntrlc
Definition: cntrlc.cc:105
static const yytype_int16 yypact[]
Definition: grammar.cc:922
short int yytype_int16
Definition: grammar.cc:397
#define YYSTACK_ALLOC_MAXIMUM
Definition: grammar.cc:495
#define YYABORT
Definition: grammar.cc:1543
#define YY_REDUCE_PRINT(Rule)
Definition: grammar.cc:1783
BOOLEAN exitVoice()
Definition: fevoices.cc:346
idhdl currRingHdl
Definition: ipid.cc:65
void Copy(leftv e)
Definition: subexpr.cc:657
int rOrderName(char *ordername)
Definition: ring.cc:508
#define YY_STACK_PRINT(Bottom, Top)
Definition: grammar.cc:1745
ring rDefault(const coeffs cf, int N, char **n, int ord_size, int *ord, int *block0, int *block1, int **wvhdl)
Definition: ring.cc:113
idrec * idhdl
Definition: ring.h:18
FILE * feFopen(const char *path, const char *mode, char *where, short useWerror, short path_only)
Definition: feFopen.cc:47
omBin sleftv_bin
Definition: subexpr.cc:50
int i
Definition: cfEzgcd.cc:123
ring rInit(leftv pn, leftv rv, leftv ord)
Definition: ipshell.cc:5516
void startRTimer()
Definition: timer.cc:153
idhdl rFindHdl(ring r, idhdl n)
Definition: ipshell.cc:1577
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Definition: grammar.cc:2037
void iiDebug()
Definition: ipshell.cc:985
static const yytype_int16 yypgoto[]
Definition: grammar.cc:967
#define MYYERROR(a)
Definition: grammar.cc:186
#define IDLEV(a)
Definition: ipid.h:120
static const yytype_uint8 yydefact[]
Definition: grammar.cc:865
short errorreported
Definition: feFopen.cc:23
leftv next
Definition: subexpr.h:87
Voice * prev
Definition: fevoices.h:61
FILE * feFilePending
Definition: ipid.cc:56
#define BVERBOSE(a)
Definition: options.h:33
matrix mpNew(int r, int c)
create a r x c zero-matrix
Definition: matpol.cc:48
Definition: tok.h:38
int iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl *root, BOOLEAN isring, BOOLEAN init_b)
Definition: ipshell.cc:1123
#define TESTSETINT(a, i)
Definition: grammar.cc:178
#define IDPROC(a)
Definition: ipid.h:139
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
feBufferTypes
Definition: fevoices.h:16
#define YYLEX
Definition: grammar.cc:1633
ring * iiLocalRing
Definition: iplib.cc:515
char name(const Variable &v)
Definition: variable.h:95
#define YYLAST
Definition: grammar.cc:582
#define NULL
Definition: omList.c:10
package req_packhdl
Definition: subexpr.h:107
#define YYDPRINTF(Args)
Definition: grammar.cc:1644
#define YYTABLE_NINF
Definition: grammar.cc:980
Voice * currentVoice
Definition: fevoices.cc:57
void killhdl(idhdl h, package proot)
Definition: ipid.cc:372
package basePack
Definition: ipid.cc:64
BOOLEAN iiAlias(leftv p)
Definition: ipid.cc:745
void yyerror(const char *fmt)
Definition: grammar.cc:188
#define IDRING(a)
Definition: ipid.h:126
#define pDelete(p_ptr)
Definition: polys.h:157
package currPack
Definition: ipid.cc:63
#define YYINITDEPTH
Definition: grammar.cc:1802
ring cRing
Definition: ipid.h:61
int rtyp
Definition: subexpr.h:92
sleftv sLastPrinted
Definition: subexpr.cc:55
void CleanUp(ring r=currRing)
Definition: subexpr.cc:321
void * Data()
Definition: subexpr.cc:1118
#define YYSIZE_T
Definition: grammar.cc:408
void newBuffer(char *s, feBufferTypes t, procinfo *pi, int lineno)
Definition: fevoices.cc:171
#define YYMAXDEPTH
Definition: grammar.cc:167
BOOLEAN newFile(char *fname, FILE *f)
Definition: fevoices.cc:129
BOOLEAN iiARROW(leftv r, char *a, char *s)
Definition: ipshell.cc:6400
#define YY_(msgid)
Definition: grammar.cc:424
static const yytype_int16 yytable[]
Definition: grammar.cc:981
static const yytype_int16 yydefgoto[]
Definition: grammar.cc:910
static const yytype_int16 yycheck[]
Definition: grammar.cc:1236
Definition: tok.h:159
int rtimerv
Definition: timer.cc:148
static const yytype_uint8 yyr1[]
Definition: grammar.cc:817
polyrec * poly
Definition: hilb.h:10
void rSetHdl(idhdl h)
Definition: ipshell.cc:5030
void startTimer()
Definition: timer.cc:82
static Poly * h
Definition: janet.cc:978
const poly b
Definition: syzextra.cc:213
BOOLEAN iiExprArith2(leftv res, leftv a, int op, leftv b, BOOLEAN proccall)
Definition: iparith.cc:8227
#define YYPACT_NINF
Definition: grammar.cc:921
#define NONE
Definition: tok.h:220
void syMake(leftv v, const char *id, package pa)
Definition: subexpr.cc:1481
YYSTYPE yylval
BOOLEAN iiApply(leftv res, leftv a, int op, leftv proc)
Definition: ipshell.cc:6351
char trace_flag
Definition: subexpr.h:61
#define V_REDEFINE
Definition: options.h:43
void Werror(const char *fmt,...)
Definition: reporter.cc:199
#define YYID(n)
Definition: grammar.cc:437
void * CopyD(int t)
Definition: subexpr.cc:676
BOOLEAN expected_parms
Definition: grammar.cc:174
const char * lastreserved
Definition: ipshell.cc:81
#define YYEOF
Definition: grammar.cc:1540
int l
Definition: cfEzgcd.cc:94
void writeRTime(const char *v)
Definition: timer.cc:195
#define YYERROR
Definition: grammar.cc:1544
void feHelp(char *str)
Definition: fehelp.cc:103
#define IDMATRIX(a)
Definition: ipid.h:133
#define COMMAND
Definition: tok.h:33
utypes data
Definition: idrec.h:40
ListNode * next
Definition: janet.h:31
BOOLEAN iiAssign(leftv l, leftv r, BOOLEAN toplevel)
Definition: ipassign.cc:1783
#define Warn
Definition: emacs.cc:80
static const yytype_uint8 yystos[]
Definition: grammar.cc:1493
BOOLEAN contBuffer(feBufferTypes typ)
Definition: fevoices.cc:309
#define omStrDup(s)
Definition: omAllocDecl.h:263

Variable Documentation

int cmdtok

Definition at line 175 of file grammar.cc.

const char* currid

Definition at line 172 of file grammar.cc.

BOOLEAN expected_parms

Definition at line 174 of file grammar.cc.

int inerror = 0

Definition at line 176 of file grammar.cc.

const yytype_int16 yycheck[]
static

Definition at line 1236 of file grammar.cc.

int yydebug

Definition at line 1791 of file grammar.cc.

const yytype_uint8 yydefact[]
static

Definition at line 865 of file grammar.cc.

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 1, 55, 56, 57, 58, 59, 60, 145, 62,
219, 63, 64, 247, 65, 66, 67, 68, 69, 189,
370, 371, 381, 372, 173, 98, 71, 225, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
84, 85, 86, 87, 88
}

Definition at line 910 of file grammar.cc.

FILE* yyin
BOOLEAN yyInRingConstruction =FALSE

Definition at line 173 of file grammar.cc.

int yylineno

Definition at line 45 of file febase.cc.

const yytype_int16 yypact[]
static

Definition at line 922 of file grammar.cc.

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-365, -365, -365, -365, -365, -365, -365, -4, -1, 48,
-365, -365, -365, -170, -365, -365, 399, 360, 312, -233,
-365, -364, 17, 31, 232, 0, -365, -365, -365, -365,
-365, -365, -365, -365, -365, -365, -365, -365, -365, -365,
-365, -365, -365, -365, -365
}

Definition at line 967 of file grammar.cc.

const yytype_uint16 yyprhs[]
static
Initial value:
=
{
0, 0, 3, 4, 7, 9, 12, 15, 17, 19,
21, 24, 26, 28, 30, 32, 34, 36, 38, 40,
43, 45, 47, 49, 51, 53, 55, 57, 59, 61,
64, 66, 68, 72, 76, 80, 85, 89, 91, 93,
95, 100, 105, 110, 114, 119, 124, 128, 133, 138,
143, 148, 155, 162, 169, 176, 185, 194, 203, 212,
216, 221, 230, 235, 244, 249, 253, 257, 259, 261,
263, 267, 274, 279, 286, 293, 300, 307, 314, 321,
325, 331, 337, 338, 344, 347, 350, 352, 355, 358,
362, 366, 370, 374, 378, 382, 386, 390, 394, 398,
401, 404, 407, 410, 412, 416, 419, 422, 425, 428,
437, 440, 444, 447, 449, 451, 457, 459, 461, 466,
468, 472, 474, 478, 480, 482, 484, 486, 487, 492,
496, 499, 503, 506, 509, 513, 518, 523, 528, 533,
538, 543, 548, 553, 560, 567, 574, 581, 588, 595,
602, 606, 608, 617, 620, 625, 628, 630, 632, 635,
638, 640, 646, 649, 655, 657, 659, 663, 669, 673,
677, 682, 685, 688, 693
}

Definition at line 643 of file grammar.cc.

const yytype_uint8 yyr1[]
static
Initial value:
=
{
0, 103, 104, 104, 105, 105, 105, 105, 105, 105,
105, 106, 106, 106, 106, 106, 106, 106, 106, 107,
108, 108, 108, 108, 108, 108, 108, 108, 108, 109,
110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
110, 110, 110, 110, 110, 110, 110, 110, 110, 110,
110, 110, 110, 110, 110, 110, 111, 111, 112, 112,
112, 112, 112, 112, 112, 112, 112, 112, 112, 112,
112, 112, 113, 112, 114, 115, 116, 117, 117, 117,
117, 117, 117, 117, 117, 117, 117, 117, 117, 117,
117, 118, 118, 119, 119, 120, 120, 120, 120, 120,
120, 120, 120, 121, 122, 122, 123, 124, 124, 125,
125, 126, 126, 127, 128, 128, 128, 130, 129, 131,
131, 132, 133, 134, 134, 135, 135, 135, 135, 135,
135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
135, 136, 137, 137, 137, 138, 139, 139, 140, 141,
141, 142, 142, 142, 142, 142, 143, 144, 145, 145,
145, 146, 146, 147, 147
}

Definition at line 817 of file grammar.cc.

const yytype_uint8 yyr2[]
static
Initial value:
=
{
0, 2, 0, 2, 1, 2, 2, 1, 1, 1,
2, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 1, 3, 3, 3, 4, 3, 1, 1, 1,
4, 4, 4, 3, 4, 4, 3, 4, 4, 4,
4, 6, 6, 6, 6, 8, 8, 8, 8, 3,
4, 8, 4, 8, 4, 3, 3, 1, 1, 1,
3, 6, 4, 6, 6, 6, 6, 6, 6, 3,
5, 5, 0, 5, 2, 2, 1, 2, 2, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
2, 2, 2, 1, 3, 2, 2, 2, 2, 8,
2, 3, 2, 1, 1, 5, 1, 1, 4, 1,
3, 1, 3, 1, 1, 1, 1, 0, 4, 3,
2, 3, 2, 2, 3, 4, 4, 4, 4, 4,
4, 4, 4, 6, 6, 6, 6, 6, 6, 6,
3, 1, 8, 2, 4, 2, 1, 1, 2, 2,
1, 5, 2, 5, 1, 1, 3, 5, 3, 3,
4, 2, 2, 4, 3
}

Definition at line 840 of file grammar.cc.

const yytype_int16 yyrhs[]
static

Definition at line 666 of file grammar.cc.

const yytype_uint16 yyrline[]
static
Initial value:
=
{
0, 316, 316, 318, 352, 353, 355, 357, 361, 366,
368, 419, 420, 421, 422, 423, 424, 425, 426, 430,
433, 434, 435, 436, 437, 438, 439, 440, 441, 444,
451, 456, 460, 464, 468, 472, 485, 513, 537, 543,
549, 553, 557, 561, 565, 569, 573, 577, 581, 585,
589, 593, 597, 601, 605, 609, 613, 617, 621, 625,
629, 635, 639, 643, 647, 651, 658, 669, 675, 680,
681, 682, 686, 690, 694, 698, 702, 706, 710, 714,
718, 735, 742, 741, 759, 767, 775, 784, 788, 792,
796, 800, 804, 808, 812, 816, 820, 824, 828, 832,
844, 851, 852, 871, 872, 884, 889, 894, 898, 902,
938, 964, 985, 993, 997, 998, 1012, 1020, 1029, 1074,
1075, 1084, 1085, 1091, 1098, 1100, 1102, 1112, 1111, 1119,
1124, 1131, 1139, 1151, 1167, 1186, 1190, 1194, 1199, 1203,
1207, 1211, 1215, 1220, 1226, 1232, 1238, 1244, 1250, 1256,
1268, 1275, 1279, 1316, 1323, 1331, 1337, 1337, 1340, 1412,
1416, 1445, 1458, 1475, 1484, 1489, 1497, 1509, 1528, 1538,
1557, 1580, 1586, 1598, 1604
}

Definition at line 741 of file grammar.cc.

const yytype_uint8 yystos[]
static

Definition at line 1493 of file grammar.cc.

const yytype_int16 yytable[]
static

Definition at line 981 of file grammar.cc.

const char* const yytname[]
static
Initial value:
=
{
"$end", "error", "$undefined", "DOTDOT", "EQUAL_EQUAL", "GE", "LE",
"MINUSMINUS", "NOT", "NOTEQUAL", "PLUSPLUS", "COLONCOLON", "ARROW",
"GRING_CMD", "BIGINTMAT_CMD", "INTMAT_CMD", "PROC_CMD", "RING_CMD",
"BEGIN_RING", "IDEAL_CMD", "MAP_CMD", "MATRIX_CMD", "MODUL_CMD",
"NUMBER_CMD", "POLY_CMD", "RESOLUTION_CMD", "VECTOR_CMD", "BETTI_CMD",
"E_CMD", "FETCH_CMD", "FREEMODULE_CMD", "KEEPRING_CMD", "IMAP_CMD",
"KOSZUL_CMD", "MAXID_CMD", "MONOM_CMD", "PAR_CMD", "PREIMAGE_CMD",
"VAR_CMD", "VALTVARS", "VMAXDEG", "VMAXMULT", "VNOETHER", "VMINPOLY",
"END_RING", "CMD_1", "CMD_2", "CMD_3", "CMD_12", "CMD_13", "CMD_23",
"CMD_123", "CMD_M", "ROOT_DECL", "ROOT_DECL_LIST", "RING_DECL",
"RING_DECL_LIST", "EXAMPLE_CMD", "EXPORT_CMD", "HELP_CMD", "KILL_CMD",
"LIB_CMD", "LISTVAR_CMD", "SETRING_CMD", "TYPE_CMD", "STRINGTOK",
"BLOCKTOK", "INT_CONST", "UNKNOWN_IDENT", "RINGVAR", "PROC_DEF", "APPLY",
"ASSUME_CMD", "BREAK_CMD", "CONTINUE_CMD", "ELSE_CMD", "EVAL", "QUOTE",
"FOR_CMD", "IF_CMD", "SYS_BREAK", "WHILE_CMD", "RETURN", "PARAMETER",
"SYSVAR", "'='", "'<'", "'>'", "'+'", "'-'", "'/'", "'['", "']'", "'^'",
"','", "';'", "'&'", "':'", "UMINUS", "'('", "')'", "'.'", "'`'",
"$accept", "lines", "pprompt", "flowctrl", "example_dummy", "command",
"assign", "elemexpr", "exprlist", "expr", "$@1", "quote_start",
"assume_start", "quote_end", "expr_arithmetic", "left_value",
"extendedid", "declare_ip_variable", "stringexpr", "rlist", "ordername",
"orderelem", "OrderingList", "ordering", "cmdeq", "mat_cmd", "filecmd",
"$@2", "helpcmd", "examplecmd", "exportcmd", "killcmd", "listcmd",
"ringcmd1", "ringcmd", "scriptcmd", "setrings", "setringcmd", "typecmd",
"ifcmd", "whilecmd", "forcmd", "proccmd", "parametercmd", "returncmd", 0
}

Definition at line 767 of file grammar.cc.

const yytype_uint8 yytranslate[]
static

Definition at line 601 of file grammar.cc.