G:/ScriptBasic/source/sym.c File Reference

#include <string.h>
#include <ctype.h>
#include "sym.h"

Go to the source code of this file.

Defines

#define PRIME   211
#define MASK   0xf0000000l

Functions

static void _to_lower (char *s)
static int hashpjw (char *s)
SymbolTable sym_NewSymbolTable (void *(*memory_allocating_function)(size_t, void *), void *pMemorySegment)
static void sym_FreeSymbolSub (pSymbol table, void(*memory_releasing_function)(void *, void *), void *pMemorySegment)
void sym_FreeSymbolTable (SymbolTable table, void(*memory_releasing_function)(void *, void *), void *pMemorySegment)
static void sym_TraverseSymbolTableSub (pSymbol table, void(*call_back_function)(char *SymbolName, void *SymbolValue, void *f), void *f)
void sym_TraverseSymbolTable (SymbolTable table, void(*call_back_function)(char *SymbolName, void *SymbolValue, void *f), void *f)
void ** sym_LookupSymbol (char *s, SymbolTable hashtable, int insert, void *(*memory_allocating_function)(size_t, void *), void(*memory_releasing_function)(void *, void *), void *pMemorySegment)
int sym_DeleteSymbol (char *s, SymbolTable hashtable, void(*memory_releasing_function)(void *, void *), void *pMemorySegment)


Define Documentation

#define MASK   0xf0000000l
 

Definition at line 61 of file sym.c.

#define PRIME   211
 

Definition at line 60 of file sym.c.


Function Documentation

static void _to_lower char *  s  )  [static]
 

Definition at line 37 of file sym.c.

Referenced by sym_DeleteSymbol(), and sym_LookupSymbol().

static int hashpjw char *  s  )  [static]
 

Definition at line 64 of file sym.c.

References MASK, and p.

int sym_DeleteSymbol char *  s,
SymbolTable  hashtable,
void(*)(void *, void *)  memory_releasing_function,
void *  pMemorySegment
 

Definition at line 277 of file sym.c.

References _to_lower(), hashpjw(), and NULL.

Referenced by modu_Init().

static void sym_FreeSymbolSub pSymbol  table,
void(*)(void *, void *)  memory_releasing_function,
void *  pMemorySegment
[static]
 

Definition at line 105 of file sym.c.

Referenced by sym_FreeSymbolTable().

void sym_FreeSymbolTable SymbolTable  table,
void(*)(void *, void *)  memory_releasing_function,
void *  pMemorySegment
 

Definition at line 131 of file sym.c.

References i, PRIME, and sym_FreeSymbolSub().

Referenced by modu_Init().

void** sym_LookupSymbol char *  s,
SymbolTable  hashtable,
int  insert,
void *(*)(size_t, void *)  memory_allocating_function,
void(*)(void *, void *)  memory_releasing_function,
void *  pMemorySegment
 

Definition at line 197 of file sym.c.

References _to_lower(), hashpjw(), NULL, and strcpy().

Referenced by ex_Global(), ex_IsCommandThis(), ex_IsSymbolValidLval(), ex_Local(), ex_LookupGlobalVariable(), ex_LookupLocallyDeclaredGlobalVariable(), ex_LookupLocalVariable(), ex_LookupUserFunction(), ex_PredeclareGlobalLongConst(), ex_Tag(), HttpExtensionProc(), modu_Init(), options_Get(), options_GetR(), options_Reset(), and options_Set().

SymbolTable sym_NewSymbolTable void *(*)(size_t, void *)  memory_allocating_function,
void *  pMemorySegment
 

Definition at line 85 of file sym.c.

References i, NULL, and PRIME.

Referenced by ex_init(), ex_IsCommandThis(), GetExtensionVersion(), modu_Init(), and options_Set().

void sym_TraverseSymbolTable SymbolTable  table,
void(*)(char *SymbolName, void *SymbolValue, void *f)  call_back_function,
void *  f
 

Definition at line 168 of file sym.c.

References i, PRIME, and sym_TraverseSymbolTableSub().

Referenced by build_CreateFTable(), build_CreateVTable(), ex_CheckUndefinedLabels(), ex_DumpVariables(), and modu_Init().

static void sym_TraverseSymbolTableSub pSymbol  table,
void(*)(char *SymbolName, void *SymbolValue, void *f)  call_back_function,
void *  f
[static]
 

Definition at line 146 of file sym.c.

Referenced by sym_TraverseSymbolTable().


Generated on Sun Mar 12 23:56:38 2006 for ScriptBasic by  doxygen 1.4.6-NO