Changeset c232af in git for Singular/scanner.l
- Timestamp:
- Aug 14, 2000, 2:58:28 PM (24 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
- Children:
- d26c2e9dd38f1531c0e77c38e6177109182b5bca
- Parents:
- 4697a8a1ccbf49d0048033ea29c651e3966ba729
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/scanner.l
r4697a8a rc232af 3 3 * Computer Algebra System SINGULAR * 4 4 ****************************************/ 5 /* $Id: scanner.l,v 1.2 6 2000-01-11 17:51:14 SingularExp $ */5 /* $Id: scanner.l,v 1.27 2000-08-14 12:56:48 obachman Exp $ */ 6 6 #include <stdio.h> 7 7 #include <string.h> … … 10 10 11 11 #include "mod2.h" 12 #include <omalloc.h> 12 13 #include "tok.h" 13 14 #include "stype.h" 14 15 #include "ipshell.h" 15 #include "mmemory.h"16 16 #include "febase.h" 17 17 18 18 int feReadLine(char* b, int l); 19 #define ALLOC(a) Alloc((a))19 #define ALLOC(a) omAlloc((a)) 20 20 int yylineno = 0; 21 21 int blocknest = 0; … … 27 27 static char * dupyytext() 28 28 { 29 char* s; 29 30 if (yyleng>0) yytext[yyleng-1] = '\0'; 30 return mstrdup((char *)yytext); 31 s = omStrDup((char *)yytext); 32 omMarkAsStaticAddr(s); 33 return s; 31 34 } 32 35 … … 34 37 { 35 38 int i = yyleng;//strlen((char *)yytext); 36 char * rc = (char*)AllocL( 3 + i ); 39 char * rc = (char*)omAlloc( 3 + i ); 40 omMarkAsStaticAddr(rc); 37 41 if (i>0) 38 42 { … … 128 132 proc[ \t]+{name}[ \t]*\( { 129 133 char c; char *cp; 130 lvalp->name = mstrdup(iiProcName((char *)yytext,c,cp));134 lvalp->name = omStrDup(iiProcName((char *)yytext,c,cp)); 131 135 yy_noeof = noeof_procname; 132 136 blocknest = 1; … … 135 139 } 136 140 <asstring>[^;\n]+ { 137 lvalp->name = mstrdup((char *)yytext);141 lvalp->name = omStrDup((char *)yytext); 138 142 yy_noeof = 0; BEGIN(INITIAL); 139 143 return STRINGTOK; … … 178 182 <bracket>[ \t\n]* { ; } 179 183 <bracket>[^\(\), \t\n]* { 180 lvalp->name = mstrdup((char *)yytext);184 lvalp->name = omStrDup((char *)yytext); 181 185 return STRINGTOK; 182 186 } 183 187 <bracket>\"[^\"]*\" { 184 lvalp->name = mstrdup((char *)yytext);188 lvalp->name = omStrDup((char *)yytext); 185 189 return STRINGTOK; 186 190 } … … 257 261 \\ { return '\\'; } 258 262 newline { 259 lvalp->name = mstrdup("\n");263 lvalp->name = omStrDup("\n"); 260 264 return STRINGTOK; 261 265 } … … 279 283 mmStat(-500); 280 284 #endif 281 #ifdef MDEBUG 282 #ifdef MLIST 283 mmTestList(stdout, 0); 284 #endif 285 #ifdef OM_TRACK 286 omPrintUsedTrackAddrs(stdout); 285 287 #endif 286 288 m2_end(0); … … 312 314 if (rc) return rc; 313 315 } 314 lvalp->name = mstrdup((char *)yytext);316 lvalp->name = omStrDup((char *)yytext); 315 317 return UNKNOWN_IDENT; 316 318 }
Note: See TracChangeset
for help on using the changeset viewer.