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

Typedefs

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

Enumerations

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

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

EXTERN_VAR int yylineno
 
EXTERN_VAR FILE * yyin
 
const char * currid
 
VAR BOOLEAN yyInRingConstruction =FALSE
 
VAR BOOLEAN expected_parms
 
VAR int cmdtok
 
VAR 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 []
 
VAR int yydebug
 

Macro Definition Documentation

◆ _STDLIB_H

#define _STDLIB_H   1

Definition at line 503 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"); \
} \
(i) = (int)((long)(a).Data());(a).CleanUp()
int i
Definition: cfEzgcd.cc:132
#define YYERROR
Definition: grammar.cc:1558
@ INT_CMD
Definition: tok.h:96

Definition at line 177 of file grammar.cc.

◆ YY_

#define YY_ (   msgid)    msgid

Definition at line 425 of file grammar.cc.

◆ YY_LOCATION_PRINT

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

Definition at line 1637 of file grammar.cc.

◆ YY_REDUCE_PRINT

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

Definition at line 1797 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))

Definition at line 1759 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))

Definition at line 1664 of file grammar.cc.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 1557 of file grammar.cc.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 1556 of file grammar.cc.

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
} \
while (YYID (0))
#define YY_(msgid)
Definition: grammar.cc:425
#define YYTRANSLATE(YYX)
Definition: grammar.cc:598
#define YYEMPTY
Definition: grammar.cc:1553
EXTERN_VAR YYSTYPE yylval
Definition: stype.h:20

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

◆ YYDPRINTF

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

Definition at line 1658 of file grammar.cc.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 1553 of file grammar.cc.

◆ YYEOF

#define YYEOF   0

Definition at line 1554 of file grammar.cc.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 1597 of file grammar.cc.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 1551 of file grammar.cc.

◆ YYERROR

#define YYERROR   goto yyerrorlab

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

◆ YYFINAL

#define YYFINAL   2

Definition at line 581 of file grammar.cc.

◆ YYFPRINTF

#define YYFPRINTF   fprintf

Definition at line 1655 of file grammar.cc.

◆ YYFREE

#define YYFREE   free

Definition at line 514 of file grammar.cc.

◆ YYID

#define YYID (   n)    (n)

Definition at line 438 of file grammar.cc.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1816 of file grammar.cc.

◆ YYLAST

#define YYLAST   2567

Definition at line 583 of file grammar.cc.

◆ YYLEX

#define YYLEX   yylex (&yylval)

Definition at line 1647 of file grammar.cc.

◆ YYLLOC_DEFAULT

#define YYLLOC_DEFAULT (   Current,
  Rhs,
  N 
)
Value:
do \
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))
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:56
#define YYRHSLOC(Rhs, K)
Definition: grammar.cc:1604

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

◆ YYMAXDEPTH

#define YYMAXDEPTH   MAX_INT_VAL

Definition at line 166 of file grammar.cc.

◆ YYMAXUTOK

#define YYMAXUTOK   342

Definition at line 596 of file grammar.cc.

◆ YYNNTS

#define YYNNTS   44

Definition at line 588 of file grammar.cc.

◆ YYNRULES

#define YYNRULES   175

Definition at line 590 of file grammar.cc.

◆ YYNSTATES

#define YYNSTATES   398

Definition at line 592 of file grammar.cc.

◆ YYNTOKENS

#define YYNTOKENS   104

Definition at line 586 of file grammar.cc.

◆ YYPACT_NINF

#define YYPACT_NINF   -364

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

◆ YYRHSLOC

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

Definition at line 1604 of file grammar.cc.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 415 of file grammar.cc.

◆ YYSIZE_T

#define YYSIZE_T   size_t

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

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 496 of file grammar.cc.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 494 of file grammar.cc.

◆ YYTABLE_NINF

#define YYTABLE_NINF   -155

Definition at line 982 of file grammar.cc.

◆ YYTERROR

#define YYTERROR   1

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

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 595 of file grammar.cc.

◆ YYUSE

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

Definition at line 431 of file grammar.cc.

Typedef Documentation

◆ yytype_int16

typedef short int yytype_int16

Definition at line 398 of file grammar.cc.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 384 of file grammar.cc.

◆ yytype_uint16

typedef unsigned short int yytype_uint16

Definition at line 392 of file grammar.cc.

◆ yytype_uint8

typedef unsigned char yytype_uint8

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

Function Documentation

◆ yy_reduce_print()

static void yy_reduce_print ( YYSTYPE yyvsp,
int  yyrule 
)
static

