--- parser3/src/main/compile.tab.C 2003/03/26 13:59:12 1.81.2.13.2.13 +++ parser3/src/main/compile.tab.C 2003/03/27 15:33:20 1.81.2.13.2.17 @@ -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.13 2003/03/26 13:59:12 paf Exp $ + $Id: compile.tab.C,v 1.81.2.13.2.17 2003/03/27 15:33:20 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? @@ -1198,7 +1198,7 @@ case 42: // ^if ELEMENT -> ^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,7 +2599,7 @@ 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.is_empty()) { // something accumulated?