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 <Singular/grammar.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   2527
 
#define YYNTOKENS   103
 
#define YYNNTS   45
 
#define YYNRULES   175
 
#define YYNSTATES   399
 
#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

§ _STDLIB_H

#define _STDLIB_H   1

Definition at line 501 of file grammar.cc.

§ MYYERROR

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

Definition at line 185 of file grammar.cc.

§ TESTSETINT

#define TESTSETINT (   a,
  i 
)
Value:
if ((a).Typ() != INT_CMD) \
{ \
WerrorS("no int expression"); \
YYERROR; \
} \
(i) = (int)((long)(a).Data());(a).CleanUp()
const poly a
Definition: syzextra.cc:212
Definition: tok.h:95
int i
Definition: cfEzgcd.cc:123

Definition at line 177 of file grammar.cc.

§ YY_

#define YY_ (   msgid)    msgid

Definition at line 423 of file grammar.cc.

§ YY_LOCATION_PRINT

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

Definition at line 1627 of file grammar.cc.

§ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)
Value:
do { \
if (yydebug) \
yy_reduce_print (yyvsp, Rule); \
} while (YYID (0))
int yydebug
Definition: grammar.cc:1795
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1787 of file grammar.cc.

§ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)
Value:
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
} while (YYID (0))
int yydebug
Definition: grammar.cc:1795
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1749 of file grammar.cc.

§ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
Value:
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (YYID (0))
int yydebug
Definition: grammar.cc:1795
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1654 of file grammar.cc.

§ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 1547 of file grammar.cc.

§ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 1546 of file grammar.cc.

§ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))
if(0 > strat->sl)
Definition: myNF.cc:73
#define YYTRANSLATE(YYX)
Definition: grammar.cc:596
#define YYEMPTY
Definition: grammar.cc:1543
#define YY_(msgid)
Definition: grammar.cc:423
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1568 of file grammar.cc.

§ YYBISON

#define YYBISON   1

Definition at line 45 of file grammar.cc.

§ YYBISON_VERSION

#define YYBISON_VERSION   "2.4.3"

Definition at line 48 of file grammar.cc.

§ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 1542 of file grammar.cc.

§ YYDPRINTF

#define YYDPRINTF (   Args)
Value:
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (YYID (0))
int yydebug
Definition: grammar.cc:1795
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1648 of file grammar.cc.

§ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 1543 of file grammar.cc.

§ YYEOF

#define YYEOF   0

Definition at line 1544 of file grammar.cc.

§ YYERRCODE

#define YYERRCODE   256

Definition at line 1587 of file grammar.cc.

§ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 1541 of file grammar.cc.

§ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 1548 of file grammar.cc.

§ YYERROR_VERBOSE

#define YYERROR_VERBOSE   0

Definition at line 252 of file grammar.cc.

§ YYFAIL

#define YYFAIL   goto yyerrlab

Definition at line 1558 of file grammar.cc.

§ YYFINAL

#define YYFINAL   2

Definition at line 579 of file grammar.cc.

§ YYFPRINTF

#define YYFPRINTF   fprintf

Definition at line 1645 of file grammar.cc.

§ YYFREE

#define YYFREE   free

Definition at line 512 of file grammar.cc.

§ YYID

#define YYID (   n)    (n)

Definition at line 436 of file grammar.cc.

§ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1806 of file grammar.cc.

§ YYLAST

#define YYLAST   2527

Definition at line 581 of file grammar.cc.

§ YYLEX

#define YYLEX   yylex (&yylval)

Definition at line 1637 of file grammar.cc.

§ YYLLOC_DEFAULT

#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; \
} \
else \
{ \
(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))
if(0 > strat->sl)
Definition: myNF.cc:73
#define YYRHSLOC(Rhs, K)
Definition: grammar.cc:1594
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:49
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1596 of file grammar.cc.

§ YYLSP_NEEDED

#define YYLSP_NEEDED   0

Definition at line 63 of file grammar.cc.

§ YYMALLOC

#define YYMALLOC   malloc

Definition at line 505 of file grammar.cc.

§ YYMAXDEPTH

#define YYMAXDEPTH   MAX_INT_VAL

Definition at line 166 of file grammar.cc.

§ YYMAXUTOK

#define YYMAXUTOK   340

Definition at line 594 of file grammar.cc.

§ YYNNTS

#define YYNNTS   45

Definition at line 586 of file grammar.cc.

§ YYNRULES

#define YYNRULES   175

Definition at line 588 of file grammar.cc.

§ YYNSTATES

#define YYNSTATES   399

Definition at line 590 of file grammar.cc.

§ YYNTOKENS

#define YYNTOKENS   103