Definition at line 1773 of file grammar.cc.

1780{
1781 int yynrhs = yyr2[yyrule];
1782 int yyi;
1783 unsigned long int yylno = yyrline[yyrule];
1784 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1785 yyrule - 1, yylno);
1786 /* The symbols being reduced. */
1787 for (yyi = 0; yyi < yynrhs; yyi++)
1788 {
1789 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1790 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1791 &(yyvsp[(yyi + 1) - (yynrhs)])
1792 );
1793 YYFPRINTF (stderr, "\n");
1794 }
1795}
static const yytype_uint16 yyrline[]
Definition: grammar.cc:743
static void yy_symbol_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: grammar.cc:1716
static const yytype_uint8 yyr2[]
Definition: grammar.cc:842
static const yytype_uint16 yyprhs[]
Definition: grammar.cc:644
static const yytype_int16 yyrhs[]
Definition: grammar.cc:667

◆ yy_stack_print()

static void yy_stack_print ( yytype_int16 yybottom,
yytype_int16 yytop 
)
static

Definition at line 1742 of file grammar.cc.

1749{
1750 YYFPRINTF (stderr, "Stack now");
1751 for (; yybottom <= yytop; yybottom++)
1752 {
1753 int yybot = *yybottom;
1754 YYFPRINTF (stderr, " %d", yybot);
1755 }
1756 YYFPRINTF (stderr, "\n");
1757}

◆ yy_symbol_print()

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

Definition at line 1716 of file grammar.cc.

1724{
1725 if (yytype < YYNTOKENS)
1726 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1727 else
1728 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1729
1730 yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1731 YYFPRINTF (yyoutput, ")");
1732}
#define YYNTOKENS
Definition: grammar.cc:586
static void yy_symbol_value_print(FILE *yyoutput, int yytype, YYSTYPE const *const yyvaluep)
Definition: grammar.cc:1684
static const char *const yytname[]
Definition: grammar.cc:769

◆ yy_symbol_value_print()

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

Definition at line 1684 of file grammar.cc.

1692{
1693 if (!yyvaluep)
1694 return;
1695# ifdef YYPRINT
1696 if (yytype < YYNTOKENS)
1697 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1698# else
1699 YYUSE (yyoutput);
1700# endif
1701 switch (yytype)
1702 {
1703 default:
1704 break;
1705 }
1706}
#define YYUSE(e)
Definition: grammar.cc:431

◆ yydestruct()

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

Definition at line 2051 of file grammar.cc.

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

◆ 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 {
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 (%d)",VoiceName(),VoiceLine());
234 }
235}
int BOOLEAN
Definition: auxiliary.h:87
#define TRUE
Definition: auxiliary.h:100
Voice * prev
Definition: fevoices.h:62
const CanonicalForm int s
Definition: facAbsFact.cc:51
VAR short errorreported
Definition: feFopen.cc:23
void WerrorS(const char *s)
Definition: feFopen.cc:24
VAR char my_yylinebuf[80]
Definition: febase.cc:44
VAR int myynest
Definition: febase.cc:41
VAR Voice * currentVoice
Definition: fevoices.cc:49
const char * VoiceName()
Definition: fevoices.cc:58
int VoiceLine()
Definition: fevoices.cc:66
const char * Tok2Cmdname(int tok)
Definition: gentable.cc:140
const char * currid
Definition: grammar.cc:171
VAR BOOLEAN expected_parms
Definition: grammar.cc:173
VAR int inerror
Definition: grammar.cc:175
EXTERN_VAR int yylineno
Definition: grammar.cc:168
VAR int cmdtok
Definition: grammar.cc:174
void killid(const char *id, idhdl *ih)
Definition: ipid.cc:387
#define IDROOT
Definition: ipid.h:19
const char * lastreserved
Definition: ipshell.cc:82
#define NULL
Definition: omList.c:12
void Werror(const char *fmt,...)
Definition: reporter.cc:189
VAR int sdb_flags
Definition: sdb.cc:31
#define HAVE_SDB
Definition: sdb.h:10

◆ yyparse()

int yyparse ( void  )

Definition at line 2111 of file grammar.cc.

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

Variable Documentation

◆ cmdtok

VAR int cmdtok

Definition at line 174 of file grammar.cc.

◆ currid

const char* currid

Definition at line 171 of file grammar.cc.

◆ expected_parms

VAR BOOLEAN expected_parms

Definition at line 173 of file grammar.cc.

