FreeBASIC  0.91.0
symb.bas File Reference
#include "fb.bi"
#include "fbint.bi"
#include "parser.bi"
#include "hash.bi"
#include "list.bi"
#include "pool.bi"
Include dependency graph for symb.bas:

Go to the source code of this file.

Functions

sub symbDelGlobalTb ()
 
sub symbKeywordInit ()
 
sub symbDefineInit (byval_as_integer ismain)
 
sub symbDefineEnd ()
 
sub symbFwdRefInit ()
 
sub symbFwdRefEnd ()
 
sub symbVarInit ()
 
sub symbVarEnd ()
 
sub symbProcInit ()
 
sub symbProcEnd ()
 
sub symbMangleInit ()
 
sub symbMangleEnd ()
 
sub symbCompInit ()
 
sub symbCompEnd ()
 
sub symbCompRTTIInit ()
 
sub symbCompRTTIEnd ()
 
sub symbInitSymbols (void)
 
private sub hInitDefTypeTb (void)
 
sub symbInit (byval_as_integer ismain)
 
sub symbEnd (void)
 
function_as_integer symbCanDuplicate (byval_as_FBSYMBOL_ptr head_sym, byval_as_FBSYMBOL_ptr s)
 
function_as_FBSYMBOL_ptr symbNewSymbol (byval_as_FB_SYMBOPT options, byval_as_FBSYMBOL_ptr s, byval_as_FBSYMBOLTB_ptr symtb, byval_as_FBHASHTB_ptr hashtb, byval_as_FB_SYMBCLASS class_, byval_as_const_zstring_ptr id, byval_as_const_zstring_ptr id_alias, byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_FB_SYMBATTRIB attrib)
 
sub symbHashListAdd (byval_as_FBHASHTB_ptr hashtb)
 
sub symbHashListAddBefore (byval_as_FBHASHTB_ptr lasttb, byval_as_FBHASHTB_ptr hashtb)
 
sub symbHashListDel (byval_as_FBHASHTB_ptr hashtb)
 
sub symbHashListInsertNamespace (byval_as_FBSYMBOL_ptr ns, byval_as_FBSYMBOL_ptr src_head)
 
sub symbHashListRemoveNamespace (byval_as_FBSYMBOL_ptr ns)
 
private function_as_FBSYMCHAIN_ptr chainpoolNext ()
 
function_as_FBSYMCHAIN_ptr symbLookup (byval_as_zstring_ptr id, byref_as_FB_TOKEN tk, byref_as_FB_TKCLASS tk_class, byval_as_integer preserve_case)
 
private function_as_FBSYMCHAIN_ptr hLookupImportHash (byval_as_FBSYMBOL_ptr ns, byval_as_const_zstring_ptr id, byval_as_uinteger index)
 
private function_as_FBSYMCHAIN_ptr hLookupImportList (byval_as_FBSYMBOL_ptr ns, byval_as_const_zstring_ptr id, byval_as_uinteger index)
 
function_as_FBSYMCHAIN_ptr symbLookupAt (byval_as_FBSYMBOL_ptr ns, byval_as_const_zstring_ptr id, byval_as_integer preserve_case, byval_as_integer search_imports)
 
function_as_FBSYMBOL_ptr symbLookupByNameAndClass (byval_as_FBSYMBOL_ptr ns, byval_as_const_zstring_ptr id, byval_as_integer class_, byval_as_integer preserve_case, byval_as_integer search_imports)
 
function_as_FBSYMBOL_ptr symbLookupByNameAndSuffix (byval_as_FBSYMBOL_ptr ns, byval_as_zstring_ptr id, byval_as_integer suffix, byval_as_integer preserve_case, byval_as_integer search_imports)
 
function_as_FBSYMBOL_ptr symbFindByClass (byval_as_FBSYMCHAIN_ptr chain_, byval_as_integer class_)
 
function_as_FBSYMBOL_ptr symbFindVarBySuffix (byval_as_FBSYMCHAIN_ptr chain_, byval_as_integer suffix)
 
function_as_FBSYMBOL_ptr symbFindVarByDefType (byval_as_FBSYMCHAIN_ptr chain_, byval_as_integer def_dtype)
 
