--- parser3/src/main/compile.y 2003/04/04 06:33:27 1.204.2.8.2.15 +++ parser3/src/main/compile.y 2003/04/08 11:08:12 1.204.2.8.2.17 @@ -5,7 +5,7 @@ Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.y,v 1.204.2.8.2.15 2003/04/04 06:33:27 paf Exp $ + $Id: compile.y,v 1.204.2.8.2.17 2003/04/08 11:08:12 paf Exp $ */ /** @@ -41,7 +41,6 @@ // defines #define USE_CONTROL_METHOD_NAME "USE" -#define TAB_SIZE 8 // forwards @@ -648,7 +647,7 @@ static int yylex(YYSTYPE *lvalp, void *a if(c=='\n') { pc.pos_next_line(); } else - pc.pos.col+=c=='\t'?TAB_SIZE:1; + pc.pos_next_c(c); if(c=='@' && pc.pos.col==0+1) { if(pc.ls==LS_DEF_SPECIAL_BODY) { @@ -694,7 +693,7 @@ default: if(!pc.string_start) pc.string_start=begin_pos; // append piece till ^ - pc.string.append_strdup(begin, end-begin); + pc.string.append_strdup_know_length(begin, end-begin); } // reset piece 'begin' position & line begin=pc.source; // ->punctuation @@ -710,7 +709,7 @@ default: if(!pc.string_start) pc.string_start=begin_pos; // append piece till ^ - pc.string.append_strdup(begin, end-begin); + pc.string.append_strdup_know_length(begin, end-begin); } // #HH ? if(pc.source[0]=='#' && pc.source[1] && pc.source[2]) { @@ -743,7 +742,7 @@ default: if(!pc.string_start) pc.string_start=begin_pos; // append piece till # - pc.string.append_strdup(begin, end-begin); + pc.string.append_strdup_know_length(begin, end-begin); } // fall into COMMENT lexical state [wait for \n] push_LS(pc, LS_USER_COMMENT); @@ -888,7 +887,7 @@ default: if(!pc.string_start) pc.string_start=begin_pos; // append piece till # - pc.string.append_strdup(begin, end-begin); + pc.string.append_strdup_know_length(begin, end-begin); } // fall into COMMENT lexical state [wait for \n] push_LS(pc, LS_EXPRESSION_COMMENT); @@ -1322,7 +1321,7 @@ break2: if(!pc.string_start) pc.string_start=begin_pos; // append it - pc.string.append_strdup(begin, end-begin); + pc.string.append_strdup_know_length(begin, end-begin); } } if(!pc.string.is_empty()) { // something accumulated?