Changeset 64d729 in git
- Timestamp:
- Apr 15, 1999, 7:28:06 PM (24 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- dd9b83cb6123e79d811d45dd8b7d79c748f994e6
- Parents:
- 1518b9cf23aa2598228863099857cedec82668c2
- Location:
- Singular
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ChangeLog
r1518b9 r64d729 1 Thu Apr 15 19:26:07 MET DST 1999 hannes 2 * start to implement debugger (sdb.h,sdb.cc, febase*, iplib,cc, scanner) 3 1 4 Tue Mar 16 15:54:02 MET 1999 hannes 2 5 * introduced new routine ERROR(string) (iparith.cc, tok.h) -
Singular/Makefile.in
r1518b9 r64d729 72 72 comm.cc kstd1.cc kstd2.cc kutil.cc lists.cc \ 73 73 longalg.cc longrat.cc longrat0.cc \ 74 maps.cc matpol.cc misc.cc \74 maps.cc matpol.cc misc.cc sdb.cc \ 75 75 mminit.cc modulop.cc sparsmat.cc \ 76 76 fglm.cc fglmzero.cc fglmvec.cc fglmgauss.cc fglmhom.cc fglmcomb.cc \ … … 94 94 numbers.h stype.h clapconv.h ipconv.h maps.h page.h \ 95 95 subexpr.h clapsing.h ipid.h matpol.h polys.h syz.h \ 96 cntrlc.h ipprint.h ring.h timer.h \96 cntrlc.h ipprint.h ring.h timer.h sdb.h \ 97 97 febase.h ipshell.h shortfl.h tok.h \ 98 98 mmemory.h mmprivate.h mmheap.h mmpage.h page.h \ … … 130 130 mpsr_Error.o mpsr_Put.o mpsr_PutPoly.o mpsr_GetPoly.o \ 131 131 mpsr_Get.o mpsr_GetMisc.o ndbm.o spSpolyLoop.o libparse.o \ 132 find_exec.o getopt.o fereadl.o mod_raw.o \132 find_exec.o getopt.o fereadl.o mod_raw.o sdb.o \ 133 133 pcv.o 134 134 … … 343 343 sing_mp.og fglm.og fglmzero.og fglmvec.og fglmgauss.og fglmhom.og\ 344 344 algmap.og clapconv.og clapmem.og clapsing.og \ 345 cntrlc.og \345 cntrlc.og sdb.og\ 346 346 mpsr_Error.og mpsr_Put.og mpsr_PutPoly.og mpsr_GetPoly.og \ 347 347 mpsr_Get.og mpsr_GetMisc.og \ … … 419 419 sing_mp.op fglm.op fglmzero.op fglmvec.op fglmgauss.op fglmhom.op\ 420 420 algmap.op clapconv.op clapmem.op clapsing.op \ 421 cntrlc.op \421 cntrlc.op sdb.op\ 422 422 mpsr_Error.op mpsr_Put.op mpsr_PutPoly.op mpsr_GetPoly.op \ 423 423 mpsr_Get.op mpsr_GetMisc.op \ … … 445 445 sing_mp.ob fglm.ob fglmzero.ob fglmvec.ob fglmgauss.ob fglmhom.ob\ 446 446 algmap.ob clapconv.ob clapmem.ob clapsing.ob \ 447 cntrlc.ob \447 cntrlc.ob sdb.ob \ 448 448 mpsr_Error.ob mpsr_Put.ob mpsr_PutPoly.ob mpsr_GetPoly.ob \ 449 449 mpsr_Get.ob mpsr_GetMisc.ob \ -
Singular/attrib.cc
r1518b9 r64d729 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: attrib.cc,v 1.1 1 1999-03-16 15:33:04Singular Exp $ */4 /* $Id: attrib.cc,v 1.12 1999-04-15 17:28:02 Singular Exp $ */ 5 5 6 6 /* … … 267 267 procinfo *p=(procinfo *)v->Data(); 268 268 if (p->trace_flag!=0) 269 Print(" trace:%d\n",p->trace_flag);269 Print("TRACE:%d\n",p->trace_flag); 270 270 } 271 271 if (hasFlag(v,FLAG_STD)) … … 300 300 res->data=(void *)(((ideal)v->Data())->rank); 301 301 } 302 else if ((v->Typ()==PROC_CMD) && (strcmp(name," trace")==0))302 else if ((v->Typ()==PROC_CMD) && (strcmp(name,"TRACE")==0)) 303 303 { 304 304 procinfo *p=(procinfo *)v->Data(); … … 362 362 I->rank=max(I->rank,(int)c->Data()); 363 363 } 364 else if ((strcmp(name," trace")==0)&&(v->Typ()==PROC_CMD))364 else if ((strcmp(name,"TRACE")==0)&&(v->Typ()==PROC_CMD)) 365 365 { 366 366 if (c->Typ()!=INT_CMD) 367 367 { 368 WerrorS("attrib ` trace` must be int");368 WerrorS("attrib `TRACE` must be int"); 369 369 return TRUE; 370 370 } -
Singular/febase.inc
r1518b9 r64d729 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: febase.inc,v 1.2 0 1999-03-16 15:33:06Singular Exp $ */4 /* $Id: febase.inc,v 1.21 1999-04-15 17:28:02 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: handling of 'voices' 7 7 */ 8 8 #include <ctype.h> 9 #include "sdb.h" 10 11 extern int blocknest; /* scaner.l internal */ 9 12 10 13 int yy_noeof=0; // the scanner "state" … … 154 157 case BT_if: 155 158 case BT_else: 156 yylineno = yy_blocklineno;157 break;158 159 case BT_break: 159 160 yylineno = yy_blocklineno-1; … … 401 402 else 402 403 Print("%s %3d%c ",currentVoice->filename,yylineno,prompt_char); 403 }404 } 404 405 #ifdef HAVE_TCL 405 406 if(tclmode) … … 426 427 Print("{%d}",yylineno); 427 428 mflush(); 429 } 430 if ((blocknest==0) 431 && (currentVoice->pi!=NULL) 432 && (currentVoice->pi->trace_flag&TRACE_BREAKPOINT)) 433 { 434 sdb(currentVoice, anf, len_s); 428 435 } 429 436 prompt_char = '.'; -
Singular/grammar.y
r1518b9 r64d729 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: grammar.y,v 1.5 7 1999-03-19 14:17:58 obachmanExp $ */4 /* $Id: grammar.y,v 1.58 1999-04-15 17:28:03 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: SINGULAR shell grammatik … … 594 594 if(iiExprArith3(&$$,$1,&$3,&$5,&$7)) YYERROR; 595 595 } 596 | CMD_23 '(' expr ',' expr ')' 597 { 598 if(iiExprArith2(&$$,&$3,$1,&$5,TRUE)) YYERROR; 599 } 600 | CMD_23 '(' expr ',' expr ',' expr ')' 601 { 602 if(iiExprArith3(&$$,$1,&$3,&$5,&$7)) YYERROR; 603 } 604 | CMD_12 '(' expr ')' 605 { 606 if(iiExprArith1(&$$,&$3,$1)) YYERROR; 607 } 608 | CMD_12 '(' expr ',' expr ')' 609 { 610 if(iiExprArith2(&$$,&$3,$1,&$5,TRUE)) YYERROR; 611 } 612 | CMD_123 '(' expr ')' 613 { 614 if(iiExprArith1(&$$,&$3,$1)) YYERROR; 615 } 616 | CMD_123 '(' expr ',' expr ')' 617 { 618 if(iiExprArith2(&$$,&$3,$1,&$5,TRUE)) YYERROR; 619 } 620 | CMD_123 '(' expr ',' expr ',' expr ')' 621 { 622 if(iiExprArith3(&$$,$1,&$3,&$5,&$7)) YYERROR; 623 } 596 624 | CMD_M '(' ')' 597 625 { 598 626 if(iiExprArithM(&$$,NULL,$1)) YYERROR; 599 627 } 600 | CMD_23 '(' expr ',' expr ')' 601 { 602 if(iiExprArith2(&$$,&$3,$1,&$5,TRUE)) YYERROR; 603 } 604 | CMD_23 '(' expr ',' expr ',' expr ')' 605 { 606 if(iiExprArith3(&$$,$1,&$3,&$5,&$7)) YYERROR; 607 } 608 | CMD_12 '(' expr ')' 609 { 610 if(iiExprArith1(&$$,&$3,$1)) YYERROR; 611 } 612 | CMD_12 '(' expr ',' expr ')' 613 { 614 if(iiExprArith2(&$$,&$3,$1,&$5,TRUE)) YYERROR; 615 } 616 | CMD_123 '(' expr ')' 617 { 618 if(iiExprArith1(&$$,&$3,$1)) YYERROR; 619 } 620 | CMD_123 '(' expr ',' expr ')' 621 { 622 if(iiExprArith2(&$$,&$3,$1,&$5,TRUE)) YYERROR; 623 } 624 | CMD_123 '(' expr ',' expr ',' expr ')' 625 { 626 if(iiExprArith3(&$$,$1,&$3,&$5,&$7)) YYERROR; 628 | CMD_M '(' exprlist ')' 629 { 630 if(iiExprArithM(&$$,&$3,$1)) YYERROR; 627 631 } 628 632 | MATRIX_CMD '(' expr ',' expr ',' expr ')' … … 637 641 { 638 642 if(iiExprArith1(&$$,&$3,INTMAT_CMD)) YYERROR; 639 }640 | CMD_M '(' exprlist ')'641 {642 if(iiExprArithM(&$$,&$3,$1)) YYERROR;643 643 } 644 644 | quote_start expr quote_end … … 1553 1553 if (currentVoice->ifsw!=2) 1554 1554 { 1555 char *s=$2+strlen($2)-1;1556 while ((*s=='\0')||(*s=='\n')) s--;1557 s[1]='\0';1558 1555 Warn("`else` without `if` in level %d",myynest); 1559 1556 } -
Singular/iplib.cc
r1518b9 r64d729 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iplib.cc,v 1.5 3 1999-04-01 10:09:58 krueger Exp $ */4 /* $Id: iplib.cc,v 1.54 1999-04-15 17:28:04 Singular Exp $ */ 5 5 /* 6 6 * ABSTRACT: interpreter: LIB and help … … 245 245 BOOLEAN err=FALSE; 246 246 int old_echo=si_echo; 247 char save_flags=0; 248 procinfov pi=NULL; 247 249 248 250 /* init febase ======================================== */ … … 250 252 if (pn!=NULL) 251 253 { 252 procinfov pi;253 254 pi = IDPROC(pn); 254 255 if(pi!=NULL) 255 256 { 257 save_flags=pi->trace_flag; 256 258 if( pi->data.s.body==NULL ) 257 259 { 258 iiGetLibProcBuffer( IDPROC(pn));259 if ( IDPROC(pn)->data.s.body==NULL) return TRUE;260 iiGetLibProcBuffer(pi); 261 if (pi->data.s.body==NULL) return TRUE; 260 262 } 261 newBuffer( mstrdup(IDPROC(pn)->data.s.body), BT_proc, 262 pi, IDPROC(pn)->data.s.body_lineno ); 263 } 264 //else 265 //{ // for security only 266 // newBuffer( mstrdup(IDSTRING(pn)), BT_proc, IDID(pn) ); 267 //} 263 newBuffer( mstrdup(pi->data.s.body), BT_proc, 264 pi, pi->data.s.body_lineno-(v!=NULL) ); 265 } 268 266 } 269 267 /* generate argument list ======================================*/ … … 280 278 /* start interpreter ======================================*/ 281 279 myynest++; 282 //Print("%-*.*s PStart <<%s>>, level:%d\n",2*myynest,2*myynest," ",IDID(pn),myynest);283 280 err=yyparse(); 284 281 killlocals(myynest); 285 282 myynest--; 286 283 si_echo=old_echo; 287 //Print("%-*.*s PEnd <<%s>>, level:%d\n",2*myynest,2*myynest," ",IDID(pn),myynest);288 284 if (pi!=NULL) 285 pi->trace_flag=save_flags; 289 286 return err; 290 287 } … … 628 625 char libnamebuf[128]; 629 626 package pack = IDPACKAGE(packhdl); 630 627 631 628 if(pack->language == LANG_NONE) return FALSE; 632 629 633 630 FILE * fp = feFopen( pack->libname, "r", libnamebuf, FALSE); 634 631 if (fp==NULL) … … 766 763 LoadResult = iiLoadLIB(fp, libnamebuf, newlib, NULL, FALSE, tellerror); 767 764 #endif /* HAVE_NAMESPACES */ 768 765 769 766 #ifdef HAVE_NAMESPACES 770 767 if(!LoadResult) IDPACKAGE(pl)->loaded = TRUE; … … 836 833 fclose( yylpin ); 837 834 fp = NULL; 838 835 839 836 #ifdef HAVE_NAMESPACES 840 837 namespaceroot->pop(); … … 940 937 int token; 941 938 char FullName[256]; 942 939 943 940 if( *fullname != '/' && *fullname != '.' ) 944 941 sprintf(FullName, "./%s", newlib); 945 942 else strcpy(FullName, fullname); 946 943 947 944 948 945 if(IsCmd(plib, &token)) … … 965 962 { 966 963 Warn("not of typ package."); 967 goto load_modules_end; 964 goto load_modules_end; 968 965 } 969 966 } … … 974 971 WerrorS("dynl_open failed"); 975 972 Werror("%s not found", newlib); 976 goto load_modules_end; 973 goto load_modules_end; 977 974 } 978 975 else … … 988 985 namespaceroot->pop(); 989 986 return RET; 990 987 991 988 } 992 989 #endif /* HAVE_DYNAMIC_LOADING */ … … 1144 1141 FILE * fp = feFopen( newlib, "r", libnamebuf, FALSE ); 1145 1142 ret = stat(libnamebuf, &sb); 1146 1143 1147 1144 if (fp==NULL) 1148 1145 { … … 1174 1171 } 1175 1172 if(isprint(buf[0]) || buf[0]=='\n') { LT = LT_SINGULAR; goto lib_type_end; } 1176 1173 1177 1174 lib_type_end: 1178 1175 fclose(fp); -
Singular/ipshell.h
r1518b9 r64d729 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: ipshell.h,v 1.1 6 1999-03-11 15:58:07Singular Exp $ */6 /* $Id: ipshell.h,v 1.17 1999-04-15 17:28:05 Singular Exp $ */ 7 7 /* 8 8 * ABSTRACT … … 18 18 #define TRACE_SHOW_RINGS 8 19 19 #define TRACE_SHOW_LINE1 16 20 #define TRACE_BREAKPOINT 32 21 #define TRACE_TMP_BREAKPOINT 64 20 22 extern leftv iiCurrArgs; 21 23 extern int iiOp; /* the current operation*/ -
Singular/scanner.l
r1518b9 r64d729 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 /* $Id: scanner.l,v 1.1 5 1999-03-19 17:42:33 obachmanExp $ */5 /* $Id: scanner.l,v 1.16 1999-04-15 17:28:06 Singular Exp $ */ 6 6 #include <stdio.h> 7 7 #include <string.h> … … 19 19 #define ALLOC(a) Alloc((a)) 20 20 int yylineno = 0; 21 staticint blocknest = 0;21 int blocknest = 0; 22 22 extern char * yytext; 23 23 //extern unsigned char * yytext;
Note: See TracChangeset
for help on using the changeset viewer.