--- parser3/src/main/compile.tab.C 2003/03/21 14:27:51 1.81.2.13.2.8 +++ parser3/src/main/compile.tab.C 2003/03/27 14:51:27 1.81.2.13.2.16 @@ -43,7 +43,7 @@ Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.tab.C,v 1.81.2.13.2.8 2003/03/21 14:27:51 paf Exp $ + $Id: compile.tab.C,v 1.81.2.13.2.16 2003/03/27 14:51:27 paf Exp $ */ /** @@ -1073,7 +1073,7 @@ case 8: YYERROR; } } else if(command==USE_CONTROL_METHOD_NAME) { - for(int i=0; icount(); i+=2) + for(size_t i=0; icount(); i+=2) PC.request.use_file(PC.request.main_class, *LA2S(*strings_code, i)); } else if(command==BASE_NAME) { if(PC.cclass->base_class()) { // already changed from default? @@ -1125,7 +1125,7 @@ case 16: const String& name=*LA2S(*yyvsp[-5]); YYSTYPE params_names_code=yyvsp[-4]; - ArrayString* params_names; + ArrayString* params_names=0; if(int size=params_names_code->count()) { params_names=new ArrayString; for(int i=0; icount()) { locals_names=new ArrayString; for(int i=0; i ^if ELEMENT_OR_OPERATOR // OP_VALUE+string+OP_GET_ELEMENT. -> OP_VALUE+string+OP_GET_ELEMENT_OR_OPERATOR. if(PC.in_call_value && diving_code->count()==3) - (*diving_code)[2].code=OP_GET_ELEMENT_OR_OPERATOR; + diving_code->put(2, OP_GET_ELEMENT_OR_OPERATOR); P(*yyval, *diving_code); } /* diving code; stack: current context */ @@ -1979,7 +1979,7 @@ default: case '"': case ':': if(end!=begin) { // append piece till ^ - PC.string.append(begin, end-begin); + PC.string.append_strdup(begin, end-begin); } // reset piece 'begin' position & line begin=PC.source; // ->punctuation @@ -1993,7 +1993,7 @@ default: case '#': if(end!=begin) { // append piece till ^ - PC.string.append(begin, end-begin); + PC.string.append_strdup(begin, end-begin); } // #HH ? if(PC.source[0]=='#' && PC.source[1] && PC.source[2]) { @@ -2024,7 +2024,7 @@ default: if(c=='#' && PC.col==1) { if(end!=begin) { // append piece till # - PC.string.append(begin, end-begin); + PC.string.append_strdup(begin, end-begin); } // fall into COMMENT lexical state [wait for \n] push_LS(PC, LS_USER_COMMENT); @@ -2167,7 +2167,7 @@ default: case '#': // comment start skipping if(end!=begin) { // append piece till # - PC.string.append(begin, end-begin); + PC.string.append_strdup(begin, end-begin); } // fall into COMMENT lexical state [wait for \n] push_LS(PC, LS_EXPRESSION_COMMENT); @@ -2599,10 +2599,10 @@ break2: } if(end!=begin && PC.ls!=LS_USER_COMMENT) { // last piece still alive and not comment? // append it - PC.string.append(begin, end-begin); + PC.string.append_strdup(begin, end-begin); } } - if(PC.string!=CORD_EMPTY) { // something accumulated? + if(!PC.string.is_empty()) { // something accumulated? // create STRING value: array of OP_VALUE+vstring *lvalp=VL(new VString(*new String(PC.string, String::L_CLEAN))); // new pieces storage