--- parser3/src/main/compile.y 2001/05/21 17:12:58 1.136 +++ parser3/src/main/compile.y 2001/05/28 06:10:06 1.138 @@ -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.138 2001/05/28 06:10:06 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, "'"); @@ -1059,6 +1059,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