--- parser3/src/main/compile.y 2010/10/12 21:55:14 1.261 +++ parser3/src/main/compile.y 2012/05/30 02:25:47 1.263 @@ -2,12 +2,14 @@ /** @file Parser: compiler(lexical parser and grammar). - Copyright (c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.y,v 1.261 2010/10/12 21:55:14 moko Exp $ + */ +volatile const char * IDENT_COMPILE_Y = "$Id: compile.y,v 1.263 2012/05/30 02:25:47 misha Exp $"; + /** @todo parser4: - cache compiled code from request to request. to do that... @@ -154,6 +156,7 @@ control_method: '@' STRING '\n' } if(command==CLASS_NAME) { if(strings_code->count()==1*OPERATIONS_PER_OPVALUE) { + PC.class_add(); // new class' name const String& name=LA2S(*strings_code)->trim(String::TRIM_END); // creating the class @@ -165,6 +168,7 @@ control_method: '@' STRING '\n' YYERROR; } } else if(command==USE_CONTROL_METHOD_NAME) { + PC.class_add(); for(size_t i=0; icount(); i+=OPERATIONS_PER_OPVALUE) PC.request.use_file(PC.request.main_class, LA2S(*strings_code, i)->trim(String::TRIM_END), PC.request.get_used_filename(PC.file_no)); } else if(command==BASE_NAME) {