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, NUM = 258, NEG = 259
}
 

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
int yychar
Definition: readcf.cc:1013
#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 
NUM 
NEG 

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:350
#define IDROOT
Definition: ipid.h:20
#define TRUE
Definition: auxiliary.h:98
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:62
#define NULL
Definition: omList.c:10
const char * Tok2Cmdname(int tok)
Definition: gentable.cc:132
int yylineno
Definition: febase.cc:45
Voice * currentVoice
Definition: fevoices.cc:57
int BOOLEAN
Definition: auxiliary.h:85
void Werror(const char *fmt,...)
Definition: reporter.cc:189
BOOLEAN expected_parms
Definition: grammar.cc:173
const char * lastreserved
Definition: ipshell.cc:80

◆ 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).next==NULL)
2562  {
2563  (yyvsp[(1) - (4)].lv).next=(leftv)omAllocBin(sleftv_bin);
2564  memcpy((yyvsp[(1) - (4)].lv).next,&(yyvsp[(3) - (4)].lv),sizeof(sleftv));
2565  if(iiExprArithM(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'(')) YYERROR;
2566  }
2567  else if ((yyvsp[(1) - (4)].lv).rtyp==UNKNOWN)
2568  { // for x(i)(j)
2569  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'(',&(yyvsp[(3) - (4)].lv))) YYERROR;
2570  }
2571  else YYERROR;
2572  ;}
2573  break;
2574 
2575  case 36:
2576 
2577 /* Line 1464 of yacc.c */
2578 #line 487 "grammar.y"
2579  {
2580  if (currRingHdl==NULL) MYYERROR("no ring active");
2581  int j = 0;
2582  memset(&(yyval.lv),0,sizeof(sleftv));
2583  (yyval.lv).rtyp=VECTOR_CMD;
2584  leftv v = &(yyvsp[(2) - (3)].lv);
2585  while (v!=NULL)
2586  {
2587  int i,t;
2588  sleftv tmp;
2589  memset(&tmp,0,sizeof(tmp));
2590  i=iiTestConvert((t=v->Typ()),POLY_CMD);
2591  if((i==0) || (iiConvert(t /*v->Typ()*/,POLY_CMD,i,v,&tmp)))
2592  {
2593  pDelete((poly *)&(yyval.lv).data);
2594  (yyvsp[(2) - (3)].lv).CleanUp();
2595  MYYERROR("expected '[poly,...'");
2596  }
2597  poly p = (poly)tmp.CopyD(POLY_CMD);
2598  pSetCompP(p,++j);
2599  (yyval.lv).data = (void *)pAdd((poly)(yyval.lv).data,p);
2600  v->next=tmp.next;tmp.next=NULL;
2601  tmp.CleanUp();
2602  v=v->next;
2603  }
2604  (yyvsp[(2) - (3)].lv).CleanUp();
2605  ;}
2606  break;
2607 
2608  case 37:
2609 
2610 /* Line 1464 of yacc.c */
2611 #line 515 "grammar.y"
2612  {
2613  memset(&(yyval.lv),0,sizeof((yyval.lv)));
2614  int i = atoi((yyvsp[(1) - (1)].name));
2615  /*remember not to omFree($1)
2616  *because it is a part of the scanner buffer*/
2617  (yyval.lv).rtyp = INT_CMD;
2618  (yyval.lv).data = (void *)(long)i;
2619 
2620  /* check: out of range input */
2621  int l = strlen((yyvsp[(1) - (1)].name))+2;
2622  number n;
2623  if (l >= MAX_INT_LEN)
2624  {
2625  char tmp[MAX_INT_LEN+5];
2626  sprintf(tmp,"%d",i);
2627  if (strcmp(tmp,(yyvsp[(1) - (1)].name))!=0)
2628  {
2629  n_Read((yyvsp[(1) - (1)].name),&n,coeffs_BIGINT);
2630  (yyval.lv).rtyp=BIGINT_CMD;
2631  (yyval.lv).data = n;
2632  }
2633  }
2634  ;}
2635  break;
2636 
2637  case 38:
2638 
2639 /* Line 1464 of yacc.c */
2640 #line 539 "grammar.y"
2641  {
2642  memset(&(yyval.lv),0,sizeof((yyval.lv)));
2643  (yyval.lv).rtyp = (yyvsp[(1) - (1)].i);
2644  (yyval.lv).data = (yyval.lv).Data();
2645  ;}
2646  break;
2647 
2648  case 39:
2649 
2650 /* Line 1464 of yacc.c */
2651 #line 545 "grammar.y"
2652  {
2653  memset(&(yyval.lv),0,sizeof((yyval.lv)));
2654  (yyval.lv).rtyp = STRING_CMD;
2655  (yyval.lv).data = (yyvsp[(1) - (1)].name);
2656  ;}
2657  break;
2658 
2659  case 40:
2660 
2661 /* Line 1464 of yacc.c */
2662 #line 551 "grammar.y"
2663  {
2664  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2665  ;}
2666  break;
2667 
2668  case 41:
2669 
2670 /* Line 1464 of yacc.c */
2671 #line 555 "grammar.y"
2672  {
2673  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2674  ;}
2675  break;
2676 
2677  case 42:
2678 
2679 /* Line 1464 of yacc.c */
2680 #line 559 "grammar.y"
2681  {
2682  if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2683  ;}
2684  break;
2685 
2686  case 43:
2687 
2688 /* Line 1464 of yacc.c */
2689 #line 563 "grammar.y"
2690  {
2691  if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR;
2692  ;}
2693  break;
2694 
2695  case 44:
2696 
2697 /* Line 1464 of yacc.c */
2698 #line 567 "grammar.y"
2699  {
2700  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2701  ;}
2702  break;
2703 
2704  case 45:
2705 
2706 /* Line 1464 of yacc.c */
2707 #line 571 "grammar.y"
2708  {
2709  if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2710  ;}
2711  break;
2712 
2713  case 46:
2714 
2715 /* Line 1464 of yacc.c */
2716 #line 575 "grammar.y"
2717  {
2718  if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR;
2719  ;}
2720  break;
2721 
2722  case 47:
2723 
2724 /* Line 1464 of yacc.c */
2725 #line 579 "grammar.y"
2726  {
2727  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2728  ;}
2729  break;
2730 
2731  case 48:
2732 
2733 /* Line 1464 of yacc.c */
2734 #line 583 "grammar.y"
2735  {
2736  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2737  ;}
2738  break;
2739 
2740  case 49:
2741 
2742 /* Line 1464 of yacc.c */
2743 #line 587 "grammar.y"
2744  {
2745  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2746  ;}
2747  break;
2748 
2749  case 50:
2750 
2751 /* Line 1464 of yacc.c */
2752 #line 591 "grammar.y"
2753  {
2754  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2755  ;}
2756  break;
2757 
2758  case 51:
2759 
2760 /* Line 1464 of yacc.c */
2761 #line 595 "grammar.y"
2762  {
2763  if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
2764  ;}
2765  break;
2766 
2767  case 52:
2768 
2769 /* Line 1464 of yacc.c */
2770 #line 599 "grammar.y"
2771  {
2772  if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
2773  ;}
2774  break;
2775 
2776  case 53:
2777 
2778 /* Line 1464 of yacc.c */
2779 #line 603 "grammar.y"
2780  {
2781  if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
2782  ;}
2783  break;
2784 
2785  case 54:
2786 
2787 /* Line 1464 of yacc.c */
2788 #line 607 "grammar.y"
2789  {
2790  if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
2791  ;}
2792  break;
2793 
2794  case 55:
2795 
2796 /* Line 1464 of yacc.c */
2797 #line 611 "grammar.y"
2798  {
2799  if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2800  ;}
2801  break;
2802 
2803  case 56:
2804 
2805 /* Line 1464 of yacc.c */
2806 #line 615 "grammar.y"
2807  {
2808  if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2809  ;}
2810  break;
2811 
2812  case 57:
2813 
2814 /* Line 1464 of yacc.c */
2815 #line 619 "grammar.y"
2816  {
2817  if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2818  ;}
2819  break;
2820 
2821  case 58:
2822 
2823 /* Line 1464 of yacc.c */
2824 #line 623 "grammar.y"
2825  {
2826  if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2827  ;}
2828  break;
2829 
2830  case 59:
2831 
2832 /* Line 1464 of yacc.c */
2833 #line 627 "grammar.y"
2834  {
2835  if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR;
2836  ;}
2837  break;
2838 
2839  case 60:
2840 
2841 /* Line 1464 of yacc.c */
2842 #line 631 "grammar.y"
2843  {
2844  int b=iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i)); // handle branchTo
2845  if (b==TRUE) YYERROR;
2846  if (b==2) YYACCEPT;
2847  ;}
2848  break;
2849 
2850  case 61:
2851 
2852 /* Line 1464 of yacc.c */
2853 #line 637 "grammar.y"
2854  {
2855  if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2856  ;}
2857  break;
2858 
2859  case 62:
2860 
2861 /* Line 1464 of yacc.c */
2862 #line 641 "grammar.y"
2863  {
2864  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
2865  ;}
2866  break;
2867 
2868  case 63:
2869 
2870 /* Line 1464 of yacc.c */
2871 #line 645 "grammar.y"
2872  {
2873  if(iiExprArith3(&(yyval.lv),RING_CMD,&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
2874  ;}
2875  break;
2876 
2877  case 64:
2878 
2879 /* Line 1464 of yacc.c */
2880 #line 649 "grammar.y"
2881  {
2882  if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),RING_CMD)) YYERROR;
2883  ;}
2884  break;
2885 
2886  case 65:
2887 
2888 /* Line 1464 of yacc.c */
2889 #line 653 "grammar.y"
2890  {
2891  if (iiARROW(&(yyval.lv),(yyvsp[(1) - (3)].name),(yyvsp[(3) - (3)].name))) YYERROR;
2892  ;}
2893  break;
2894 
2895  case 66:
2896 
2897 /* Line 1464 of yacc.c */
2898 #line 656 "grammar.y"
2899  { (yyval.lv) = (yyvsp[(2) - (3)].lv); ;}
2900  break;
2901 
2902  case 67:
2903 
2904 /* Line 1464 of yacc.c */
2905 #line 661 "grammar.y"
2906  {
2907  leftv v = &(yyvsp[(1) - (3)].lv);
2908  while (v->next!=NULL)
2909  {
2910  v=v->next;
2911  }
2913  memcpy(v->next,&((yyvsp[(3) - (3)].lv)),sizeof(sleftv));
2914  (yyval.lv) = (yyvsp[(1) - (3)].lv);
2915  ;}
2916  break;
2917 
2918  case 68:
2919 
2920 /* Line 1464 of yacc.c */
2921 #line 672 "grammar.y"
2922  {
2923  (yyval.lv) = (yyvsp[(1) - (1)].lv);
2924  ;}
2925  break;
2926 
2927  case 69:
2928 
2929 /* Line 1464 of yacc.c */
2930 #line 678 "grammar.y"
2931  {
2932  /*if ($1.typ == eunknown) YYERROR;*/
2933  (yyval.lv) = (yyvsp[(1) - (1)].lv);
2934  ;}
2935  break;
2936 
2937  case 70:
2938 
2939 /* Line 1464 of yacc.c */
2940 #line 682 "grammar.y"
2941  { (yyval.lv) = (yyvsp[(1) - (1)].lv); ;}
2942  break;
2943 
2944  case 71:
2945 
2946 /* Line 1464 of yacc.c */
2947 #line 684 "grammar.y"
2948  {
2949  if(iiExprArith3(&(yyval.lv),'[',&(yyvsp[(1) - (6)].lv),&(yyvsp[(3) - (6)].lv),&(yyvsp[(5) - (6)].lv))) YYERROR;
2950  ;}
2951  break;
2952 
2953  case 72:
2954 
2955 /* Line 1464 of yacc.c */
2956 #line 688 "grammar.y"
2957  {
2958  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'[',&(yyvsp[(3) - (4)].lv))) YYERROR;
2959  ;}
2960  break;
2961 
2962  case 73:
2963 
2964 /* Line 1464 of yacc.c */
2965 #line 692 "grammar.y"
2966  {
2967  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
2968  ;}
2969  break;
2970 
2971  case 74:
2972 
2973 /* Line 1464 of yacc.c */
2974 #line 696 "grammar.y"
2975  {
2976  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
2977  ;}
2978  break;
2979 
2980  case 75:
2981 
2982 /* Line 1464 of yacc.c */
2983 #line 700 "grammar.y"
2984  {
2985  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
2986  ;}
2987  break;
2988 
2989  case 76:
2990 
2991 /* Line 1464 of yacc.c */
2992 #line 704 "grammar.y"
2993  {
2994  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
2995  ;}
2996  break;
2997 
2998  case 77:
2999 
3000 /* Line 1464 of yacc.c */
3001 #line 708 "grammar.y"
3002  {
3003  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
3004  ;}
3005  break;
3006 
3007  case 78:
3008 
3009 /* Line 1464 of yacc.c */
3010 #line 712 "grammar.y"
3011  {
3012  if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), 0, &(yyvsp[(5) - (6)].lv))) YYERROR;
3013  ;}
3014  break;
3015 
3016  case 79:
3017 
3018 /* Line 1464 of yacc.c */
3019 #line 716 "grammar.y"
3020  {
3021  (yyval.lv)=(yyvsp[(2) - (3)].lv);
3022  ;}
3023  break;
3024 
3025  case 80:
3026 
3027 /* Line 1464 of yacc.c */
3028 #line 720 "grammar.y"
3029  {
3030  #ifdef SIQ
3031  siq++;
3032  if (siq>0)
3033  { if (iiExprArith2(&(yyval.lv),&(yyvsp[(2) - (5)].lv),'=',&(yyvsp[(4) - (5)].lv))) YYERROR; }
3034  else
3035  #endif
3036  {
3037  memset(&(yyval.lv),0,sizeof((yyval.lv)));
3038  (yyval.lv).rtyp=NONE;
3039  if (iiAssign(&(yyvsp[(2) - (5)].lv),&(yyvsp[(4) - (5)].lv))) YYERROR;
3040  }
3041  #ifdef SIQ
3042  siq--;
3043  #endif
3044  ;}
3045  break;
3046 
3047  case 81:
3048 
3049 /* Line 1464 of yacc.c */
3050 #line 737 "grammar.y"
3051  {
3052  iiTestAssume(&(yyvsp[(2) - (5)].lv),&(yyvsp[(4) - (5)].lv));
3053  memset(&(yyval.lv),0,sizeof((yyval.lv)));
3054  (yyval.lv).rtyp=NONE;
3055  ;}
3056  break;
3057 
3058  case 82:
3059 
3060 /* Line 1464 of yacc.c */
3061 #line 743 "grammar.y"
3062  {
3063  #ifdef SIQ
3064  siq--;
3065  #endif
3066  ;}
3067  break;
3068 
3069  case 83:
3070 
3071 /* Line 1464 of yacc.c */
3072 #line 749 "grammar.y"
3073  {
3074  #ifdef SIQ
3075  if (siq<=0) (yyvsp[(4) - (5)].lv).Eval();
3076  #endif
3077  (yyval.lv)=(yyvsp[(4) - (5)].lv);
3078  #ifdef SIQ
3079  siq++;
3080  #endif
3081  ;}
3082  break;
3083 
3084  case 84:
3085 
3086 /* Line 1464 of yacc.c */
3087 #line 761 "grammar.y"
3088  {
3089  #ifdef SIQ
3090  siq++;
3091  #endif
3092  ;}
3093  break;
3094 
3095  case 85:
3096 
3097 /* Line 1464 of yacc.c */
3098 #line 769 "grammar.y"
3099  {
3100  #ifdef SIQ
3101  siq++;
3102  #endif
3103  ;}
3104  break;
3105 
3106  case 86:
3107 
3108 /* Line 1464 of yacc.c */
3109 #line 777 "grammar.y"
3110  {
3111  #ifdef SIQ
3112  siq--;
3113  #endif
3114  ;}
3115  break;
3116 
3117  case 87:
3118 
3119 /* Line 1464 of yacc.c */
3120 #line 786 "grammar.y"
3121  {
3122  if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (2)].lv),PLUSPLUS)) YYERROR;
3123  ;}
3124  break;
3125 
3126  case 88:
3127 
3128 /* Line 1464 of yacc.c */
3129 #line 790 "grammar.y"
3130  {
3131  if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (2)].lv),MINUSMINUS)) YYERROR;
3132  ;}
3133  break;
3134 
3135  case 89:
3136 
3137 /* Line 1464 of yacc.c */
3138 #line 794 "grammar.y"
3139  {
3140  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'+',&(yyvsp[(3) - (3)].lv))) YYERROR;
3141  ;}
3142  break;
3143 
3144  case 90:
3145 
3146 /* Line 1464 of yacc.c */
3147 #line 798 "grammar.y"
3148  {
3149  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'-',&(yyvsp[(3) - (3)].lv))) YYERROR;
3150  ;}
3151  break;
3152 
3153  case 91:
3154 
3155 /* Line 1464 of yacc.c */
3156 #line 802 "grammar.y"
3157  {
3158  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR;
3159  ;}
3160  break;
3161 
3162  case 92:
3163 
3164 /* Line 1464 of yacc.c */
3165 #line 806 "grammar.y"
3166  {
3167  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'^',&(yyvsp[(3) - (3)].lv))) YYERROR;
3168  ;}
3169  break;
3170 
3171  case 93:
3172 
3173 /* Line 1464 of yacc.c */
3174 #line 810 "grammar.y"
3175  {
3176  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR;
3177  ;}
3178  break;
3179 
3180  case 94:
3181 
3182 /* Line 1464 of yacc.c */
3183 #line 814 "grammar.y"
3184  {
3185  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR;
3186  ;}
3187  break;
3188 
3189  case 95:
3190 
3191 /* Line 1464 of yacc.c */
3192 #line 818 "grammar.y"
3193  {
3194  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),NOTEQUAL,&(yyvsp[(3) - (3)].lv))) YYERROR;
3195  ;}
3196  break;
3197 
3198  case 96:
3199 
3200 /* Line 1464 of yacc.c */
3201 #line 822 "grammar.y"
3202  {
3203  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),EQUAL_EQUAL,&(yyvsp[(3) - (3)].lv))) YYERROR;
3204  ;}
3205  break;
3206 
3207  case 97:
3208 
3209 /* Line 1464 of yacc.c */
3210 #line 826 "grammar.y"
3211  {
3212  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),DOTDOT,&(yyvsp[(3) - (3)].lv))) YYERROR;
3213  ;}
3214  break;
3215 
3216  case 98:
3217 
3218 /* Line 1464 of yacc.c */
3219 #line 830 "grammar.y"
3220  {
3221  if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),':',&(yyvsp[(3) - (3)].lv))) YYERROR;
3222  ;}
3223  break;
3224 
3225  case 99:
3226 
3227 /* Line 1464 of yacc.c */
3228 #line 834 "grammar.y"
3229  {
3230  if (siq>0)
3231  { if (iiExprArith1(&(yyval.lv),&(yyvsp[(2) - (2)].lv),NOT)) YYERROR; }
3232  else
3233  {
3234  memset(&(yyval.lv),0,sizeof((yyval.lv)));
3235  int i; TESTSETINT((yyvsp[(2) - (2)].lv),i);
3236  (yyval.lv).rtyp = INT_CMD;
3237  (yyval.lv).data = (void *)(long)(i == 0 ? 1 : 0);
3238  }
3239  ;}
3240  break;
3241 
3242  case 100:
3243 
3244 /* Line 1464 of yacc.c */
3245 #line 846 "grammar.y"
3246  {
3247  if(iiExprArith1(&(yyval.lv),&(yyvsp[(2) - (2)].lv),'-')) YYERROR;
3248  ;}
3249  break;
3250 
3251  case 101:
3252 
3253 /* Line 1464 of yacc.c */
3254 #line 852 "grammar.y"
3255  { (yyval.lv) = (yyvsp[(1) - (2)].lv); ;}
3256  break;
3257 
3258  case 102:
3259 
3260 /* Line 1464 of yacc.c */
3261 #line 854 "grammar.y"
3262  {
3263  if ((yyvsp[(1) - (2)].lv).rtyp==0)
3264  {
3265  Werror("`%s` is undefined",(yyvsp[(1) - (2)].lv).Fullname());
3266  YYERROR;
3267  }
3268  else if (((yyvsp[(1) - (2)].lv).rtyp==MODUL_CMD)
3269  // matrix m; m[2]=...
3270  && ((yyvsp[(1) - (2)].lv).e!=NULL) && ((yyvsp[(1) - (2)].lv).e->next==NULL))
3271  {
3272  MYYERROR("matrix must have 2 indices");
3273  }
3274  (yyval.lv) = (yyvsp[(1) - (2)].lv);
3275  ;}
3276  break;
3277 
3278  case 104:
3279 
3280 /* Line 1464 of yacc.c */
3281 #line 874 "grammar.y"
3282  {
3283  if ((yyvsp[(2) - (3)].lv).Typ()!=STRING_CMD)
3284  {
3285  MYYERROR("string expression expected");
3286  }
3287  (yyval.name) = (char *)(yyvsp[(2) - (3)].lv).CopyD(STRING_CMD);
3288  (yyvsp[(2) - (3)].lv).CleanUp();
3289  ;}
3290  break;
3291 
3292  case 105:
3293 
3294 /* Line 1464 of yacc.c */
3295 #line 886 "grammar.y"
3296  {
3297  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
3298  YYERROR;
3299  ;}
3300  break;
3301 
3302  case 106:
3303 
3304 /* Line 1464 of yacc.c */
3305 #line 891 "grammar.y"
3306  {
3307  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
3308  YYERROR;
3309  ;}
3310  break;
3311 
3312  case 107:
3313 
3314 /* Line 1464 of yacc.c */
3315 #line 896 "grammar.y"
3316  {
3317  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR;
3318  ;}
3319  break;
3320 
3321  case 108:
3322 
3323 /* Line 1464 of yacc.c */
3324 #line 900 "grammar.y"
3325  {
3326  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR;
3327  ;}
3328  break;
3329 
3330  case 109:
3331 
3332 /* Line 1464 of yacc.c */
3333 #line 904 "grammar.y"
3334  {
3335  int r; TESTSETINT((yyvsp[(4) - (8)].lv),r);
3336  int c; TESTSETINT((yyvsp[(7) - (8)].lv),c);
3337  leftv v;
3338  idhdl h;
3339  if ((yyvsp[(1) - (8)].i) == MATRIX_CMD)
3340  {
3341  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (8)].lv),myynest,(yyvsp[(1) - (8)].i),&(currRing->idroot), TRUE)) YYERROR;
3342  v=&(yyval.lv);
3343  h=(idhdl)v->data;
3344  idDelete(&IDIDEAL(h));
3345  IDMATRIX(h) = mpNew(r,c);
3346  if (IDMATRIX(h)==NULL) YYERROR;
3347  }
3348  else if ((yyvsp[(1) - (8)].i) == INTMAT_CMD)
3349  {
3350  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (8)].lv),myynest,(yyvsp[(1) - (8)].i),&((yyvsp[(2) - (8)].lv).req_packhdl->idroot)))
3351  YYERROR;
3352  v=&(yyval.lv);
3353  h=(idhdl)v->data;
3354  delete IDINTVEC(h);
3355  IDINTVEC(h) = new intvec(r,c,0);
3356  if (IDINTVEC(h)==NULL) YYERROR;
3357  }
3358  else /* BIGINTMAT_CMD */
3359  {
3360  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (8)].lv),myynest,(yyvsp[(1) - (8)].i),&((yyvsp[(2) - (8)].lv).req_packhdl->idroot)))
3361  YYERROR;
3362  v=&(yyval.lv);
3363  h=(idhdl)v->data;
3364  delete IDBIMAT(h);
3365  IDBIMAT(h) = new bigintmat(r, c, coeffs_BIGINT);
3366  if (IDBIMAT(h)==NULL) YYERROR;
3367  }
3368  ;}
3369  break;
3370 
3371  case 110:
3372 
3373 /* Line 1464 of yacc.c */
3374 #line 940 "grammar.y"
3375  {
3376  if ((yyvsp[(1) - (2)].i) == MATRIX_CMD)
3377  {
3378  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&(currRing->idroot), TRUE)) YYERROR;
3379  }
3380  else if ((yyvsp[(1) - (2)].i) == INTMAT_CMD)
3381  {
3382  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
3383  YYERROR;
3384  leftv v=&(yyval.lv);
3385  idhdl h;
3386  do
3387  {
3388  h=(idhdl)v->data;
3389  delete IDINTVEC(h);
3390  IDINTVEC(h) = new intvec(1,1,0);
3391  v=v->next;
3392  } while (v!=NULL);
3393  }
3394  else /* BIGINTMAT_CMD */
3395  {
3396  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
3397  YYERROR;
3398  }
3399  ;}
3400  break;
3401 
3402  case 111:
3403 
3404 /* Line 1464 of yacc.c */
3405 #line 966 "grammar.y"
3406  {
3407  int t=(yyvsp[(1) - (3)].lv).Typ();
3408  sleftv r;
3409  memset(&r,0,sizeof(sleftv));
3410  if ((BEGIN_RING<t) && (t<END_RING))
3411  {
3412  if (iiDeclCommand(&r,&(yyvsp[(3) - (3)].lv),myynest,t,&(currRing->idroot), TRUE))
3413  YYERROR;
3414  }
3415  else
3416  {
3417  if (iiDeclCommand(&r,&(yyvsp[(3) - (3)].lv),myynest,t,&((yyvsp[(3) - (3)].lv).req_packhdl->idroot)))
3418  YYERROR;
3419  }
3420  leftv v=&(yyvsp[(1) - (3)].lv);
3421  while (v->next!=NULL) v=v->next;
3423  memcpy(v->next,&r,sizeof(sleftv));
3424  (yyval.lv)=(yyvsp[(1) - (3)].lv);
3425  ;}
3426  break;
3427 
3428  case 112:
3429 
3430 /* Line 1464 of yacc.c */
3431 #line 987 "grammar.y"
3432  {
3433  if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
3434  YYERROR;
3435  ;}
3436  break;
3437 
3438  case 115:
3439 
3440 /* Line 1464 of yacc.c */
3441 #line 1000 "grammar.y"
3442  {
3443  leftv v = &(yyvsp[(2) - (5)].lv);
3444  while (v->next!=NULL)
3445  {
3446  v=v->next;
3447  }
3449  memcpy(v->next,&((yyvsp[(4) - (5)].lv)),sizeof(sleftv));
3450  (yyval.lv) = (yyvsp[(2) - (5)].lv);
3451  ;}
3452  break;
3453 
3454  case 116:
3455 
3456 /* Line 1464 of yacc.c */
3457 #line 1014 "grammar.y"
3458  {
3459  // let rInit take care of any errors
3460  (yyval.i)=rOrderName((yyvsp[(1) - (1)].name));
3461  ;}
3462  break;
3463 
3464  case 117:
3465 
3466 /* Line 1464 of yacc.c */
3467 #line 1022 "grammar.y"
3468  {
3469  memset(&(yyval.lv),0,sizeof((yyval.lv)));
3470  intvec *iv = new intvec(2);
3471  (*iv)[0] = 1;
3472  (*iv)[1] = (yyvsp[(1) - (1)].i);
3473  (yyval.lv).rtyp = INTVEC_CMD;
3474  (yyval.lv).data = (void *)iv;
3475  ;}
3476  break;
3477 
3478  case 118:
3479 
3480 /* Line 1464 of yacc.c */
3481 #line 1031 "grammar.y"
3482  {
3483  memset(&(yyval.lv),0,sizeof((yyval.lv)));
3484  leftv sl = &(yyvsp[(3) - (4)].lv);
3485  int slLength;
3486  {
3487  slLength = exprlist_length(sl);
3488  int l = 2 + slLength;
3489  intvec *iv = new intvec(l);
3490  (*iv)[0] = slLength;
3491  (*iv)[1] = (yyvsp[(1) - (4)].i);
3492 
3493  int i = 2;
3494  while ((i<l) && (sl!=NULL))
3495  {
3496  if (sl->Typ() == INT_CMD)
3497  {
3498  (*iv)[i++] = (int)((long)(sl->Data()));
3499  }
3500  else if ((sl->Typ() == INTVEC_CMD)
3501  ||(sl->Typ() == INTMAT_CMD))
3502  {
3503  intvec *ivv = (intvec *)(sl->Data());
3504  int ll = 0,l = ivv->length();
3505  for (; l>0; l--)
3506  {
3507  (*iv)[i++] = (*ivv)[ll++];
3508  }
3509  }
3510  else
3511  {
3512  delete iv;
3513  (yyvsp[(3) - (4)].lv).CleanUp();
3514  MYYERROR("wrong type in ordering");
3515  }
3516  sl = sl->next;
3517  }
3518  (yyval.lv).rtyp = INTVEC_CMD;
3519  (yyval.lv).data = (void *)iv;
3520  }
3521  (yyvsp[(3) - (4)].lv).CleanUp();
3522  ;}
3523  break;
3524 
3525  case 120:
3526 
3527 /* Line 1464 of yacc.c */
3528 #line 1077 "grammar.y"
3529  {
3530  (yyval.lv) = (yyvsp[(1) - (3)].lv);
3531  (yyval.lv).next = (sleftv *)omAllocBin(sleftv_bin);
3532  memcpy((yyval.lv).next,&(yyvsp[(3) - (3)].lv),sizeof(sleftv));
3533  ;}
3534  break;
3535 
3536  case 122:
3537 
3538 /* Line 1464 of yacc.c */
3539 #line 1087 "grammar.y"
3540  {
3541  (yyval.lv) = (yyvsp[(2) - (3)].lv);
3542  ;}
3543  break;
3544 
3545  case 123:
3546 
3547 /* Line 1464 of yacc.c */
3548 #line 1093 "grammar.y"
3549  {
3550  expected_parms = TRUE;
3551  ;}
3552  break;
3553 
3554  case 124:
3555 
3556 /* Line 1464 of yacc.c */
3557 #line 1100 "grammar.y"
3558  { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
3559  break;
3560 
3561  case 125:
3562 
3563 /* Line 1464 of yacc.c */
3564 #line 1102 "grammar.y"
3565  { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
3566  break;
3567 
3568  case 126:
3569 
3570 /* Line 1464 of yacc.c */
3571 #line 1104 "grammar.y"
3572  { (yyval.i) = (yyvsp[(1) - (1)].i); ;}
3573  break;
3574 
3575  case 127:
3576 
3577 /* Line 1464 of yacc.c */
3578 #line 1113 "grammar.y"
3579  { if ((yyvsp[(1) - (2)].i) != '<') YYERROR;
3580  if((feFilePending=feFopen((yyvsp[(2) - (2)].name),"r",NULL,TRUE))==NULL) YYERROR; ;}
3581  break;
3582 
3583  case 128:
3584 
3585 /* Line 1464 of yacc.c */
3586 #line 1116 "grammar.y"
3587  { newFile((yyvsp[(2) - (4)].name),feFilePending); ;}
3588  break;
3589 
3590  case 129:
3591 
3592 /* Line 1464 of yacc.c */
3593 #line 1121 "grammar.y"
3594  {
3595  feHelp((yyvsp[(2) - (3)].name));
3596  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
3597  ;}
3598  break;
3599 
3600  case 130:
3601 
3602 /* Line 1464 of yacc.c */
3603 #line 1126 "grammar.y"
3604  {
3605  feHelp(NULL);
3606  ;}
3607  break;
3608 
3609  case 131:
3610 
3611 /* Line 1464 of yacc.c */
3612 #line 1133 "grammar.y"
3613  {
3614  singular_example((yyvsp[(2) - (3)].name));
3615  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
3616  ;}
3617  break;
3618 
3619  case 132:
3620 
3621 /* Line 1464 of yacc.c */
3622 #line 1141 "grammar.y"
3623  {
3624  if (basePack!=(yyvsp[(2) - (2)].lv).req_packhdl)
3625  {
3626  if(iiExport(&(yyvsp[(2) - (2)].lv),0,currPack)) YYERROR;
3627  }
3628  else
3629  if (iiExport(&(yyvsp[(2) - (2)].lv),0)) YYERROR;
3630  ;}
3631  break;
3632 
3633  case 133:
3634 
3635 /* Line 1464 of yacc.c */
3636 #line 1153 "grammar.y"
3637  {
3638  leftv v=&(yyvsp[(2) - (2)].lv);
3639  if (v->rtyp!=IDHDL)
3640  {
3641  if (v->name!=NULL)
3642  {
3643  Werror("`%s` is undefined in kill",v->name);
3644  omFree((ADDRESS)v->name); v->name=NULL;
3645  }
3646  else WerrorS("kill what ?");
3647  }
3648  else
3649  {
3650  killhdl((idhdl)v->data,v->req_packhdl);
3651  }
3652  ;}
3653  break;
3654 
3655  case 134:
3656 
3657 /* Line 1464 of yacc.c */
3658 #line 1170 "grammar.y"
3659  {
3660  leftv v=&(yyvsp[(3) - (3)].lv);
3661  if (v->rtyp!=IDHDL)
3662  {
3663  if (v->name!=NULL)
3664  {
3665  Werror("`%s` is undefined in kill",v->name);
3666  omFree((ADDRESS)v->name); v->name=NULL;
3667  }
3668  else WerrorS("kill what ?");
3669  }
3670  else
3671  {
3672  killhdl((idhdl)v->data,v->req_packhdl);
3673  }
3674  ;}
3675  break;
3676 
3677  case 135:
3678 
3679 /* Line 1464 of yacc.c */
3680 #line 1190 "grammar.y"
3681  {
3682  list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE);
3683  ;}
3684  break;
3685 
3686  case 136:
3687 
3688 /* Line 1464 of yacc.c */
3689 #line 1194 "grammar.y"
3690  {
3691  list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE);
3692  ;}
3693  break;
3694 
3695  case 137:
3696 
3697 /* Line 1464 of yacc.c */
3698 #line 1198 "grammar.y"
3699  {
3700  if ((yyvsp[(3) - (4)].i)==QRING_CMD) (yyvsp[(3) - (4)].i)=RING_CMD;
3701  list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE);
3702  ;}
3703  break;
3704 
3705  case 138:
3706 
3707 /* Line 1464 of yacc.c */
3708 #line 1203 "grammar.y"
3709  {
3710  list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE);
3711  ;}
3712  break;
3713 
3714  case 139:
3715 
3716 /* Line 1464 of yacc.c */
3717 #line 1207 "grammar.y"
3718  {
3719  list_cmd(RING_CMD,NULL,"// ",TRUE);
3720  ;}
3721  break;
3722 
3723  case 140:
3724 
3725 /* Line 1464 of yacc.c */
3726 #line 1211 "grammar.y"
3727  {
3728  list_cmd((yyvsp[(3) - (4)].i),NULL,"// ",TRUE);
3729  ;}
3730  break;
3731 
3732  case 141:
3733 
3734 /* Line 1464 of yacc.c */
3735 #line 1215 "grammar.y"
3736  {
3737  list_cmd(PROC_CMD,NULL,"// ",TRUE);
3738  ;}
3739  break;
3740 
3741  case 142:
3742 
3743 /* Line 1464 of yacc.c */
3744 #line 1219 "grammar.y"
3745  {
3746  list_cmd(0,(yyvsp[(3) - (4)].lv).Fullname(),"// ",TRUE);
3747  (yyvsp[(3) - (4)].lv).CleanUp();
3748  ;}
3749  break;
3750 
3751  case 143:
3752 
3753 /* Line 1464 of yacc.c */
3754 #line 1224 "grammar.y"
3755  {
3756  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3757  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3758  (yyvsp[(3) - (6)].lv).CleanUp();
3759  ;}
3760  break;
3761 
3762  case 144:
3763 
3764 /* Line 1464 of yacc.c */
3765 #line 1230 "grammar.y"
3766  {
3767  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3768  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3769  (yyvsp[(3) - (6)].lv).CleanUp();
3770  ;}
3771  break;
3772 
3773  case 145:
3774 
3775 /* Line 1464 of yacc.c */
3776 #line 1236 "grammar.y"
3777  {
3778  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3779  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3780  (yyvsp[(3) - (6)].lv).CleanUp();
3781  ;}
3782  break;
3783 
3784  case 146:
3785 
3786 /* Line 1464 of yacc.c */
3787 #line 1242 "grammar.y"
3788  {
3789  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3790  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3791  (yyvsp[(3) - (6)].lv).CleanUp();
3792  ;}
3793  break;
3794 
3795  case 147:
3796 
3797 /* Line 1464 of yacc.c */
3798 #line 1248 "grammar.y"
3799  {
3800  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3801  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3802  (yyvsp[(3) - (6)].lv).CleanUp();
3803  ;}
3804  break;
3805 
3806  case 148:
3807 
3808 /* Line 1464 of yacc.c */
3809 #line 1254 "grammar.y"
3810  {
3811  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3812  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3813  (yyvsp[(3) - (6)].lv).CleanUp();
3814  ;}
3815  break;
3816 
3817  case 149:
3818 
3819 /* Line 1464 of yacc.c */
3820 #line 1260 "grammar.y"
3821  {
3822  if((yyvsp[(3) - (6)].lv).Typ() == PACKAGE_CMD)
3823  list_cmd((yyvsp[(5) - (6)].i),NULL,"// ",TRUE);
3824  (yyvsp[(3) - (6)].lv).CleanUp();
3825  ;}
3826  break;
3827 
3828  case 150:
3829 
3830 /* Line 1464 of yacc.c */
3831 #line 1272 "grammar.y"
3832  {
3833  list_cmd(-1,NULL,"// ",TRUE);
3834  ;}
3835  break;
3836 
3837  case 151:
3838 
3839 /* Line 1464 of yacc.c */
3840 #line 1278 "grammar.y"
3841  { yyInRingConstruction = TRUE; ;}
3842  break;
3843 
3844  case 152:
3845 
3846 /* Line 1464 of yacc.c */
3847 #line 1287 "grammar.y"
3848  {
3849  const char *ring_name = (yyvsp[(2) - (8)].lv).name;
3850  ring b=
3851  rInit(&(yyvsp[(4) - (8)].lv), /* characteristik and list of parameters*/
3852  &(yyvsp[(6) - (8)].lv), /* names of ringvariables */
3853  &(yyvsp[(8) - (8)].lv)); /* ordering */
3854  idhdl newRingHdl=NULL;
3855 
3856  if (b!=NULL)
3857  {
3858  newRingHdl=enterid(ring_name, myynest, RING_CMD,
3859  &((yyvsp[(2) - (8)].lv).req_packhdl->idroot),FALSE);
3860  (yyvsp[(2) - (8)].lv).CleanUp();
3861  if (newRingHdl!=NULL)
3862  {
3863  IDRING(newRingHdl)=b;
3864  }
3865  else
3866  {
3867  rKill(b);
3868  }
3869  }
3871  if (newRingHdl==NULL)
3872  {
3873  MYYERROR("cannot make ring");
3874  }
3875  else
3876  {
3877  rSetHdl(newRingHdl);
3878  }
3879  ;}
3880  break;
3881 
3882  case 153:
3883 
3884 /* Line 1464 of yacc.c */
3885 #line 1320 "grammar.y"
3886  {
3887  const char *ring_name = (yyvsp[(2) - (2)].lv).name;
3888  if (!inerror) rDefault(ring_name);
3890  (yyvsp[(2) - (2)].lv).CleanUp();
3891  ;}
3892  break;
3893 
3894  case 154:
3895 
3896 /* Line 1464 of yacc.c */
3897 #line 1327 "grammar.y"
3898  {
3900  if (iiAssignCR(&(yyvsp[(2) - (4)].lv),&(yyvsp[(4) - (4)].lv))) YYERROR;
3901  ;}
3902  break;
3903 
3904  case 155:
3905 
3906 /* Line 1464 of yacc.c */
3907 #line 1332 "grammar.y"
3908  {
3910  sleftv tmp;
3911  (yyvsp[(4) - (7)].lv).next=(leftv)omAlloc(sizeof(sleftv));
3912  memcpy((yyvsp[(4) - (7)].lv).next,&(yyvsp[(6) - (7)].lv),sizeof(sleftv));
3913  memset(&(yyvsp[(6) - (7)].lv),0,sizeof(sleftv));
3914  if (iiExprArithM(&tmp,&(yyvsp[(4) - (7)].lv),'[')) YYERROR;
3915  if (iiAssignCR(&(yyvsp[(2) - (7)].lv),&tmp)) YYERROR;
3916  ;}
3917  break;
3918 
3919  case 156:
3920 
3921 /* Line 1464 of yacc.c */
3922 #line 1345 "grammar.y"
3923  {
3924  if (((yyvsp[(1) - (2)].i)!=LIB_CMD)||(jjLOAD((yyvsp[(2) - (2)].name),TRUE))) YYERROR;
3925  ;}
3926  break;
3927 
3928  case 159:
3929 
3930 /* Line 1464 of yacc.c */
3931 #line 1354 "grammar.y"
3932  {
3933  if (((yyvsp[(1) - (2)].i)==KEEPRING_CMD) && (myynest==0))
3934  MYYERROR("only inside a proc allowed");
3935  const char * n=(yyvsp[(2) - (2)].lv).Name();
3936  if (((yyvsp[(2) - (2)].lv).Typ()==RING_CMD)
3937  && ((yyvsp[(2) - (2)].lv).rtyp==IDHDL))
3938  {
3939  idhdl h=(idhdl)(yyvsp[(2) - (2)].lv).data;
3940  if ((yyvsp[(2) - (2)].lv).e!=NULL) h=rFindHdl((ring)(yyvsp[(2) - (2)].lv).Data(),NULL);
3941  //Print("setring %s lev %d (ptr:%x)\n",IDID(h),IDLEV(h),IDRING(h));
3942  if ((yyvsp[(1) - (2)].i)==KEEPRING_CMD)
3943  {
3944  if (h!=NULL)
3945  {
3946  if (IDLEV(h)!=0)
3947  {
3948  if (iiExport(&(yyvsp[(2) - (2)].lv),myynest-1)) YYERROR;
3949 #if 1
3950  idhdl p=IDRING(h)->idroot;
3951  idhdl root=p;
3952  int prevlev=myynest-1;
3953  while (p!=NULL)
3954  {
3955  if (IDLEV(p)==myynest)
3956  {
3957  idhdl old=root->get(IDID(p),prevlev);
3958  if (old!=NULL)
3959  {
3960  if (BVERBOSE(V_REDEFINE))
3961  Warn("redefining %s",IDID(p));
3962  killhdl2(old,&root,IDRING(h));
3963  IDRING(h)->idroot=root;
3964  }
3965  IDLEV(p)=prevlev;
3966  }
3967  p=IDNEXT(p);
3968  }
3969 #endif
3970  }
3971  iiLocalRing[myynest-1]=IDRING(h);
3972  }
3973  else
3974  {
3975  Werror("%s is no identifier",n);
3976  (yyvsp[(2) - (2)].lv).CleanUp();
3977  YYERROR;
3978  }
3979  }
3980  if (h!=NULL) rSetHdl(h);
3981  else
3982  {
3983  Werror("cannot find the name of the basering %s",n);
3984  (yyvsp[(2) - (2)].lv).CleanUp();
3985  YYERROR;
3986  }
3987  (yyvsp[(2) - (2)].lv).CleanUp();
3988  }
3989  else
3990  {
3991  Werror("%s is no name of a ring/qring",n);
3992  (yyvsp[(2) - (2)].lv).CleanUp();
3993  YYERROR;
3994  }
3995  ;}
3996  break;
3997 
3998  case 160:
3999 
4000 /* Line 1464 of yacc.c */
4001 #line 1422 "grammar.y"
4002  {
4003  type_cmd(&((yyvsp[(2) - (2)].lv)));
4004  ;}
4005  break;
4006 
4007  case 161:
4008 
4009 /* Line 1464 of yacc.c */
4010 #line 1426 "grammar.y"
4011  {
4012  //Print("typ is %d, rtyp:%d\n",$1.Typ(),$1.rtyp);
4013  #ifdef SIQ
4014  if ((yyvsp[(1) - (1)].lv).rtyp!=COMMAND)
4015  {
4016  #endif
4017  if ((yyvsp[(1) - (1)].lv).Typ()==UNKNOWN)
4018  {
4019  if ((yyvsp[(1) - (1)].lv).name!=NULL)
4020  {
4021  Werror("`%s` is undefined",(yyvsp[(1) - (1)].lv).name);
4022  omFree((ADDRESS)(yyvsp[(1) - (1)].lv).name);
4023  }
4024  YYERROR;
4025  }
4026  #ifdef SIQ
4027  }
4028  #endif
4029  (yyvsp[(1) - (1)].lv).Print(&sLastPrinted);
4030  (yyvsp[(1) - (1)].lv).CleanUp(currRing);
4031  if (errorreported) YYERROR;
4032  ;}
4033  break;
4034 
4035  case 162:
4036 
4037 /* Line 1464 of yacc.c */
4038 #line 1455 "grammar.y"
4039  {
4040  int i; TESTSETINT((yyvsp[(3) - (5)].lv),i);
4041  if (i!=0)
4042  {
4043  newBuffer( (yyvsp[(5) - (5)].name), BT_if);
4044  }
4045  else
4046  {
4047  omFree((ADDRESS)(yyvsp[(5) - (5)].name));
4048  currentVoice->ifsw=1;
4049  }
4050  ;}
4051  break;
4052 
4053  case 163:
4054 
4055 /* Line 1464 of yacc.c */
4056 #line 1468 "grammar.y"
4057  {
4058  if (currentVoice->ifsw==1)
4059  {
4060  currentVoice->ifsw=0;
4061  newBuffer( (yyvsp[(2) - (2)].name), BT_else);
4062  }
4063  else
4064  {
4065  if (currentVoice->ifsw!=2)
4066  {
4067  Warn("`else` without `if` in level %d",myynest);
4068  }
4069  omFree((ADDRESS)(yyvsp[(2) - (2)].name));
4070  }
4071  currentVoice->ifsw=0;
4072  ;}
4073  break;
4074 
4075  case 164:
4076 
4077 /* Line 1464 of yacc.c */
4078 #line 1485 "grammar.y"
4079  {
4080  int i; TESTSETINT((yyvsp[(3) - (5)].lv),i);
4081  if (i)
4082  {
4083  if (exitBuffer(BT_break)) YYERROR;
4084  }
4085  currentVoice->ifsw=0;
4086  ;}
4087  break;
4088 
4089  case 165:
4090 
4091 /* Line 1464 of yacc.c */
4092 #line 1494 "grammar.y"
4093  {
4094  if (exitBuffer(BT_break)) YYERROR;
4095  currentVoice->ifsw=0;
4096  ;}
4097  break;
4098 
4099  case 166:
4100 
4101 /* Line 1464 of yacc.c */
4102 #line 1499 "grammar.y"
4103  {
4104  if (contBuffer(BT_break)) YYERROR;
4105  currentVoice->ifsw=0;
4106  ;}
4107  break;
4108 
4109  case 167:
4110 
4111 /* Line 1464 of yacc.c */
4112 #line 1507 "grammar.y"
4113  {
4114  /* -> if(!$2) break; $3; continue;*/
4115  char * s = (char *)omAlloc( strlen((yyvsp[(2) - (3)].name)) + strlen((yyvsp[(3) - (3)].name)) + 36);
4116  sprintf(s,"whileif (!(%s)) break;\n%scontinue;\n " ,(yyvsp[(2) - (3)].name),(yyvsp[(3) - (3)].name));
4117  newBuffer(s,BT_break);
4118  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
4119  omFree((ADDRESS)(yyvsp[(3) - (3)].name));
4120  ;}
4121  break;
4122 
4123  case 168:
4124 
4125 /* Line 1464 of yacc.c */
4126 #line 1519 "grammar.y"
4127  {
4128  /* $2 */
4129  /* if (!$3) break; $5; $4; continue; */
4130  char * s = (char *)omAlloc( strlen((yyvsp[(3) - (5)].name))+strlen((yyvsp[(4) - (5)].name))+strlen((yyvsp[(5) - (5)].name))+36);
4131  sprintf(s,"forif (!(%s)) break;\n%s%s;\ncontinue;\n "
4132  ,(yyvsp[(3) - (5)].name),(yyvsp[(5) - (5)].name),(yyvsp[(4) - (5)].name));
4133  omFree((ADDRESS)(yyvsp[(3) - (5)].name));
4134  omFree((ADDRESS)(yyvsp[(4) - (5)].name));
4135  omFree((ADDRESS)(yyvsp[(5) - (5)].name));
4136  newBuffer(s,BT_break);
4137  s = (char *)omAlloc( strlen((yyvsp[(2) - (5)].name)) + 3);
4138  sprintf(s,"%s;\n",(yyvsp[(2) - (5)].name));
4139  omFree((ADDRESS)(yyvsp[(2) - (5)].name));
4140  newBuffer(s,BT_if);
4141  ;}
4142  break;
4143 
4144  case 169:
4145 
4146 /* Line 1464 of yacc.c */
4147 #line 1538 "grammar.y"
4148  {
4149  idhdl h = enterid((yyvsp[(2) - (3)].name),myynest,PROC_CMD,&IDROOT,TRUE);
4150  if (h==NULL) {omFree((ADDRESS)(yyvsp[(2) - (3)].name));omFree((ADDRESS)(yyvsp[(3) - (3)].name)); YYERROR;}
4151  iiInitSingularProcinfo(IDPROC(h),"", (yyvsp[(2) - (3)].name), 0, 0);
4152  IDPROC(h)->data.s.body = (char *)omAlloc(strlen((yyvsp[(3) - (3)].name))+31);;
4153  sprintf(IDPROC(h)->data.s.body,"parameter list #;\n%s;return();\n\n",(yyvsp[(3) - (3)].name));
4154  omFree((ADDRESS)(yyvsp[(3) - (3)].name));
4155  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
4156  ;}
4157  break;
4158 
4159  case 170:
4160 
4161 /* Line 1464 of yacc.c */
4162 #line 1548 "grammar.y"
4163  {
4164  idhdl h = enterid((yyvsp[(1) - (3)].name),myynest,PROC_CMD,&IDROOT,TRUE);
4165  if (h==NULL)
4166  {
4167  omFree((ADDRESS)(yyvsp[(1) - (3)].name));
4168  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
4169  omFree((ADDRESS)(yyvsp[(3) - (3)].name));
4170  YYERROR;
4171  }
4172  char *args=iiProcArgs((yyvsp[(2) - (3)].name),FALSE);
4173  omFree((ADDRESS)(yyvsp[(2) - (3)].name));
4174  iiInitSingularProcinfo(IDPROC(h),"", (yyvsp[(1) - (3)].name), 0, 0);
4175  IDPROC(h)->data.s.body = (char *)omAlloc(strlen((yyvsp[(3) - (3)].name))+strlen(args)+14);;
4176  sprintf(IDPROC(h)->data.s.body,"%s\n%s;return();\n\n",args,(yyvsp[(3) - (3)].name));
4177  omFree((ADDRESS)args);
4178  omFree((ADDRESS)(yyvsp[(3) - (3)].name));
4179  omFree((ADDRESS)(yyvsp[(1) - (3)].name));
4180  ;}
4181  break;
4182 
4183  case 171:
4184 
4185 /* Line 1464 of yacc.c */
4186 #line 1567 "grammar.y"
4187  {
4188  omFree((ADDRESS)(yyvsp[(3) - (4)].name));
4189  idhdl h = enterid((yyvsp[(1) - (4)].name),myynest,PROC_CMD,&IDROOT,TRUE);
4190  if (h==NULL)
4191  {
4192  omFree((ADDRESS)(yyvsp[(1) - (4)].name));
4193  omFree((ADDRESS)(yyvsp[(2) - (4)].name));
4194  omFree((ADDRESS)(yyvsp[(4) - (4)].name));
4195  YYERROR;
4196  }
4197  char *args=iiProcArgs((yyvsp[(2) - (4)].name),FALSE);
4198  omFree((ADDRESS)(yyvsp[(2) - (4)].name));
4199  iiInitSingularProcinfo(IDPROC(h),"", (yyvsp[(1) - (4)].name), 0, 0);
4200  omFree((ADDRESS)(yyvsp[(1) - (4)].name));
4201  IDPROC(h)->data.s.body = (char *)omAlloc(strlen((yyvsp[(4) - (4)].name))+strlen(args)+14);;
4202  sprintf(IDPROC(h)->data.s.body,"%s\n%s;return();\n\n",args,(yyvsp[(4) - (4)].name));
4203  omFree((ADDRESS)args);
4204  omFree((ADDRESS)(yyvsp[(4) - (4)].name));
4205  ;}
4206  break;
4207 
4208  case 172:
4209 
4210 /* Line 1464 of yacc.c */
4211 #line 1590 "grammar.y"
4212  {
4213  // decl. of type proc p(int i)
4214  if ((yyvsp[(1) - (2)].i)==PARAMETER) { if (iiParameter(&(yyvsp[(2) - (2)].lv))) YYERROR; }
4215  else { if (iiAlias(&(yyvsp[(2) - (2)].lv))) YYERROR; }
4216  ;}
4217  break;
4218 
4219  case 173:
4220 
4221 /* Line 1464 of yacc.c */
4222 #line 1596 "grammar.y"
4223  {
4224  // decl. of type proc p(i)
4225  sleftv tmp_expr;
4226  if ((yyvsp[(1) - (2)].i)==ALIAS_CMD) MYYERROR("alias requires a type");
4227  if ((iiDeclCommand(&tmp_expr,&(yyvsp[(2) - (2)].lv),myynest,DEF_CMD,&IDROOT))
4228  || (iiParameter(&tmp_expr)))
4229  YYERROR;
4230  ;}
4231  break;
4232 
4233  case 174:
4234 
4235 /* Line 1464 of yacc.c */
4236 #line 1608 "grammar.y"
4237  {
4238  iiRETURNEXPR.Copy(&(yyvsp[(3) - (4)].lv));
4239  (yyvsp[(3) - (4)].lv).CleanUp();
4240  if (exitBuffer(BT_proc)) YYERROR;
4241  ;}
4242  break;
4243 
4244  case 175:
4245 
4246 /* Line 1464 of yacc.c */
4247 #line 1614 "grammar.y"
4248  {
4249  if ((yyvsp[(1) - (3)].i)==RETURN)
4250  {
4251  iiRETURNEXPR.Init();
4253  if (exitBuffer(BT_proc)) YYERROR;
4254  }
4255  ;}
4256  break;
4257 
4258 
4259 
4260 /* Line 1464 of yacc.c */
4261 #line 4262 "grammar.cc"
4262  default: break;
4263  }
4264  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
4265 
4266  YYPOPSTACK (yylen);
4267  yylen = 0;
4268  YY_STACK_PRINT (yyss, yyssp);
4269 
4270  *++yyvsp = yyval;
4271 
4272  /* Now `shift' the result of the reduction. Determine what state
4273  that goes to, based on the state we popped back to and the rule
4274  number reduced by. */
4275 
4276  yyn = yyr1[yyn];
4277 
4278  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
4279  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
4280  yystate = yytable[yystate];
4281  else
4282  yystate = yydefgoto[yyn - YYNTOKENS];
4283 
4284  goto yynewstate;
4285 
4286 
4287 /*------------------------------------.
4288 | yyerrlab -- here on detecting error |
4289 `------------------------------------*/
4290 yyerrlab:
4291  /* If not already recovering from an error, report this error. */
4292  if (!yyerrstatus)
4293  {
4294  ++yynerrs;
4295 #if ! YYERROR_VERBOSE
4296  yyerror (YY_("syntax error"));
4297 #else
4298  {
4299  YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
4300  if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
4301  {
4302  YYSIZE_T yyalloc = 2 * yysize;
4303  if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
4304  yyalloc = YYSTACK_ALLOC_MAXIMUM;
4305  if (yymsg != yymsgbuf)
4306  YYSTACK_FREE (yymsg);
4307  yymsg = (char *) YYSTACK_ALLOC (yyalloc);
4308  if (yymsg)
4309  yymsg_alloc = yyalloc;
4310  else
4311  {
4312  yymsg = yymsgbuf;
4313  yymsg_alloc = sizeof yymsgbuf;
4314  }
4315  }
4316 
4317  if (0 < yysize && yysize <= yymsg_alloc)
4318  {
4319  (void) yysyntax_error (yymsg, yystate, yychar);
4320  yyerror (yymsg);
4321  }
4322  else
4323  {
4324  yyerror (YY_("syntax error"));
4325  if (yysize != 0)
4326  goto yyexhaustedlab;
4327  }
4328  }
4329 #endif
4330  }
4331 
4332 
4333 
4334  if (yyerrstatus == 3)
4335  {
4336  /* If just tried and failed to reuse lookahead token after an
4337  error, discard it. */
4338 
4339  if (yychar <= YYEOF)
4340  {
4341  /* Return failure if at end of input. */
4342  if (yychar == YYEOF)
4343  YYABORT;
4344  }
4345  else
4346  {
4347  yydestruct ("Error: discarding",
4348  yytoken, &yylval);
4349  yychar = YYEMPTY;
4350  }
4351  }
4352 
4353  /* Else will try to reuse lookahead token after shifting the error
4354  token. */
4355  goto yyerrlab1;
4356 
4357 
4358 /*---------------------------------------------------.
4359 | yyerrorlab -- error raised explicitly by YYERROR. |
4360 `---------------------------------------------------*/
4361 yyerrorlab:
4362 
4363  /* Pacify compilers like GCC when the user code never invokes
4364  YYERROR and the label yyerrorlab therefore never appears in user
4365  code. */
4366  if (/*CONSTCOND*/ 0)
4367  goto yyerrorlab;
4368 
4369  /* Do not reclaim the symbols of the rule which action triggered
4370  this YYERROR. */
4371  YYPOPSTACK (yylen);
4372  yylen = 0;
4373  YY_STACK_PRINT (yyss, yyssp);
4374  yystate = *yyssp;
4375  goto yyerrlab1;
4376 
4377 
4378 /*-------------------------------------------------------------.
4379 | yyerrlab1 -- common code for both syntax error and YYERROR. |
4380 `-------------------------------------------------------------*/
4381 yyerrlab1:
4382  yyerrstatus = 3; /* Each real token shifted decrements this. */
4383 
4384  for (;;)
4385  {
4386  yyn = yypact[yystate];
4387  if (yyn != YYPACT_NINF)
4388  {
4389  yyn += YYTERROR;
4390  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
4391  {
4392  yyn = yytable[yyn];
4393  if (0 < yyn)
4394  break;
4395  }
4396  }
4397 
4398  /* Pop the current state because it cannot handle the error token. */
4399  if (yyssp == yyss)
4400  YYABORT;
4401 
4402 
4403  yydestruct ("Error: popping",
4404  yystos[yystate], yyvsp);
4405  YYPOPSTACK (1);
4406  yystate = *yyssp;
4407  YY_STACK_PRINT (yyss, yyssp);
4408  }
4409 
4410  *++yyvsp = yylval;
4411 
4412 
4413  /* Shift the error token. */
4414  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
4415 
4416  yystate = yyn;
4417  goto yynewstate;
4418 
4419 
4420 /*-------------------------------------.
4421 | yyacceptlab -- YYACCEPT comes here. |
4422 `-------------------------------------*/
4423 yyacceptlab:
4424  yyresult = 0;
4425  goto yyreturn;
4426 
4427 /*-----------------------------------.
4428 | yyabortlab -- YYABORT comes here. |
4429 `-----------------------------------*/
4430 yyabortlab:
4431  yyresult = 1;
4432  goto yyreturn;
4433 
4434 #if !defined(yyoverflow) || YYERROR_VERBOSE
4435 /*-------------------------------------------------.
4436 | yyexhaustedlab -- memory exhaustion comes here. |
4437 `-------------------------------------------------*/
4438 yyexhaustedlab:
4439  yyerror (YY_("memory exhausted"));
4440  yyresult = 2;
4441  /* Fall through. */
4442 #endif
4443 
4444 yyreturn:
4445  if (yychar != YYEMPTY)
4446  yydestruct ("Cleanup: discarding lookahead",
4447  yytoken, &yylval);
4448  /* Do not reclaim the symbols of the rule which action triggered
4449  this YYABORT or YYACCEPT. */
4450  YYPOPSTACK (yylen);
4451  YY_STACK_PRINT (yyss, yyssp);
4452  while (yyssp != yyss)
4453  {
4454  yydestruct ("Cleanup: popping",
4455  yystos[*yyssp], yyvsp);
4456  YYPOPSTACK (1);
4457  }
4458 #ifndef yyoverflow
4459  if (yyss != yyssa)
4460  YYSTACK_FREE (yyss);
4461 #endif
4462 #if YYERROR_VERBOSE
4463  if (yymsg != yymsgbuf)
4464  YYSTACK_FREE (yymsg);
4465 #endif
4466  /* Make sure YYID is used. */
4467  return YYID (yyresult);
4468 }
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:293
Class used for (list of) interpreter objects.
Definition: subexpr.h:82
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:8319
#define FALSE
Definition: auxiliary.h:94
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:544
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:8531
#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:473
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:1009
#define IDROOT
Definition: ipid.h:20
BOOLEAN siq
Definition: subexpr.cc:57
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: grammar.cc:1654
#define TRUE
Definition: auxiliary.h:98
void type_cmd(leftv v)
Definition: ipshell.cc:246
BOOLEAN iiAssignCR(leftv r, leftv arg)
Definition: ipshell.cc:6410
#define IDIDEAL(a)
Definition: ipid.h:130
void Init()
Definition: subexpr.h:107
#define UNKNOWN
Definition: tok.h:217
void * ADDRESS
Definition: auxiliary.h:115
sleftv * leftv
Definition: structs.h:60
BOOLEAN iiExprArithM(leftv res, leftv a, int op)
Definition: iparith.cc:8621
#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:5157
coeffs coeffs_BIGINT
Definition: ipid.cc:54
int Typ()
Definition: subexpr.cc:995
#define omAlloc(size)
Definition: omAllocDecl.h:210
BOOLEAN exitBuffer(feBufferTypes typ)
Definition: fevoices.cc:241
BOOLEAN iiExport(leftv v, int toLev)
Definition: ipshell.cc:1413
Definition: idrec.h:34
#define IDHDL
Definition: tok.h:31
idhdl get(const char *s, int lev)
Definition: ipid.cc:90
BOOLEAN iiParameter(leftv p)
Definition: ipshell.cc:1279
const char * currid
Definition: grammar.cc:171
void * data
Definition: subexpr.h:88
char ifsw
Definition: fevoices.h:79
#define YYSTYPE
Definition: stype.h:19
Definition: fevoices.h:24
BOOLEAN iiTestAssume(leftv a, leftv b)
Definition: ipshell.cc:6349
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:408
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
Definition: ipid.cc:258
#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:253
void rKill(ring r)
Definition: ipshell.cc:6057
void list_cmd(int typ, const char *what, const char *prefix, BOOLEAN iterate, BOOLEAN fullname)
Definition: ipshell.cc:417
int j
Definition: myNF.cc:70
Definition: tok.h:58
procinfo * pi
Definition: fevoices.h:64
int yychar
Definition: readcf.cc:1013
const char * name
Definition: subexpr.h:87
#define pSetCompP(a, i)
Definition: polys.h:285
#define omFree(addr)
Definition: omAllocDecl.h:261
BOOLEAN siCntrlc
Definition: cntrlc.cc:104
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:688
#define YY_STACK_PRINT(Bottom, Top)
Definition: grammar.cc:1749
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:5524
void startRTimer()
Definition: timer.cc:153
char name(const Variable &v)
Definition: factory.h:178
idhdl rFindHdl(ring r, idhdl n)
Definition: ipshell.cc:1594
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Definition: grammar.cc:2041
void iiDebug()
Definition: ipshell.cc:984
ring rDefault(const coeffs cf, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl)
Definition: ring.cc:113
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
int yynerrs
Definition: readcf.cc:1018
short errorreported
Definition: feFopen.cc:23
leftv next
Definition: subexpr.h:86
Voice * prev
Definition: fevoices.h:62
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:44
Definition: tok.h:34
int iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl *root, BOOLEAN isring, BOOLEAN init_b)
Definition: ipshell.cc:1122
#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:472
#define YYLAST
Definition: grammar.cc:581
#define NULL
Definition: omList.c:10
package req_packhdl
Definition: subexpr.h:106
#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:377
package basePack
Definition: ipid.cc:64
BOOLEAN iiAlias(leftv p)
Definition: ipid.cc:752
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:91
sleftv sLastPrinted
Definition: subexpr.cc:55
void CleanUp(ring r=currRing)
Definition: subexpr.cc:332
void * Data()
Definition: subexpr.cc:1137
#define YYSIZE_T
Definition: grammar.cc:407
void newBuffer(char *s, feBufferTypes t, procinfo *pi, int lineno)
Definition: fevoices.cc:171
rRingOrder_t rOrderName(char *ordername)
Definition: ring.cc:508
#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:6376
#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:5038
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:8130
#define YYPACT_NINF
Definition: grammar.cc:921
#define NONE
Definition: tok.h:216
void syMake(leftv v, const char *id, package pa)
Definition: subexpr.cc:1500
YYSTYPE yylval
Definition: readcf.cc:1016
BOOLEAN iiApply(leftv res, leftv a, int op, leftv proc)
Definition: ipshell.cc:6327
char trace_flag
Definition: subexpr.h:62
#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:707
BOOLEAN expected_parms
Definition: grammar.cc:173
const char * lastreserved
Definition: ipshell.cc:80
#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:1793
#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, 261, 263,
265, 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, 110, 111, 111, 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, 3, 1, 1,
1, 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, 486, 514, 538, 544,
550, 554, 558, 562, 566, 570, 574, 578, 582, 586,
590, 594, 598, 602, 606, 610, 614, 618, 622, 626,
630, 636, 640, 644, 648, 652, 656, 660, 671, 677,
682, 683, 687, 691, 695, 699, 703, 707, 711, 715,
719, 736, 743, 742, 760, 768, 776, 785, 789, 793,
797, 801, 805, 809, 813, 817, 821, 825, 829, 833,
845, 852, 853, 872, 873, 885, 890, 895, 899, 903,
939, 965, 986, 994, 998, 999, 1013, 1021, 1030, 1075,
1076, 1085, 1086, 1092, 1099, 1101, 1103, 1113, 1112, 1120,
1125, 1132, 1140, 1152, 1169, 1189, 1193, 1197, 1202, 1206,
1210, 1214, 1218, 1223, 1229, 1235, 1241, 1247, 1253, 1259,
1271, 1278, 1282, 1319, 1326, 1331, 1344, 1350, 1350, 1353,
1421, 1425, 1454, 1467, 1484, 1493, 1498, 1506, 1518, 1537,
1547, 1566, 1589, 1595, 1607, 1613
}

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.