DEFINITION MODULE Lex; (* VAX/VMS Sohail Aslam *) FROM Tools IMPORT String; EXPORT QUALIFIED (*TYPE *) TokenType , (*VAR *) LexDebug , Echo, (*PROC *) ShowToken , ShowKeyWord , Lexical ; TYPE TokenType = ( Identifier,Label,Compass,IntegerNumber,RealNumber, MinusSign,QuotedString,RightArrow,LeftArrow,TwoWayArrow, Assignment,PlusSign,Multiply,Divide,OpenParen,CloseParen,Comma, EndOfCommand,EndOfRecord,Continuation,CharToIgnore, EndOfFile,Error, box,line,arrow,circle,ellipse,arc,spline, arrowlen,boxht,boxwid,cht,cwid,linelen,majax,minax,rad, acw,cw,up,down,left,right,downleft,downright,upleft,upright, first,second,third,fourth,fifth,sixth,seventh,ninth,tenth,last, bottom,center,east,end,ne,north,nw,se,south,start,sw,top,west, and,at,between,chop,solid,dashed,dotted,invisible,from,ht,move,of, origin,same,to,width,with,color,black,red,green,blue,orange, cyan,yellow,magenta,white ); VAR LexDebug : BOOLEAN; Echo : BOOLEAN; (* ShowToken -- Prints token and its type. *) PROCEDURE ShowToken( Token : String (* In *); TokenCode : TokenType (* In *) ); (* ShowKeyWord -- Prints a keyword *) PROCEDURE ShowKeyWord( TokenCode : TokenType (* In *) ); (* Lexical -- return next token and its type. Comments and white spaces are ignored *) PROCEDURE Lexical( VAR Token : String (* Out *); VAR TokenCode : TokenType (* Out *) ); (* the following procedure is being exported for the programmer only. *) PROCEDURE DumpTables; END Lex.