Program LexTest;
// Ce logiciel est un logiciel libre, distribue sous licence GNU
//   Copyright (C) H. LESOURD, 1994

Uses
    Crt,Errorify,Symbolize,Lexify,Writify;

Var
   Avail0 : LongInt;

Begin
{ SetMonoMode1; }
  SetColorMode;
  StartLexify('LEXER.S');
  NbCarriages:=0;More:=False;Avail0:=MemAvail;
  Repeat
    NextWord;
    Case (Nature(CurWord)) Of
      KeyWord: WriteKeyWord(CurWord);
      Operator: WriteOperator(CurWord);
      Symbol: WriteSymbol(CurPtr);
      Constant: WriteConstant(CurPtr);
    End;
{   GotoXY(1,1);Write(NbCR);  }
  Until CurWord=KeyWord Or KeyEOF;
  More:=False;
  TextAttr:=7;
  WriteCarriage;
  WriteCarriage;
  Write('Table des symboles');
  WriteCarriage;
  VisuHash;
  Writeln;
  Writeln(Avail0-MemAvail,' Bytes used; NbCalls=',NbCalls);
  Writeln('NbKeyWordCalls=',NbKeyWordCalls,'; NbOperatorCalls=',NbOperatorCalls);
  Writeln('NbSymbolCalls=',NbSymbolCalls,'; NbConstantCalls=',NbConstantCalls);
  Writeln;
  EndLexify;
  WaitingForAKey;
End.

