--- parser3/src/main/compile.y 2001/06/27 12:47:44 1.141 +++ parser3/src/main/compile.y 2001/06/28 07:33:38 1.142 @@ -5,7 +5,7 @@ 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.142 2001/06/28 07:33:38 parser Exp $ */ /** @@ -857,6 +857,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 +868,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 +916,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;