function_as_FBSYMBOL_ptr symbFindVarByType (byval_as_FBSYMCHAIN_ptr chain_, byval_as_integer dtype)
 
sub symbDelFromChainList (byval_as_FBSYMBOL_ptr s)
 
sub symbDelFromHash (byval_as_FBSYMBOL_ptr s)
 
sub symbFreeSymbol (byval_as_FBSYMBOL_ptr s)
 
sub symbFreeSymbol_RemOnly (byval_as_FBSYMBOL_ptr s)
 
sub symbFreeSymbol_UnlinkOnly (byval_as_FBSYMBOL_ptr s)
 
sub symbDelSymbol (byval_as_FBSYMBOL_ptr s, byval_as_integer is_tbdel)
 
function_as_FBSYMBOL_ptr symbCloneSymbol (byval_as_FBSYMBOL_ptr s)
 
sub symbDelSymbolTb (byval_as_FBSYMBOLTB_ptr tb, byval_as_integer hashonly)
 
function_as_integer symbHasCtor (byval_as_FBSYMBOL_ptr sym)
 
function_as_integer symbHasDefCtor (byval_as_FBSYMBOL_ptr sym)
 
function_as_integer symbHasDtor (byval_as_FBSYMBOL_ptr sym)
 
function_as_integer symbIsArray (byval_as_FBSYMBOL_ptr sym)
 
function_as_integer symbIsString (byval_as_integer dtype)
 
function_as_integer symbIsEqual (byval_as_FBSYMBOL_ptr sym1, byval_as_FBSYMBOL_ptr sym2)
 
function_as_string symbTypeToStr (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype, byval_as_longint length)
 
function_as_integer symbGetDefType (byval_as_const_zstring_ptr symbol)
 
sub symbSetDefType (byval_as_integer ichar, byval_as_integer echar, byval_as_integer dtype)
 
sub symbRecalcLen (byval_as_FBSYMBOL_ptr sym)
 
sub symbSetType (byval_as_FBSYMBOL_ptr sym, byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype)
 
function_as_longint symbCalcLen (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype)
 
function_as_longint symbCalcDerefLen (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype)
 
function_as_integer symbCheckAccess (byval_as_FBSYMBOL_ptr sym)
 
function_as_integer symbCheckConstAssign (byval_as_FB_DATATYPE ldtype, byval_as_FB_DATATYPE rdtype, byval_as_FBSYMBOL_ptr lsubtype, byval_as_FBSYMBOL_ptr rsubtype, byval_as_FB_PARAMMODE mode=0, byref_as_integer matches=0)
 
function_as_string typeDump (byval_as_integer dtype, byval_as_FBSYMBOL_ptr subtype)
 
private function_as_string hGetNamespacePrefix (byval_as_FBSYMBOL_ptr sym)
 
function_as_string symbDump (byval_as_FBSYMBOL_ptr sym)
 
sub symbDumpNamespace (byval_as_FBSYMBOL_ptr ns)
 

Variables

SYMBCTX symb
 
integer deftypeTB [to[asc["_"+1]asc["A"+1]+1]+1]
 
static zstring_ptr classnames [FB_SYMBCLASS_VARtoFB_SYMBCLASS_NSIMPORT+1] =
 

Function Documentation

private function_as_FBSYMCHAIN_ptr chainpoolNext ( )

Definition at line 815 of file symb.bas.

Here is the caller graph for this function:

private function_as_string hGetNamespacePrefix ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 2247 of file symb.bas.

Here is the caller graph for this function:

private sub hInitDefTypeTb ( void  )

Definition at line 104 of file symb.bas.

Here is the caller graph for this function:

private function_as_FBSYMCHAIN_ptr hLookupImportHash ( byval_as_FBSYMBOL_ptr  ns,
byval_as_const_zstring_ptr  id,
byval_as_uinteger  index 
)

Definition at line 901 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

private function_as_FBSYMCHAIN_ptr hLookupImportList ( byval_as_FBSYMBOL_ptr  ns,
byval_as_const_zstring_ptr  id,
byval_as_uinteger  index 
)

Definition at line 950 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_longint symbCalcDerefLen ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype 
)

Definition at line 1941 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_longint symbCalcLen ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype 
)

Definition at line 1920 of file symb.bas.

Here is the caller graph for this function:

