--- parser3/src/main/compile.tab.C 2002/10/17 10:57:06 1.74 +++ parser3/src/main/compile.tab.C 2002/12/06 17:27:35 1.78 @@ -43,7 +43,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.tab.C,v 1.74 2002/10/17 10:57:06 paf Exp $ + $Id: compile.tab.C,v 1.78 2002/12/06 17:27:35 paf Exp $ */ /** @@ -1947,7 +1947,14 @@ static int yylex(YYSTYPE *lvalp, void *p } else // @ in first column inside some code [when could that be?] result=BAD_METHOD_DECL_START; goto break2; - } else if(c=='^') + } else if(c=='^') { + if(PC.ls==LS_METHOD_AFTER) { + // handle after-method situation + pop_LS(PC); + result=EON; + skip_analized=-1; // return to punctuation afterwards to assure it's literality + goto break2; + } switch(PC.ls) { case LS_EXPRESSION_VAR_NAME_WITH_COLON: case LS_EXPRESSION_VAR_NAME_WITHOUT_COLON: @@ -1972,19 +1979,12 @@ default: PC.string->APPEND_CLEAN(begin, end-begin, PC.file, begin_line); } // reset piece 'begin' position & line - end=begin=PC.source; // ^ + begin=PC.source; // ->punctuation begin_line=PC.line; - if(PC.ls==LS_METHOD_AFTER) { - pop_LS(PC); - result=EON; - skip_analized=-1; // return to ^ afterwards to assure it's literality - goto break2; - } else { - // skip over _ after ^ - PC.source++; PC.col++; - // skip analysis = forced literal - continue; - } + // skip over _ after ^ + PC.source++; PC.col++; + // skip analysis = forced literal + continue; // converting ^#HH into char(hex(HH)) case '#': @@ -2008,13 +2008,15 @@ default: PC.source+=3; PC.col+=3; // reset piece 'begin' position & line - begin=PC.source; // ^ + begin=PC.source; // ->after ^#HH begin_line=PC.line; + // skip analysis = forced literal continue; } break; } break; + } } // #comment start skipping if(c=='#' && PC.col==1) {