
DEFINITION MODULE PRSCAN;

FROM FIO IMPORT File;

CONST MaxLen = 128;

TYPE SymbolTyp = (abssy,andsy,arraysy,beginsy,bitsetsy,booleansy,bysy,bytesy,
                  capsy,cardinalsy,cardsy,casesy,charsy,chrsy,classsy,
                  closecom,constsy,decsy,defsy,disposesy,divsy,dosy,elsesy,
                  elsifsy,endsy,exclsy,exitsy,exportsy,falsesy,fieldofssy,
                  floatsy,forsy,forwardsy,fromsy,gotosy,haltsy,highsy,
                  identifier,ifsy,implsy,importsy,inclsy,incsy,inlinesy,insy,
                  integersy,intsy,labelsy,longcardsy,longintsy,longrealsy,
                  loopsy,maxsy,minsy,modsy,modulesy,mtasy,newsy,nilsy,notsy,
                  nullprocsy,number,oddsy,ofsy,ordsy,orsy,pointersy,procsy,
                  proctypsy,qualifiedsy,realsy,recordsy,repeatsy,returnsy,
                  setsy,shortaddrsy,shortcardsy,shortintsy,sizesy,stringsy,
                  thensy,tosy,truesy,truncsy,typesy,untilsy,valsy,varsy,
                  virtualsy,vsizesy,whilesy,withsy,alias,bar,colon,comma,
                  dblperiod,define,drefsy,equal,gr,greq,lbk,lbr,less,lesseq,
                  lpar,notallowed,notequal,opencom,operationsy,period,rbk,rbr,
                  rpar,semicolon,shiftl,shiftr);
     str = ARRAY [0..MaxLen - 1] OF CHAR;
     TokenTyp = RECORD
                  symbol : SymbolTyp;
                  value : str;
                  length : CARDINAL
                END;

  PROCEDURE InitScanner;

  PROCEDURE ReadAgain;

  PROCEDURE ReadChar (tin : File;
                      VAR ch : CHAR);

  PROCEDURE GetToken (tin : File;
                      VAR token : TokenTyp);

END PRSCAN.