function_as_integer symbCanDuplicate ( byval_as_FBSYMBOL_ptr  head_sym,
byval_as_FBSYMBOL_ptr  s 
)

Definition at line 223 of file symb.bas.

Here is the caller graph for this function:

function_as_integer symbCheckAccess ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 1965 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_integer symbCheckConstAssign ( byval_as_FB_DATATYPE  ldtype,
byval_as_FB_DATATYPE  rdtype,
byval_as_FBSYMBOL_ptr  lsubtype,
byval_as_FBSYMBOL_ptr  rsubtype,
byval_as_FB_PARAMMODE  mode = 0,
byref_as_integer  matches = 0 
)

Definition at line 2029 of file symb.bas.

Here is the caller graph for this function:

function_as_FBSYMBOL_ptr symbCloneSymbol ( byval_as_FBSYMBOL_ptr  s)

Definition at line 1491 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbCompEnd ( )

Definition at line 24 of file symb-comp.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbCompInit ( )

Definition at line 16 of file symb-comp.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbCompRTTIEnd ( )

Definition at line 1223 of file symb-comp.bas.

Here is the caller graph for this function:

sub symbCompRTTIInit ( )

Definition at line 1168 of file symb-comp.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbDefineEnd ( )

Definition at line 372 of file symb-define.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbDefineInit ( byval_as_integer  ismain)

Definition at line 308 of file symb-define.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbDelFromChainList ( byval_as_FBSYMBOL_ptr  s)

Definition at line 1310 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbDelFromHash ( byval_as_FBSYMBOL_ptr  s)

Definition at line 1349 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbDelGlobalTb ( )

Definition at line 1522 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbDelSymbol ( byval_as_FBSYMBOL_ptr  s,
byval_as_integer  is_tbdel 
)

Definition at line 1437 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbDelSymbolTb ( byval_as_FBSYMBOLTB_ptr  tb,
byval_as_integer  hashonly 
)

Definition at line 1539 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_string symbDump ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 2265 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbDumpNamespace ( byval_as_FBSYMBOL_ptr  ns)

Definition at line 2460 of file symb.bas.

Here is the call graph for this function:

sub symbEnd ( void  )

Definition at line 167 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_FBSYMBOL_ptr symbFindByClass ( byval_as_FBSYMCHAIN_ptr  chain_,
byval_as_integer  class_ 
)

Definition at line 1101 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_FBSYMBOL_ptr symbFindVarByDefType ( byval_as_FBSYMCHAIN_ptr  chain_,
byval_as_integer  def_dtype 
)

Definition at line 1202 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_FBSYMBOL_ptr symbFindVarBySuffix ( byval_as_FBSYMCHAIN_ptr  chain_,
byval_as_integer  suffix 
)

Definition at line 1143 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_FBSYMBOL_ptr symbFindVarByType ( byval_as_FBSYMCHAIN_ptr  chain_,
byval_as_integer  dtype 
)

Definition at line 1270 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbFreeSymbol ( byval_as_FBSYMBOL_ptr  s)

Definition at line 1365 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbFreeSymbol_RemOnly ( byval_as_FBSYMBOL_ptr  s)

Definition at line 1391 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbFreeSymbol_UnlinkOnly ( byval_as_FBSYMBOL_ptr  s)

Definition at line 1407 of file symb.bas.

Here is the caller graph for this function:

sub symbFwdRefEnd ( )

Definition at line 23 of file symb-typedef.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbFwdRefInit ( )

Definition at line 14 of file symb-typedef.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_integer symbGetDefType ( byval_as_const_zstring_ptr  symbol)

Definition at line 1823 of file symb.bas.

Here is the caller graph for this function:

function_as_integer symbHasCtor ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 1577 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_integer symbHasDefCtor ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 1584 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_integer symbHasDtor ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 1589 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbHashListAdd ( byval_as_FBHASHTB_ptr  hashtb)

Definition at line 649 of file symb.bas.

Here is the caller graph for this function:

sub symbHashListAddBefore ( byval_as_FBHASHTB_ptr  lasttb,
byval_as_FBHASHTB_ptr  hashtb 
)

Definition at line 668 of file symb.bas.

Here is the caller graph for this function:

sub symbHashListDel ( byval_as_FBHASHTB_ptr  hashtb)

