#include <sym.h>
Inheritance diagram for sym:
Public Member Functions | |
sym (STRING n) | |
sym () | |
void * | operator new (unsigned int num_bytes) |
void * | operator new (unsigned int num_bytes, pool *mem_pool) |
void | operator delete (void *addr) |
STRING | get_name (void) |
void | set_name (const STRING str) |
void | set_referenced (void) |
void | unset_referenced (void) |
const Boolean | is_referenced (void) |
virtual const uint | get_sy_kind (void) |
virtual void | set_scope (pSym scope) |
virtual const pSym | get_parent_scope (void) |
virtual void | set_const (pConst c) |
virtual const pConst | get_const (void) |
virtual void | set_ty_type (pType t) |
virtual const pType | get_ty_type (void) |
virtual void | set_alloc (uint alloc) |
virtual const uint | get_alloc (void) |
virtual void | set_id_kind (uint kind) |
virtual const uint | get_id_kind (void) |
virtual void | set_id_type (pType t) |
virtual const pType | get_id_type (void) |
virtual sym * | LookupFromScope (STRING s) |
virtual sym * | LookupFromScope (const char *pChar) |
virtual symtable * | get_symtab (void) |
virtual typetable * | get_typtab (void) |
virtual Boolean | has_scope () |
virtual void | set_statement (NODE *s) |
virtual const NODE * | get_statement (void) |
virtual void | set_func_type (pType t) |
virtual const pType | get_func_type (void) |
virtual void | init (void) |
virtual void | dealloc (void) |
virtual void * | GetMem (uint num_bytes) |
virtual LIST< sym * > * | get_proc_list (void) |
virtual LIST< NODE * > * | get_sigass_list (void) |
Private Attributes | |
STRING | name |
src_ref | m_sr |
uint | m_referenced: 1 |
uint | m_unused: 31 |
New for symbols is only called from the symbol table. New for types is only called from the type table. If new compilers are not available, this localized code will have to be modified.
Definition at line 73 of file sym.h.
|
Definition at line 81 of file sym.h. References FALSE, m_referenced, and name.
00082 { 00083 name = n; 00084 m_referenced = FALSE; 00085 } // sym constructor |
|
Definition at line 87 of file sym.h. References FALSE, m_referenced, name, NULL, and STRING::SetText().
00088 { 00089 name.SetText( NULL ); 00090 m_referenced = FALSE; 00091 } // sym constructor |
|
Reimplemented in sym_scope, and sym_component. Definition at line 256 of file sym.h. Referenced by symtable::dealloc_sub_tables().
00257 {
00258 // its ok to do nothing if there's nothing to deallocate
00259 }
|
|
Reimplemented in sym_ident. Definition at line 174 of file sym.h.
00175 {
00176 assert( FALSE );
00177 return 0;
00178 }
|
|
Reimplemented in sym_const. Definition at line 150 of file sym.h. References NULL.
00151 { 00152 assert( NULL ); 00153 return NULL; 00154 } |
|
Reimplemented in sym_subprog. Definition at line 244 of file sym.h.
00245 { 00246 assert( FALSE ); 00247 return NULL; 00248 } |
|
Reimplemented in sym_ident. Definition at line 183 of file sym.h.
00184 {
00185 assert( FALSE );
00186 return 0;
00187 }
|
|
Reimplemented in sym_ident. Definition at line 192 of file sym.h.
00193 { 00194 assert( FALSE ); 00195 return NULL; 00196 } |
|
Definition at line 112 of file sym.h. References name. Referenced by type_record::find_elem(), symtable::pr(), and symtable::chain_elem::search_list().
00112 { return name; } |
|
Reimplemented in sym_scoped. Definition at line 139 of file sym.h. References NULL. Referenced by sym_scope::find_in_scope().
00140 { 00141 return NULL; 00142 } |
|
Reimplemented in sym_component. Definition at line 268 of file sym.h.
00269 { 00270 assert( FALSE ); 00271 return NULL; 00272 } |
|
Reimplemented in sym_component. Definition at line 273 of file sym.h.
00274 { 00275 assert( FALSE ); 00276 return NULL; 00277 } |
|
Reimplemented in sym_subprog. Definition at line 234 of file sym.h.
00235 { 00236 assert( FALSE ); 00237 return NULL; 00238 } |
|
Reimplemented in sym_const, sym_type, sym_ident, sym_subprog, sym_process, and sym_component. Definition at line 122 of file sym.h. References bad_symbol, and uint.
00122 { return bad_symbol; } |
|
Reimplemented in sym_scope. Definition at line 210 of file sym.h. Referenced by symtable::dealloc_sub_tables(), symtable::new_sym(), and sym_component::proc_list_dealloc().
00211 { 00212 assert( FALSE ); 00213 return NULL; 00214 } |
|
Reimplemented in sym_type. Definition at line 162 of file sym.h.
00163 { 00164 assert( FALSE ); 00165 return NULL; 00166 } // get_type |
|
Reimplemented in sym_scope. Definition at line 216 of file sym.h. Referenced by symtable::new_sym().
00217 { 00218 assert( FALSE ); 00219 return NULL; 00220 } |
|
Reimplemented in sym_component. Definition at line 262 of file sym.h.
00263 { 00264 assert( FALSE ); 00265 return NULL; 00266 } |
|
Reimplemented in sym_scope. Definition at line 221 of file sym.h. References Boolean, and FALSE. Referenced by symtable::dealloc_sub_tables(), sym_scope::find_in_scope(), and sym_component::proc_list_dealloc().
00222 { 00223 // return false for any symbol that is not of 00224 // the sym_scope sub-class 00225 return FALSE; 00226 } |
|
Reimplemented in sym_component. Definition at line 252 of file sym.h.
00253 {
00254 // its ok to do nothing if there's nothing to initialize
00255 }
|
|
Definition at line 117 of file sym.h. References Boolean, and m_referenced.
00117 { return m_referenced; } |
|
Reimplemented in sym_scope. Definition at line 205 of file sym.h.
00206 { 00207 assert( FALSE ); 00208 return NULL; 00209 } |
|
Reimplemented in sym_scope. Definition at line 200 of file sym.h.
00201 { 00202 assert( FALSE ); 00203 return NULL; 00204 } |
|
Definition at line 110 of file sym.h.
00110 {/* do nothing */}
|
|
Definition at line 103 of file sym.h. References pool::GetMem().
00104 { 00105 return mem_pool->GetMem( num_bytes ); 00106 } |
|
Definition at line 94 of file sym.h.
00095 { 00096 assert( FALSE ); 00097 return NULL; 00098 } |
|
Reimplemented in sym_ident. Definition at line 170 of file sym.h. References FALSE.
00171 {
00172 assert( FALSE );
00173 } // set_offset
|
|
Reimplemented in sym_const. Definition at line 146 of file sym.h. References FALSE.
00147 { 00148 assert( FALSE ); 00149 } |
|
Reimplemented in sym_subprog. Definition at line 240 of file sym.h. References FALSE.
00241 { 00242 assert( FALSE ); 00243 } |
|
Reimplemented in sym_ident. Definition at line 179 of file sym.h. References FALSE.
00180 { 00181 assert( FALSE ); 00182 } |
|
Reimplemented in sym_ident. Definition at line 188 of file sym.h. References FALSE.
00189 {
00190 assert( FALSE );
00191 } // set_id_type
|
|
Definition at line 113 of file sym.h. References name.
00113 { name = str; } |
|
Definition at line 115 of file sym.h. References m_referenced, and TRUE.
00115 { m_referenced = TRUE; } |
|
Reimplemented in sym_scoped. Definition at line 129 of file sym.h. References FALSE. Referenced by symtable::new_sym().
00130 { 00131 assert( FALSE ); 00132 } |
|
Reimplemented in sym_subprog. Definition at line 230 of file sym.h. References FALSE.
00231 { 00232 assert( FALSE ); 00233 } |
|
Reimplemented in sym_type. Definition at line 158 of file sym.h. References NULL.
00159 {
00160 assert( NULL );
00161 } // set_type
|
|
Definition at line 116 of file sym.h. References FALSE, and m_referenced.
00116 { m_referenced = FALSE; } |
|
Definition at line 77 of file sym.h. Referenced by is_referenced(), set_referenced(), sym(), and unset_referenced(). |
|
|
|
|
|
Definition at line 75 of file sym.h. Referenced by get_name(), set_name(), and sym(). |