Definition at line 584 of file grammar.cc.

§ YYPACT_NINF

#define YYPACT_NINF   -365

Definition at line 921 of file grammar.cc.

§ YYPOPSTACK

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

§ YYPULL

#define YYPULL   1

Definition at line 60 of file grammar.cc.

§ YYPURE

#define YYPURE   1

Definition at line 54 of file grammar.cc.

§ YYPUSH

#define YYPUSH   0

Definition at line 57 of file grammar.cc.

§ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 1566 of file grammar.cc.

§ YYRHSLOC

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

Definition at line 1594 of file grammar.cc.

§ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 413 of file grammar.cc.

§ YYSIZE_T

#define YYSIZE_T   size_t

Definition at line 407 of file grammar.cc.

§ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 51 of file grammar.cc.

§ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 491 of file grammar.cc.

§ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 494 of file grammar.cc.

§ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 492 of file grammar.cc.

§ YYTABLE_NINF

#define YYTABLE_NINF   -155

Definition at line 980 of file grammar.cc.

§ YYTERROR

#define YYTERROR   1

Definition at line 1586 of file grammar.cc.

§ YYTOKEN_TABLE

#define YYTOKEN_TABLE   0

Definition at line 257 of file grammar.cc.

§ YYTOKENTYPE

#define YYTOKENTYPE

Definition at line 263 of file grammar.cc.

§ YYTRANSLATE

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

Definition at line 596 of file grammar.cc.

§ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 593 of file grammar.cc.

§ YYUSE

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

Definition at line 429 of file grammar.cc.

Typedef Documentation

§ yytype_int16

typedef short int yytype_int16

Definition at line 396 of file grammar.cc.

§ yytype_int8

typedef signed char yytype_int8

Definition at line 382 of file grammar.cc.

§ yytype_uint16

typedef unsigned short int yytype_uint16

Definition at line 390 of file grammar.cc.

§ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 375 of file grammar.cc.

Enumeration Type Documentation

§ yytokentype

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 266 of file grammar.cc.

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

Function Documentation

§ yy_reduce_print()

static void yy_reduce_print ( YYSTYPE yyvsp,
int  yyrule 
)
static

Definition at line 1763 of file grammar.cc.

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

§ yy_stack_print()

static void yy_stack_print ( yytype_int16 yybottom,
yytype_int16 yytop 
)
static

Definition at line 1732 of file grammar.cc.

1739 {
1740  YYFPRINTF (stderr, "Stack now");
1741  for (; yybottom <= yytop; yybottom++)
1742  {
1743  int yybot = *yybottom;
1744  YYFPRINTF (stderr, " %d", yybot);
1745  }
1746  YYFPRINTF (stderr, "\n");
1747 }
#define YYFPRINTF
Definition: grammar.cc:1645

§ yy_symbol_print()

static void yy_symbol_print ( FILE *  yyoutput,
int  yytype,
YYSTYPE const *const  yyvaluep 
)
static

Definition at line 1706 of file grammar.cc.

1714 {
1715  if (yytype < YYNTOKENS)
1716  YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1717  else
1718  YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1719 
1720  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1721  YYFPRINTF (yyoutput, ")");
1722 }
#define YYFPRINTF
Definition: grammar.cc:1645
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: grammar.cc:1674
#define YYNTOKENS
Definition: grammar.cc:584
static const char *const yytname[]
Definition: grammar.cc:767

§ yy_symbol_value_print()

static void yy_symbol_value_print ( FILE *  yyoutput,
int  yytype,
YYSTYPE const *const  yyvaluep 
)
static

Definition at line 1674 of file grammar.cc.

1682 {
1683  if (!yyvaluep)
1684  return;
1685 # ifdef YYPRINT
1686  if (yytype < YYNTOKENS)
1687  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1688 # else
1689  YYUSE (yyoutput);
1690 # endif
1691  switch (yytype)
1692  {
1693  default:
1694  break;
1695  }
1696 }
#define YYUSE(e)
Definition: grammar.cc:429
#define YYNTOKENS
Definition: grammar.cc:584

§ yydestruct()

static void yydestruct ( const char *  yymsg,
int  yytype,
YYSTYPE yyvaluep 
)
static

Definition at line 2041 of file grammar.cc.

2049 {
2050  YYUSE (yyvaluep);
2051 
2052  if (!yymsg)
2053  yymsg = "Deleting";
2054  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2055 
2056  switch (yytype)
2057  {
2058 
2059  default:
2060  break;
2061  }
2062 }
#define YYUSE(e)
Definition: grammar.cc:429
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: grammar.cc:1654

§ yyerror()

