|
|
| version 1.19, 2001/03/08 13:42:31 | version 1.36, 2001/03/11 08:16:33 |
|---|---|
| Line 1 | Line 1 |
| /* | /* |
| $Id$ | Parser |
| Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) | |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | |
| $Id$ | |
| */ | */ |
| #ifndef PA_REQUEST_H | #ifndef PA_REQUEST_H |
| Line 14 | Line 18 |
| #include "pa_vclass.h" | #include "pa_vclass.h" |
| #define MAIN_METHOD_NAME "main" | #define MAIN_METHOD_NAME "main" |
| #define RUN_NAME "RUN" | #define AUTO_METHOD_NAME "auto" |
| #define ROOT_NAME "ROOT" | #define MAIN_CLASS_NAME "MAIN" |
| #define ROOT_CLASS_NAME "ROOT" | |
| #define ENV_CLASS_NAME "ENV" | |
| #ifndef NO_STRING_ORIGIN | #ifndef NO_STRING_ORIGIN |
| # define COMPILE_PARAMS char *source, String *name, char *file | # define COMPILE_PARAMS char *source, String *name, VClass *base_class, char *file |
| # define COMPILE(source, name, file) real_compile(source, name, file) | # define COMPILE(source, name, base_class, file) real_compile(source, name, base_class, file) |
| #else | #else |
| # define COMPILE_PARAMS char *source, String *name | # define COMPILE_PARAMS char *source, String *name, VClass *base_class |
| # define COMPILE(source, name, file) real_compile(source, name) | # define COMPILE(source, name, base_class, file) real_compile(source, name, base_class) |
| #endif | #endif |
| class Local_request_exception; | class Local_request_exception; |
| Line 40 public: | Line 47 public: |
| // core request processing | // core request processing |
| void core(); | void core(); |
| VClass *use(char *file, | |
| String *name=0, | |
| VClass *base_class=0, | |
| bool fail_on_read_problem=true); // core.C | |
| Value& autocalc( | |
| Value& value, | |
| const String *name=0, | |
| bool make_string=true); // execute.C | |
| void write(const String& astring) { | |
| wcontext->write(astring, String::Untaint_lang::NO); // write(const) = clean | |
| } | |
| void write(Value& avalue) { | |
| // appending possible string, assigning untaint language | |
| wcontext->write(avalue, lang); | |
| } | |
| public: | public: |
| // default base | |
| VClass root_class; | |
| // $ENV:fields here | |
| VClass env_class; | |
| VClass root_class; // default base | // contexts |
| Value *self, *root, *rcontext; | |
| WContext *wcontext; | |
| private: // core data | private: // core data |
| Line 50 private: // core data | Line 82 private: // core data |
| Hash fclasses; | Hash fclasses; |
| Array fclasses_array; | Array fclasses_array; |
| // contexts | |
| Value *self, *root, *rcontext; | |
| WContext *wcontext; | |
| // execution stack | // execution stack |
| Stack stack; | Stack stack; |
| public: | |
| void use(char *file, String *alias); // core.C | |
| Value& autocalc(Value& value, bool make_string); // execute.C | |
| void write(Value& avalue); // execute.C | |
| private: // core.C | private: // core.C |
| char *execute_MAIN(); | char *execute_MAIN(); |
| Line 73 private: // compile.C | Line 95 private: // compile.C |
| private: // execute.C | private: // execute.C |
| char *execute_static_method(VClass& vclass, String& method_name, bool return_cstr); | |
| void execute(const Array& ops); | void execute(const Array& ops); |
| Value *get_element(); | Value *get_element(); |
| }; | private: // lang&raw |
| String::Untaint_lang lang; | |
| // core func | private: // lang&raw manipulation |
| void core(); | |
| // TODO | |
| }; | |
| #endif | #endif |