Changeset c2da0a in git
- Timestamp:
- Apr 20, 1998, 12:05:55 PM (25 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'f875bbaccd0831e36aaed09ff6adeb3eb45aeb94')
- Children:
- 365819b7d885a4cbf318e09a20d2ae8dce0b45a4
- Parents:
- b35b93807f117d1b5cb55df216eefd3920e0d91f
- Location:
- Singular
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/libparse.h
rb35b93 rc2da0a 4 4 * Computer Algebra System SINGULAR * 5 5 ****************************************/ 6 /* $Id: libparse.h,v 1. 3 1998-04-06 16:27:19krueger Exp $ */6 /* $Id: libparse.h,v 1.4 1998-04-20 10:05:53 krueger Exp $ */ 7 7 /* 8 8 * ABSTRACT: lib parsing 9 9 */ 10 #include "subexpr.h" 10 #ifndef STANDALONE_PARSER 11 # include "subexpr.h" 12 #endif 11 13 typedef enum { LOAD_LIB, GET_INFO } lp_modes; 12 14 typedef enum { OLD_LIBSTYLE, NEW_LIBSTYLE } lib_style_types; -
Singular/libparse.l
rb35b93 rc2da0a 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 /* $Id: libparse.l,v 1. 6 1998-04-16 08:12:55 pohlExp $ */5 /* $Id: libparse.l,v 1.7 1998-04-20 10:05:54 krueger Exp $ */ 6 6 #include <stdio.h> 7 7 #include <string.h> … … 21 21 # include "febase.h" 22 22 # include "mmemory.h" 23 # include "libparse.h"24 # endif23 #endif 24 #include "libparse.h" 25 25 26 26 #ifdef HAVE_LIBPARSER … … 40 40 int quote = 0; /* " */ 41 41 int offset = 0; 42 int p_static = 0;42 BOOLEAN p_static = FALSE; 43 43 int old_state = 0; 44 44 lib_cmds last_cmd = LP_NONE; … … 112 112 #ifdef STANDALONE_PARSER 113 113 procinfov pi; 114 procinfo *iiInitSingularProcinfo(procinfov pi, char *libname,115 char *procname, int line, long pos,116 int pstatic = 0);117 114 printpi(procinfov pi); 118 115 pi_clear(procinfov pi); … … 236 233 } 237 234 238 static { p_static= 1; }235 static { p_static=TRUE; } 239 236 240 237 (proc[ \t]+{name})|([ \t]proc[ \t]+{name}) { 241 238 char proc[256]; 242 239 BEGIN(pdef); 243 #if YYLPDEBUG 240 #if YYLPDEBUG > 0 244 241 printf("Newlib:%s\n", newlib); 245 242 #endif 246 243 #ifdef STANDALONE_PARSER 247 if ( pi != NULL ) {248 printpi(pi);249 pi_clear(pi);250 }251 pi = (procinfo *)malloc(sizeof(procinfo));252 iiInitSingularProcinfo(pi, newlib, yytext+5, yylplineno,244 if ( pi != NULL ) { 245 printpi(pi); 246 pi_clear(pi); 247 } 248 pi = (procinfo *)malloc(sizeof(procinfo)); 249 iiInitSingularProcinfo(pi, newlib, yytext+5, yylplineno, 253 250 current_pos(0), p_static); 254 251 #else STANDALONE_PARSER … … 271 268 yylplineno, current_pos(0), brace1, yytext); 272 269 #endif 273 p_static=0; 270 p_static=FALSE; 271 #ifndef STANDALONE_PARSER 274 272 } 273 #endif STANDALONE_PARSER 275 274 } 276 275 example { … … 546 545 547 546 \n { yylplineno++; } 548 ; { p_static = 0;547 ; { p_static = FALSE; 549 548 #if YYLPDEBUG 550 549 printf("%s", yytext); 551 550 #endif 552 551 } 553 . { p_static = 0;552 . { p_static = FALSE; 554 553 yylp_errno = YYLP_BAD_CHAR; 555 554 #if YYLPDEBUG … … 625 624 void copy_string(lp_modes mode) 626 625 { 626 #ifndef STANDALONE_PARSER 627 627 if((last_cmd == LP_INFO)&&(mode == GET_INFO)) { 628 628 long current_location = ftell(yylpin); … … 633 633 fseek(yylpin, current_location, SEEK_SET); 634 634 } 635 #endif /* STANDALONE_PARSER */ 635 636 } 636 637 … … 667 668 yylplex(argv[0], argv[0], &lib_style); 668 669 if(yylp_errno) { 669 printf("ERROR accured: ");670 printf("ERROR accured: [%d] ", yylp_errno); 670 671 printf(yylp_errlist[yylp_errno], yylplineno); 671 672 printf("\n"); -
Singular/utils.cc
rb35b93 rc2da0a 9 9 procinfo *iiInitSingularProcinfo(procinfov pi, char *libname, 10 10 char *procname, int line, long pos, 11 int pstatic = 0)11 BOOLEAN pstatic = FALSE) 12 12 { 13 13 pi->libname = (char *)malloc(strlen(libname)+1); -
Singular/utils.h
rb35b93 rc2da0a 1 1 /* 2 2 */ 3 4 typedef short BOOLEAN; 5 6 #ifndef FALSE 7 #define FALSE 0 8 #endif 9 10 #ifndef TRUE 11 #define TRUE 1 12 #endif 3 13 4 14 class procinfo;
Note: See TracChangeset
for help on using the changeset viewer.