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   2560
 
#define YYNTOKENS   102
 
#define YYNNTS   44
 
#define YYNRULES   174
 
#define YYNSTATES   397
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   340
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -361
 
#define YYTABLE_NINF   -154
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYFAIL   goto yyerrlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
 
#define YYLLOC_DEFAULT(Current, Rhs, N)
 
#define YY_LOCATION_PRINT(File, Loc)   ((void) 0)
 
#define YYLEX   yylex (&yylval)
 
#define YYFPRINTF   fprintf
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 

Typedefs

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

Enumerations

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

Functions

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

Variables

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

Macro Definition Documentation

◆ _STDLIB_H

#define _STDLIB_H   1

Definition at line 501 of file grammar.cc.

◆ MYYERROR

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

Definition at line 185 of file grammar.cc.

◆ TESTSETINT

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

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 1635 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:1803
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1795 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:1803
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1757 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:1803
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1662 of file grammar.cc.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 1555 of file grammar.cc.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 1554 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))
#define YYTRANSLATE(YYX)
Definition: grammar.cc:596
#define YYEMPTY
Definition: grammar.cc:1551
if(yy_init)
Definition: libparse.cc:1418
#define YY_(msgid)
Definition: grammar.cc:423
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1576 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 1550 of file grammar.cc.

◆ YYDPRINTF

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

Definition at line 1656 of file grammar.cc.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 1551 of file grammar.cc.

◆ YYEOF

#define YYEOF   0

Definition at line 1552 of file grammar.cc.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 1595 of file grammar.cc.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 1549 of file grammar.cc.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 1556 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 1566 of file grammar.cc.

◆ YYFINAL

#define YYFINAL   2

Definition at line 579 of file grammar.cc.

◆ YYFPRINTF

#define YYFPRINTF   fprintf

Definition at line 1653 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 1814 of file grammar.cc.

◆ YYLAST

#define YYLAST   2560

Definition at line 581 of file grammar.cc.

◆ YYLEX

#define YYLEX   yylex (&yylval)

Definition at line 1645 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))
#define YYRHSLOC(Rhs, K)
Definition: grammar.cc:1602
if(yy_init)
Definition: libparse.cc:1418
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:48
#define YYID(n)
Definition: grammar.cc:436

Definition at line 1604 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   44

Definition at line 586 of file grammar.cc.

◆ YYNRULES

#define YYNRULES   174

Definition at line 588 of file grammar.cc.

◆ YYNSTATES

#define YYNSTATES   397

Definition at line 590 of file grammar.cc.

◆ YYNTOKENS

#define YYNTOKENS   102

Definition at line 584 of file grammar.cc.

◆ YYPACT_NINF

#define YYPACT_NINF   -361

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

◆ YYRHSLOC

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

Definition at line 1602 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   -154

Definition at line 980 of file grammar.cc.

◆ YYTERROR

#define YYTERROR   1

Definition at line 1594 of file grammar.cc.

◆ YYTOKEN_TABLE

#define YYTOKEN_TABLE   0

Definition at line 257 of file grammar.cc.

◆ YYTOKENTYPE

#define YYTOKENTYPE

Definition at line 263 of file grammar.cc.

◆ YYTRANSLATE

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

Definition at line 596 of file grammar.cc.

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 593 of file grammar.cc.

◆ YYUSE

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

Definition at line 429 of file grammar.cc.

Typedef Documentation

◆ yytype_int16

typedef short int yytype_int16

Definition at line 396 of file grammar.cc.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 382 of file grammar.cc.

◆ yytype_uint16

typedef unsigned short int yytype_uint16

Definition at line 390 of file grammar.cc.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 375 of file grammar.cc.

Enumeration Type Documentation

◆ yytokentype

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

Definition at line 266 of file grammar.cc.

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

Function Documentation

◆ yy_reduce_print()

static void yy_reduce_print ( YYSTYPE yyvsp,
int  yyrule 
)
static

Definition at line 1771 of file grammar.cc.

1778 {
1779  int yynrhs = yyr2[yyrule];
1780  int yyi;
1781  unsigned long int yylno = yyrline[yyrule];
1782  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1783  yyrule - 1, yylno);
1784  /* The symbols being reduced. */
1785  for (yyi = 0; yyi < yynrhs; yyi++)
1786  {
1787  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1788  yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1789  &(yyvsp[(yyi + 1) - (yynrhs)])
1790  );
1791  YYFPRINTF (stderr, "\n");
1792  }
1793 }
#define YYFPRINTF
Definition: grammar.cc:1653
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: grammar.cc:1714
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 1740 of file grammar.cc.

