Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

atlas::interpreter::Hash_table Class Reference

#include <lexer.h>

Collaboration diagram for atlas::interpreter::Hash_table:

Collaboration graph
[legend]
List of all members.

Public Types

typedef short id_type

Public Member Functions

 Hash_table (size_t init=initial_hash_mod, size_t block_size=String_pool::default_block_size)
id_type match (const char *s, size_t l)
id_type match_literal (const char *s)
std::string name_of (id_type nr) const
id_type nr_entries () const

Private Member Functions

id_type hash (const char *s, size_t l) const
id_type do_match (const char *s, size_t l, bool copy_string)
size_t max_fill () const

Private Attributes

String_pool pool
id_type mod
std::vector< id_typehash_tab
std::vector< const char * > name_tab

Static Private Attributes

const id_type initial_hash_mod = 97

Member Typedef Documentation

typedef short atlas::interpreter::Hash_table::id_type
 

Definition at line 34 of file lexer.h.


Constructor & Destructor Documentation

atlas::interpreter::Hash_table::Hash_table size_t  init = initial_hash_mod,
size_t  block_size = String_pool::default_block_size
 

Definition at line 33 of file lexer.cpp.

References hash_tab, max_fill(), and name_tab.


Member Function Documentation

Hash_table::id_type atlas::interpreter::Hash_table::do_match const char *  s,
size_t  l,
bool  copy_string
[private]
 

Definition at line 47 of file lexer.cpp.

References id_type.

Hash_table::id_type atlas::interpreter::Hash_table::hash const char *  s,
size_t  l
const [private]
 

Definition at line 40 of file lexer.cpp.

id_type atlas::interpreter::Hash_table::match const char *  s,
size_t  l
[inline]
 

Definition at line 43 of file lexer.h.

References id_type.

Referenced by atlas::interpreter::Lexical_analyser::get_token().

id_type atlas::interpreter::Hash_table::match_literal const char *  s  )  [inline]
 

Definition at line 44 of file lexer.h.

References id_type.

Referenced by atlas::interpreter::check_type(), and atlas::interpreter::install_function().

size_t atlas::interpreter::Hash_table::max_fill  )  const [inline, private]
 

Definition at line 53 of file lexer.h.

Referenced by Hash_table().

std::string atlas::interpreter::Hash_table::name_of id_type  nr  )  const [inline]
 

Definition at line 46 of file lexer.h.

Referenced by atlas::interpreter::check_type(), atlas::interpreter::convert_expr(), atlas::interpreter::identifier_expression::evaluate(), atlas::interpreter::evaluate(), atlas::interpreter::find_type(), global_set_identifier(), atlas::interpreter::id_completion_func(), atlas::interpreter::operator<<(), atlas::interpreter::identifier_expression::print(), atlas::interpreter::Id_table::print(), and atlas::interpreter::call_expression::print().

id_type atlas::interpreter::Hash_table::nr_entries  )  const [inline]
 

Definition at line 48 of file lexer.h.

References id_type.

Referenced by atlas::interpreter::id_completion_func().


Member Data Documentation

std::vector<id_type> atlas::interpreter::Hash_table::hash_tab [private]
 

Definition at line 38 of file lexer.h.

Referenced by Hash_table().

const id_type atlas::interpreter::Hash_table::initial_hash_mod = 97 [static, private]
 

Definition at line 50 of file lexer.h.

id_type atlas::interpreter::Hash_table::mod [private]
 

Definition at line 37 of file lexer.h.

std::vector<const char*> atlas::interpreter::Hash_table::name_tab [private]
 

Definition at line 39 of file lexer.h.

Referenced by Hash_table().

String_pool atlas::interpreter::Hash_table::pool [private]
 

Definition at line 36 of file lexer.h.


The documentation for this class was generated from the following files:
Generated on Wed Mar 26 16:52:50 2008 for atlas by  doxygen 1.3.9.1