--- parser3/src/main/compile.y 2001/06/27 12:47:44 1.141 +++ parser3/src/main/compile.y 2001/06/28 07:41:59 1.143 @@ -5,8 +5,9 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.y,v 1.141 2001/06/27 12:47:44 parser Exp $ + $Id: compile.y,v 1.143 2001/06/28 07:41:59 parser Exp $ */ +static char *RCSId="$Id: compile.y,v 1.143 2001/06/28 07:41:59 parser Exp $"; /** @todo parser4: @@ -857,6 +858,7 @@ static int yylex(YYSTYPE *lvalp, void *p // VARIABLE GET/PUT/WITH case LS_VAR_NAME_SIMPLE: case LS_EXPRESSION_VAR_NAME: + case LS_VAR_NAME_NO_COLON: if(PC.ls==LS_EXPRESSION_VAR_NAME) { // name in expr ends also before binary operators switch(c) { @@ -867,6 +869,16 @@ static int yylex(YYSTYPE *lvalp, void *p goto break2; } } + if(PC.ls==LS_VAR_NAME_NO_COLON) { + // name already has ':', stop before next + switch(c) { + case ':': + pop_LS(PC); + PC.source--; if(--PC.col<0) { PC.line--; PC.col=-1; } + result=EON; + goto break2; + } + } switch(c) { case 0: case ' ': case '\t': case '\n': @@ -905,6 +917,7 @@ static int yylex(YYSTYPE *lvalp, void *p case '.': // name part delim case '$': // name part subvar case ':': // ':name' or 'class:name' + PC.ls=LS_VAR_NAME_NO_COLON; // stop before next ':' RC; } break;