1747 {
1748  YYFPRINTF (stderr, "Stack now");
1749  for (; yybottom <= yytop; yybottom++)
1750  {
1751  int yybot = *yybottom;
1752  YYFPRINTF (stderr, " %d", yybot);
1753  }
1754  YYFPRINTF (stderr, "\n");
1755 }
#define YYFPRINTF
Definition: grammar.cc:1653

◆ yy_symbol_print()

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

Definition at line 1714 of file grammar.cc.

1722 {
1723  if (yytype < YYNTOKENS)
1724  YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1725  else
1726  YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1727 
1728  yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1729  YYFPRINTF (yyoutput, ")");
1730 }
#define YYFPRINTF
Definition: grammar.cc:1653
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: grammar.cc:1682
#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 1682 of file grammar.cc.

1690 {
1691  if (!yyvaluep)
1692  return;
1693 # ifdef YYPRINT
1694  if (yytype < YYNTOKENS)
1695  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1696 # else
1697  YYUSE (yyoutput);
1698 # endif
1699  switch (yytype)
1700  {
1701  default:
1702  break;
1703  }
1704 }
#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 2049 of file grammar.cc.

2057 {
2058  YYUSE (yyvaluep);
2059 
2060  if (!yymsg)
2061  yymsg = "Deleting";
2062  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
2063 
2064  switch (yytype)
2065  {
2066 
2067  default:
2068  break;
2069  }
2070 }
#define YYUSE(e)
Definition: grammar.cc:429
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: grammar.cc:1662

◆ 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:349
#define IDROOT
Definition: ipid.h:18
#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:41
char my_yylinebuf[80]
Definition: febase.cc:43
int cmdtok
Definition: grammar.cc:174
#define HAVE_SDB
Definition: sdb.h:10
const char * VoiceName()
Definition: fevoices.cc:57
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:138
int yylineno
Definition: febase.cc:40
Voice * currentVoice
Definition: fevoices.cc:48
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 2109 of file grammar.cc.

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

◆ yydebug

int yydebug

Definition at line 1803 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, 246, 65, 66, 67, 68, 69, 189,
370, 371, 382, 372, 173, 98, 71, 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 40 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:
=
{
-361, -361, -361, -361, -361, -361, -361, -4, -1, 48,
-361, -361, -361, 79, -361, -361, 398, 360, 315, -209,
-361, -360, 18, 33, 238, 0, -361, -361, -361, -361,
-361, -361, -361, -361, -361, -361, -361, -361, -361, -361,
-361, -361, -361, -361
}

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, 489, 493,
496, 500, 503, 506, 510, 515, 520, 525, 530, 535,
540, 545, 550, 557, 564, 571, 578, 585, 592, 599,
603, 605, 614, 617, 622, 630, 633, 635, 637, 640,
643, 645, 651, 654, 660, 662, 664, 668, 674, 678,
682, 687, 690, 693, 698
}

Definition at line 642 of file grammar.cc.

◆ yyr1

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

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, 2, 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, 657, 661, 672, 678,
683, 684, 688, 692, 696, 700, 704, 708, 712, 716,
720, 737, 744, 743, 761, 769, 777, 786, 790, 794,
798, 802, 806, 810, 814, 818, 822, 826, 830, 834,
846, 853, 854, 873, 874, 886, 891, 896, 900, 904,
940, 966, 987, 995, 999, 1000, 1014, 1022, 1031, 1076,
1077, 1086, 1087, 1093, 1100, 1102, 1104, 1113, 1118, 1123,
1130, 1138, 1150, 1167, 1187, 1191, 1195, 1200, 1204, 1208,
1212, 1216, 1221, 1227, 1233, 1239, 1245, 1251, 1257, 1269,
1276, 1280, 1317, 1324, 1329, 1342, 1349, 1349, 1352, 1420,
1424, 1453, 1466, 1483, 1492, 1497, 1505, 1517, 1536, 1546,
1565, 1588, 1594, 1606, 1612
}

Definition at line 741 of file grammar.cc.

◆ yystos

const yytype_uint8 yystos[]
static

Definition at line 1505 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", "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.