(*1:*)DEFINITION MODULE TABLEHANDLER;
(*2:*)EXPORT QUALIFIED SYMBOLLENGTH,UNDEFINEDSYMBOLSINTABLE,
SYMBOLSTRINGPTR,SYMBOLSTRING,SEARCHSYMBOLTABLE,DELETESYMBOLTABLE,
CREATESYMBOLTABLE,SETERRORHANDLER,TABLEPROC,ERRORPROC,
SYMBOLTABLEERRORCODE,SYMBOLTABLE,SYMBOLISDEFINED,SETVALUEOFSYMBOL,
GETVALUEOFSYMBOL;(*:2*)CONST(*3:*)SYMBOLLENGTH=200;
(*:3*)TYPE(*4:*)SYMBOLTABLE;
SYMBOLTABLEERRORCODE=(UNDEFINEDSYMBOL,DUPLICATESYMBOL,MEMORYEXHAUSTED);
SYMBOLSTRING=ARRAY[0..SYMBOLLENGTH-1]OF CHAR;
SYMBOLSTRINGPTR=POINTER TO SYMBOLSTRING;
(*:4*)(*8:*)TABLEPROC=PROCEDURE(CARDINAL,SYMBOLSTRINGPTR,BOOLEAN);
(*:8*)(*10:*)ERRORPROC=PROCEDURE(SYMBOLTABLEERRORCODE,ARRAY OF CHAR);
(*:10*)(*:1*)(*5:*)PROCEDURE CREATESYMBOLTABLE(VAR THETABLE:SYMBOLTABLE;
CASESENS:BOOLEAN;USERERRORROUTINE:ERRORPROC);
(*:5*)(*6:*)PROCEDURE SETERRORHANDLER(THETABLE:SYMBOLTABLE;
USERERRORROUTINE:ERRORPROC);
(*:6*)(*7:*)PROCEDURE UNDEFINEDSYMBOLSINTABLE(THETABLE:SYMBOLTABLE;
UNDEFINEDSYMBOLHANDLINGROUTINE:ERRORPROC):BOOLEAN;
(*:7*)(*9:*)PROCEDURE SEARCHSYMBOLTABLE(THETABLE:SYMBOLTABLE;
USERACTIONROUTINE:TABLEPROC);
(*:9*)(*11:*)PROCEDURE GETVALUEOFSYMBOL(THETABLE:SYMBOLTABLE;
TARGETSYMBOL:ARRAY OF CHAR;THISISADEFINITION:BOOLEAN;
VAR STRINGPTR:SYMBOLSTRINGPTR):CARDINAL;
(*:11*)(*12:*)PROCEDURE SETVALUEOFSYMBOL(THETABLE:SYMBOLTABLE;
TARGETSYMBOL:ARRAY OF CHAR;THISISADEFINITION:BOOLEAN;
VAR STRINGPTR:SYMBOLSTRINGPTR;THEVAL:CARDINAL);
(*:12*)(*13:*)PROCEDURE SYMBOLISDEFINED(THETABLE:SYMBOLTABLE;
TARGETSYMBOL:ARRAY OF CHAR):BOOLEAN;
(*:13*)(*14:*)PROCEDURE DELETESYMBOLTABLE(VAR THETABLE:SYMBOLTABLE);
(*:14*)(*15:*)END TABLEHANDLER.(*:15*)
