Diff for /parser3/src/main/Attic/core.C between versions 1.50 and 1.63.6.1

version 1.50, 2001/03/10 11:44:42 version 1.63.6.1, 2001/03/13 13:39:59
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$
 */  */
   
 #include "core.h"  #include "core.h"
 #include "classes/_string.h"  #include "_string.h"
 #include "classes/_double.h"  #include "_double.h"
 #include "classes/_int.h"  #include "_int.h"
   #include "_table.h"
 #include "pa_request.h"  #include "pa_request.h"
   
   #define GLOBAL_STRING(name, value)  name=new(pool) String(pool); name->APPEND_CONST(value)
   #define LOCAL_STRING(name, value)  String name(pool); name.APPEND_CONST(value)
   
 String *unnamed_name;  String *unnamed_name;
 String *empty_string;  String *empty_string;
   
   String *auto_method_name;
   String *main_method_name;
   
   String *main_class_name;
   String *root_class_name;
   String *env_class_name;
   String *table_class_name;
   
   Hash *untaint_lang_name2enum;
   
   
 void core() {  void core() {
         Pool pool;          Pool pool;
         unnamed_name=new(pool) String(pool); unnamed_name->APPEND_CONST("unnamed");          
           // names
           GLOBAL_STRING(unnamed_name, UNNAMED_NAME);
         empty_string=new(pool) String(pool);           empty_string=new(pool) String(pool); 
   
         initialize_string_class(pool, *(string_class=new(pool) VClass(pool)));          GLOBAL_STRING(auto_method_name, AUTO_METHOD_NAME);
         initialize_double_class(pool, *(double_class=new(pool) VClass(pool)));          GLOBAL_STRING(main_method_name, MAIN_METHOD_NAME);
         initialize_int_class(pool, *(int_class=new(pool) VClass(pool)));          
           GLOBAL_STRING(main_class_name, MAIN_CLASS_NAME);
           GLOBAL_STRING(root_class_name, ROOT_CLASS_NAME);
           GLOBAL_STRING(env_class_name, ENV_CLASS_NAME);  
           GLOBAL_STRING(table_class_name, TABLE_CLASS_NAME);
   
           // hashes
           untaint_lang_name2enum=new(pool) Hash(pool);
           LOCAL_STRING(as_is, "as-is");  
           untaint_lang_name2enum->put(as_is, (int)String::Untaint_lang::AS_IS);
           LOCAL_STRING(table, "table");
           untaint_lang_name2enum->put(table, (int)String::Untaint_lang::TABLE);
           LOCAL_STRING(sql, "sql");
           untaint_lang_name2enum->put(sql, (int)String::Untaint_lang::SQL);
           LOCAL_STRING(js, "js");
           untaint_lang_name2enum->put(js, (int)String::Untaint_lang::JS);
           LOCAL_STRING(html, "html");
           untaint_lang_name2enum->put(html, (int)String::Untaint_lang::HTML);
           LOCAL_STRING(html_typo, "html-typo");
           untaint_lang_name2enum->put(html_typo, (int)String::Untaint_lang::HTML_TYPO);
   
           // read-only stateless classes
           initialize_string_class(pool, *(string_class=new(pool) VStateless_class(pool)));  string_class->freeze();
           initialize_double_class(pool, *(double_class=new(pool) VStateless_class(pool)));  double_class->freeze();
           initialize_int_class(pool, *(int_class=new(pool) VStateless_class(pool)));  int_class->freeze();
           initialize_table_class(pool, *(table_class=new(pool) VStateless_class(pool)));  table_class->freeze();
   
           // request
         Request request(pool);          Request request(pool);
         request.core();          request.core();
 }  }

Removed from v.1.50  
changed lines
  Added in v.1.63.6.1


E-mail: