--- parser3/src/main/compile.y 2001/03/16 09:52:59 1.103 +++ parser3/src/main/compile.y 2001/03/19 17:42:14 1.106 @@ -1,20 +1,22 @@ -/* - Parser +/** @file + Parser: compiler(lexical parser and grammar). + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://design.ru/paf) - $Id: compile.y,v 1.103 2001/03/16 09:52:59 paf Exp $ + $Id: compile.y,v 1.106 2001/03/19 17:42:14 paf Exp $ */ -/* - TODO.parser4: - cache compiled code from request to request. to do that... - 1: make method definitions, @CLASS, @BASE, @USE instructions, +/** + @todo parser4: + - cache compiled code from request to request. to do that... + -#: make method definitions, @CLASS, @BASE, @USE instructions, which would be executed afterwards, and actions now performed at compile time would be delayed to run time. - 2: make cache expiration on time and on disk-change of class source - 3: in apache use subpools for compiled class storage - 4: in iis make up specialized Pool object for that + -#: make cache expiration on time and on disk-change of class source + -#: in apache use subpools for compiled class storage + -#: in iis make up specialized Pool object for that */ %{ @@ -22,7 +24,7 @@ #define YYPARSE_PARAM pc #define YYLEX_PARAM pc #define YYDEBUG 1 -#define YYERROR_VERBOSE +#define YYERROR_VERBOSE 1 #define yyerror(msg) real_yyerror((parse_control *)pc, msg) #define YYPRINT(file, type, value) yyprint(file, type, value) @@ -50,6 +52,7 @@ int yylex(YYSTYPE *lvalp, void *pc); #define POOL *PC->pool #undef NEW #define NEW new(POOL) +#ifndef DOXYGEN_SHOULD_SKIP_THIS %} %pure_parser @@ -130,7 +133,7 @@ control_method: '@' STRING '\n' YYERROR; } if(command==CLASS_NAME) { - if(PC->cclass!=&PC->request->root_class) { // already changed from default? + if(PC->cclass!=&PC->request->ROOT) { // already changed from default? strcpy(PC->error, "class already have a name '"); strncat(PC->error, PC->cclass->name().cstr(), 100); strcat(PC->error, "'"); @@ -143,7 +146,7 @@ control_method: '@' STRING '\n' PC->cclass=NEW VClass(POOL); PC->cclass->set_name(*name); // defaulting base. may change with @BASE - PC->cclass->set_base(PC->request->root_class); + PC->cclass->set_base(PC->request->ROOT); // append to request's classes PC->request->classes().put(*name, PC->cclass); } else { @@ -158,7 +161,7 @@ control_method: '@' STRING '\n' PC->request->use_file(file.cstr()); } } else if(command==BASE_NAME) { - if(PC->cclass->base()!=&PC->request->root_class) { // already changed from default? + if(PC->cclass->base()!=&PC->request->ROOT) { // already changed from default? strcpy(PC->error, "class already have a base '"); strncat(PC->error, PC->cclass->base()->name().cstr(), 100); strcat(PC->error, "'"); @@ -520,6 +523,7 @@ empty_string_value: /* empty */ { $$=VL( empty: /* empty */ { $$=N(POOL) }; %% +#endif /* 000$111(2222)00