Definition at line 688 of file symb.bas.

Here is the caller graph for this function:

sub symbHashListInsertNamespace ( byval_as_FBSYMBOL_ptr  ns,
byval_as_FBSYMBOL_ptr  src_head 
)

Definition at line 713 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbHashListRemoveNamespace ( byval_as_FBSYMBOL_ptr  ns)

Definition at line 774 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbInit ( byval_as_integer  ismain)

Definition at line 122 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbInitSymbols ( void  )

Definition at line 58 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_integer symbIsArray ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 1596 of file symb.bas.

Here is the caller graph for this function:

function_as_integer symbIsEqual ( byval_as_FBSYMBOL_ptr  sym1,
byval_as_FBSYMBOL_ptr  sym2 
)

Definition at line 1630 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_integer symbIsString ( byval_as_integer  dtype)

Definition at line 1615 of file symb.bas.

Here is the caller graph for this function:

sub symbKeywordInit ( )

Definition at line 272 of file symb-keyword.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_FBSYMCHAIN_ptr symbLookup ( byval_as_zstring_ptr  id,
byref_as_FB_TOKEN  tk,
byref_as_FB_TKCLASS  tk_class,
byval_as_integer  preserve_case 
)

Definition at line 825 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_FBSYMCHAIN_ptr symbLookupAt ( byval_as_FBSYMBOL_ptr  ns,
byval_as_const_zstring_ptr  id,
byval_as_integer  preserve_case,
byval_as_integer  search_imports 
)

Definition at line 993 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_FBSYMBOL_ptr symbLookupByNameAndClass ( byval_as_FBSYMBOL_ptr  ns,
byval_as_const_zstring_ptr  id,
byval_as_integer  class_,
byval_as_integer  preserve_case,
byval_as_integer  search_imports 
)

Definition at line 1048 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_FBSYMBOL_ptr symbLookupByNameAndSuffix ( byval_as_FBSYMBOL_ptr  ns,
byval_as_zstring_ptr  id,
byval_as_integer  suffix,
byval_as_integer  preserve_case,
byval_as_integer  search_imports 
)

Definition at line 1072 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbMangleEnd ( )

Definition at line 60 of file symb-mangling.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbMangleInit ( )

Definition at line 52 of file symb-mangling.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_FBSYMBOL_ptr symbNewSymbol ( byval_as_FB_SYMBOPT  options,
byval_as_FBSYMBOL_ptr  s,
byval_as_FBSYMBOLTB_ptr  symtb,
byval_as_FBHASHTB_ptr  hashtb,
byval_as_FB_SYMBCLASS  class_,
byval_as_const_zstring_ptr  id,
byval_as_const_zstring_ptr  id_alias,
byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_FB_SYMBATTRIB  attrib 
)

Definition at line 444 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbProcEnd ( )

Definition at line 41 of file symb-proc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbProcInit ( )

Definition at line 28 of file symb-proc.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbRecalcLen ( byval_as_FBSYMBOL_ptr  sym)

Definition at line 1886 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbSetDefType ( byval_as_integer  ichar,
byval_as_integer  echar,
byval_as_integer  dtype 
)

Definition at line 1855 of file symb.bas.

Here is the caller graph for this function:

sub symbSetType ( byval_as_FBSYMBOL_ptr  sym,
byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype 
)

Definition at line 1895 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_string symbTypeToStr ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype,
byval_as_longint  length 
)

Definition at line 1742 of file symb.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbVarEnd ( )

Definition at line 34 of file symb-var.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

sub symbVarInit ( )

Definition at line 25 of file symb-var.bas.

Here is the call graph for this function:

Here is the caller graph for this function:

function_as_string typeDump ( byval_as_integer  dtype,
byval_as_FBSYMBOL_ptr  subtype 
)

Definition at line 2152 of file symb.bas.

Here is the caller graph for this function:

Variable Documentation

zstring_ptr classnames[FB_SYMBCLASS_VARtoFB_SYMBCLASS_NSIMPORT+1] =
static

Definition at line 2129 of file symb.bas.

integer deftypeTB[to[asc["_"+1]asc["A"+1]+1]+1]

Definition at line 51 of file symb.bas.

SYMBCTX symb

Definition at line 49 of file symb.bas.