#include <stream.h>
#include <fstream.h>

class scr_Dictionary {
private:
 unsigned long int *index, start;
 char nextone,stacklength[20], stackheight, length;
 unsigned long int pos, stackpos[20];
public:
 scr_Dictionary(char* filename);
 ~scr_Dictionary();

 char GetSequence(unsigned long int stuff, char* build);

 char AreWords(unsigned long int pos){
  return((index[pos]&32)>0);
 }

 char IsNextPointer(unsigned long int pos){
  return((index[pos]&1024)>0);
 }

 char IsTrailer(unsigned long int pos){
  return((index[pos]&2048)>0);
 }
 
 char ArePointers(unsigned long int pos){
  return((index[pos]&4096)>0);
 }

 char Letter(unsigned long int pos){
  return(index[pos]&31);
 }

 void PushStack();
 void PopStack();
 
 void SetStart(){
  nextone=stackheight=length=pos=0;
  PushStack();
  pos=Jump(Start());
 }
 
 unsigned long int Start(){
  return(start);
 }
 
 unsigned long int Jump(unsigned long int pos){
  return(index[pos]>>13);
 }

 unsigned long int Raw(unsigned long int pos){
  return(index[pos]);
 }

 char Next(char* output, char& len, char& accept);
 char PushString(char* input, unsigned long int& point);
 unsigned long int Bridge(char* fore, char* aft);
 char Verify(char* input);
};