◆ inerror

VAR int inerror = 0

Definition at line 175 of file grammar.cc.

◆ yycheck

const yytype_int16 yycheck[]
static

Definition at line 1244 of file grammar.cc.

◆ yydebug

VAR int yydebug

Definition at line 1805 of file grammar.cc.

◆ yydefact

const yytype_uint8 yydefact[]
static

Definition at line 867 of file grammar.cc.

◆ yydefgoto

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 1, 56, 57, 58, 59, 60, 61, 146, 63,
220, 64, 65, 247, 66, 67, 68, 69, 70, 190,
371, 372, 383, 373, 153, 99, 72, 73, 74, 75,
76, 77, 78, 79, 80, 81, 82, 83, 84, 85,
86, 87, 88, 89
}

Definition at line 912 of file grammar.cc.

◆ yyin

EXTERN_VAR FILE* yyin

Definition at line 169 of file grammar.cc.

◆ yyInRingConstruction

VAR BOOLEAN yyInRingConstruction =FALSE

Definition at line 172 of file grammar.cc.

◆ yylineno

EXTERN_VAR int yylineno

Definition at line 168 of file grammar.cc.

◆ yypact

const yytype_int16 yypact[]
static

Definition at line 924 of file grammar.cc.

◆ yypgoto

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-364, -364, -364, -364, -364, -364, -364, 72, -1, 25,
-364, -364, -364, -15, -364, -364, 325, 285, 251, -220,
-364, -363, -57, -46, -68, 1, -364, -364, -364, -364,
-364, -364, -364, -364, -364, -364, -364, -364, -364, -364,
-364, -364, -364, -364
}

Definition at line 969 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, 488, 491,
495, 498, 502, 505, 508, 512, 517, 522, 527, 532,
537, 542, 547, 552, 559, 566, 573, 580, 587, 594,
601, 605, 607, 616, 619, 624, 632, 635, 637, 639,
642, 645, 647, 653, 656, 662, 664, 666, 670, 676,
680, 684, 689, 692, 695, 700
}

Definition at line 644 of file grammar.cc.

◆ yyr1

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

Definition at line 819 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, 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 842 of file grammar.cc.

◆ yyrhs

const yytype_int16 yyrhs[]
static

Definition at line 667 of file grammar.cc.

◆ yyrline

const yytype_uint16 yyrline[]
static
Initial value:
=
{
0, 318, 318, 320, 354, 355, 357, 359, 363, 368,
370, 421, 422, 423, 424, 425, 426, 427, 428, 432,
435, 436, 437, 438, 439, 440, 441, 442, 443, 446,
453, 458, 462, 466, 470, 474, 488, 516, 540, 546,
552, 556, 560, 564, 568, 572, 576, 580, 584, 588,
592, 596, 600, 604, 608, 612, 616, 620, 624, 628,
632, 638, 642, 646, 650, 654, 659, 663, 674, 677,
678, 679, 683, 687, 691, 695, 699, 703, 707, 711,
715, 732, 739, 738, 756, 764, 772, 781, 785, 789,
793, 797, 801, 805, 809, 813, 817, 821, 825, 829,
841, 848, 849, 868, 869, 881, 886, 891, 895, 899,
936, 960, 981, 989, 993, 994, 1008, 1016, 1025, 1070,
1071, 1080, 1081, 1087, 1094, 1095, 1096, 1097, 1105, 1110,
1115, 1122, 1130, 1142, 1159, 1179, 1183, 1187, 1192, 1196,
1200, 1204, 1208, 1213, 1219, 1225, 1231, 1237, 1243, 1249,
1261, 1268, 1272, 1309, 1316, 1321, 1334, 1341, 1341, 1344,
1412, 1416, 1445, 1458, 1475, 1484, 1489, 1497, 1509, 1528,
1538, 1557, 1580, 1586, 1598, 1604
}

Definition at line 743 of file grammar.cc.

◆ yystos

const yytype_uint8 yystos[]
static

Definition at line 1507 of file grammar.cc.

◆ yytable

const yytype_int16 yytable[]
static

Definition at line 983 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", "BUCKET_CMD", "IDEAL_CMD", "MAP_CMD", "MATRIX_CMD",
"MODUL_CMD", "NUMBER_CMD", "POLY_CMD", "RESOLUTION_CMD", "SMATRIX_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", "MONOM",
"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 769 of file grammar.cc.

◆ yytranslate

const yytype_uint8 yytranslate[]
static

Definition at line 602 of file grammar.cc.