Changeset 721 in dev for trunk/ab5.0
- Timestamp:
- Aug 15, 2008, 1:51:23 AM (16 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/MakeExe.cpp
r639 r721 295 295 #endif 296 296 } 297 void MainThread(void * dummy)297 void MainThread(void *) 298 298 { 299 299 if( program.IsDebugRun() ) -
trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.cpp
r699 r721 292 292 } 293 293 294 295 BOOL GetVarFormatString( char *buffer,char *array,char *array2,char *NestMember,ReferenceKind &refType, PareOrBracket *pPareOrBracket ){ 294 //対応する閉じ括弧cPare_Closeが現れるまでbufからarrayへコピーする。 295 int CopyInsideBracket(char *array, const char *buf, char cPare_Open, char cPare_Close) 296 { 297 bool inStr=false; 298 for(int i2=0;;i2++){ 299 if(buf[i2]=='"'){ 300 inStr=!inStr; 301 } 302 if(!inStr){ 303 if(buf[i2]==cPare_Open){ 304 int i3; 305 if(cPare_Open=='[') i3=GetStringInBracket(array+i2,buf+i2); 306 else i3=GetStringInPare(array+i2,buf+i2); 307 i2+=i3-1; 308 continue; 309 } 310 if(buf[i2]==cPare_Close){ 311 array[i2]=0; 312 return i2; 313 } 314 } 315 array[i2]=buf[i2]; 316 } 317 } 318 319 bool GetVarFormatString( char *buffer,char *array,char *array2,char *NestMember,ReferenceKind &refType, PareOrBracket *pPareOrBracket ){ 296 320 extern int cp; 297 int i ,i2,i3;321 int i; 298 322 char cPare_Open,cPare_Close; 299 323 … … 335 359 336 360 buffer[i]=0; 337 for(i++,i2=0;;i++,i2++){ 338 if(buffer[i]==cPare_Open){ 339 if(cPare_Open=='[') i3=GetStringInBracket(array+i2,buffer+i); 340 else i3=GetStringInPare(array+i2,buffer+i); 341 i+=i3-1; 342 i2+=i3-1; 343 continue; 344 } 345 if(buffer[i]==cPare_Close){ 346 array[i2]=0; 347 break; 348 } 349 array[i2]=buffer[i]; 350 } 361 i++; 362 i+=CopyInsideBracket(array,buffer+i,cPare_Open,cPare_Close); 351 363 if(buffer[i+1]==cPare_Open){ 352 for(i+=2,i2=0;;i++,i2++){ 364 i+=2; 365 for(int i2=0;;i++,i2++){ 353 366 if(buffer[i]==cPare_Open){ 367 int i3; 354 368 if(cPare_Open=='[') i3=GetStringInBracket(array2+i2,buffer+i); 355 369 else i3=GetStringInPare(array2+i2,buffer+i); … … 366 380 if(buffer[i+1]==cPare_Open){ 367 381 compiler.errorMessenger.Output(14,buffer,cp); 368 return 0;382 return false; 369 383 } 370 384 } … … 385 399 if(buffer[i]=='\0') break; 386 400 } 387 return 1;401 return true; 388 402 } 389 403 -
trunk/ab5.0/abdev/BasicCompiler_Common/VariableOpe.h
r604 r721 20 20 Type GetStringTypeInfo(); 21 21 void GetWithName(char *buffer); 22 BOOLGetVarFormatString(char *buffer,char *array,char *array2,char *NestMember, ReferenceKind &refType, PareOrBracket *pPareOrBracket = NULL );22 bool GetVarFormatString(char *buffer,char *array,char *array2,char *NestMember, ReferenceKind &refType, PareOrBracket *pPareOrBracket = NULL ); 23 23 void GetArrayElement( const char *buffer,char *variable,char *array_element); 24 24 BOOL CheckVarNameError(char *name,int nowLine); -
trunk/ab5.0/abdev/BasicCompiler_Common/src/CodeGenerator.cpp
r276 r721 1 1 #include "stdafx.h" 2 2 3 #include <windows.h>4 #include <stdlib.h>5 6 3 int GlobalOpBufferSize;
Note:
See TracChangeset
for help on using the changeset viewer.