void yyerror ( const char *  fmt)

Definition at line 187 of file grammar.cc.

188 {
189 
190  BOOLEAN old_errorreported=errorreported;
192  if (currid!=NULL)
193  {
194  killid(currid,&IDROOT);
195  currid = NULL;
196  }
197  if(inerror==0)
198  {
199  {
200  if ((strlen(fmt)>1)
201  && (strncmp(fmt,"parse",5)!=0)
202  && (strncmp(fmt,"syntax",6)!=0))
203  WerrorS(fmt);
204  Werror( "error occurred in or before %s line %d: `%s`"
206  }
207  if (cmdtok!=0)
208  {
209  const char *s=Tok2Cmdname(cmdtok);
210  if (expected_parms)
211  {
212  Werror("expected %s-expression. type \'help %s;\'",s,s);
213  }
214  else
215  {
216  Werror("wrong type declaration. type \'help %s;\'",s);
217  }
218  }
219  if (!old_errorreported && (lastreserved!=NULL))
220  {
221  Werror("last reserved name was `%s`",lastreserved);
222  }
223  inerror=1;
224  }
225  if ((currentVoice!=NULL)
226  && (currentVoice->prev!=NULL)
227  && (myynest>0)
228 #ifdef HAVE_SDB
229  && ((sdb_flags &1)==0)
230 #endif
231  )
232  {
233  Werror("leaving %s",VoiceName());
234  }
235 }
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:353
#define IDROOT
Definition: ipid.h:20
#define TRUE
Definition: auxiliary.h:99
void WerrorS(const char *s)
Definition: feFopen.cc:24
int inerror
Definition: grammar.cc:175
const char * currid
Definition: grammar.cc:171
int myynest
Definition: febase.cc:46
char my_yylinebuf[80]
Definition: febase.cc:48
int cmdtok
Definition: grammar.cc:174
#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:130
int yylineno
Definition: febase.cc:45
Voice * currentVoice
Definition: fevoices.cc:57
int BOOLEAN
Definition: auxiliary.h:86
void Werror(const char *fmt,...)
Definition: reporter.cc:189
BOOLEAN expected_parms
Definition: grammar.cc:173
const char * lastreserved
Definition: ipshell.cc:82

§ yyparse()

int yyparse ( void  )

Definition at line 2101 of file grammar.cc.

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

Variable Documentation

§ cmdtok

int cmdtok

Definition at line 174 of file grammar.cc.

§ currid

const char* currid

Definition at line 171 of file grammar.cc.

§ expected_parms

BOOLEAN expected_parms

Definition at line 173 of file grammar.cc.

§ inerror

int inerror = 0

Definition at line 175 of file grammar.cc.

§ yycheck

const yytype_int16 yycheck[]
static

Definition at line 1238 of file grammar.cc.

§ yydebug

int yydebug

Definition at line 1795 of file grammar.cc.

§ yydefact

const yytype_uint8 yydefact[]
static

Definition at line 865 of file grammar.cc.

§ yydefgoto

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,
372, 373, 384, 374, 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.

§ yyin

FILE* yyin

§ yyInRingConstruction

BOOLEAN yyInRingConstruction =FALSE

Definition at line 172 of file grammar.cc.

§ yylineno

int yylineno

Definition at line 45 of file febase.cc.

§ yypact

const yytype_int16 yypact[]
static

Definition at line 922 of file grammar.cc.

§ yypgoto

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-365, -365, -365, -365, -365, -365, -365, 118, -1, 52,
-365, -365, -365, 77, -365, -365, 342, 311, 242, -235,
-365, -364, -33, -14, 196, 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.

§ yyprhs

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, 633, 636, 638, 640,
643, 646, 648, 654, 657, 663, 665, 667, 671, 677,
681, 685, 690, 693, 696, 701
}

Definition at line 642 of file grammar.cc.

§ yyr1

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, 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.

§ yyr2

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, 7, 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.

§ yyrhs

const yytype_int16 yyrhs[]
static

Definition at line 665 of file grammar.cc.

§ yyrline

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, 1328, 1345, 1351, 1351, 1354,
1422, 1426, 1455, 1468, 1485, 1494, 1499, 1507, 1519, 1538,
1548, 1567, 1590, 1596, 1608, 1614
}

Definition at line 741 of file grammar.cc.

§ yystos

const yytype_uint8 yystos[]
static

Definition at line 1497 of file grammar.cc.

§ yytable

const yytype_int16 yytable[]
static

Definition at line 981 of file grammar.cc.

§ yytname

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.

§ yytranslate

const yytype_uint8 yytranslate[]
static

Definition at line 600 of file grammar.cc.