--- parser3/src/main/compile.y 2001/06/27 12:44:32 1.140 +++ 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.140 2001/06/27 12:44:32 parser Exp $ + $Id: compile.y,v 1.142 2001/06/28 07:33:38 parser Exp $ */ /** @@ -34,7 +34,7 @@ #include "pa_vobject.h" #include "pa_vdouble.h" #include "pa_globals.h" -#include "pa_vnothing.h" +#include "pa_vvoid.h" #define SELF_ELEMENT_NAME "self" #define USE_CONTROL_METHOD_NAME "USE" @@ -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;