--- parser3/src/main/compile.y 2001/05/21 17:12:58 1.136 +++ parser3/src/main/compile.y 2001/06/27 10:07:53 1.139 @@ -5,7 +5,7 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.y,v 1.136 2001/05/21 17:12:58 parser Exp $ + $Id: compile.y,v 1.139 2001/06/27 10:07:53 parser Exp $ */ /** @@ -135,7 +135,7 @@ control_method: '@' STRING '\n' YYERROR; } if(command==CLASS_NAME) { - if(PC.cclass!=&PC.request->OP) { // already changed from default? + if(PC.cclass) { // already changed from default? strcpy(PC.error, "class already have a name '"); strncat(PC.error, PC.cclass->name().cstr(), 100); strcat(PC.error, "'"); @@ -873,12 +873,14 @@ static int yylex(YYSTYPE *lvalp, void *p case ';': case ']': case '}': case ')': case '"': case '\'': - case '<': case '>': // these stand for HTML brackets and expression binary ops + case '<': case '>': // these stand for HTML brackets AND expression binary ops case '+': case '*': case '/': case '%': case '&': case '|': case '=': case '!': // common delimiters case ',': + // before call + case '^': pop_LS(PC); PC.source--; if(--PC.col<0) { PC.line--; PC.col=-1; } result=EON; @@ -1059,6 +1061,8 @@ break2: if((c=='@' || c==0) && end[-1]=='\n') { // we are before LS_DEF_NAME or EOF? // strip last \n end--; + if(end!=begin && end[-1]=='\n') // allow one empty line before LS_DEF_NAME + end--; } if(end!=begin && PC.ls!=LS_COMMENT) { // last piece still alive and not comment? // append it