DECLARE FUNCTION AddSymbol% (sym AS STRING, symScope AS INTEGER, class AS INTEGER, id AS INTEGER)
DECLARE SUB DelSymbol (Idx AS INTEGER)
DECLARE FUNCTION funFirstPrime% (treshold AS INTEGER)
DECLARE FUNCTION GetSymKey% (sym AS STRING)
DECLARE FUNCTION GetSymName$ (sym AS INTEGER)
DECLARE FUNCTION SearchSymbol% (sym AS STRING, symScope AS INTEGER, BYVAL KeyNum AS INTEGER)

CONST MaxNameLength = 40

TYPE SymbolTableType
    nm AS STRING * MaxNameLength
    nmlen AS INTEGER
    used AS INTEGER
    scope AS INTEGER
    class AS INTEGER
    id AS INTEGER
END TYPE

'$STATIC
DIM SHARED SymTable(419) AS SymbolTableType   '= funFirstPrime(300)
COMMON SHARED SymTable() AS SymbolTableType

COMMON SHARED SymTableSize AS INTEGER
COMMON SHARED TotSymbols AS INTEGER

'\\ Classes of instruction and internal elements
CONST OperatorNm = 1
CONST KeyWordNm = 2
CONST VarName = 3
CONST ConstNm = 4
CONST FunctionNm = 5
CONST TypeNm = 6
CONST LiteralNm = 7
CONST LabelNm = 8
CONST RegNm = 9
CONST UnknownNm = 11
CONST TempVarNm = 12
CONST ArrayNm = 13

