home *** CD-ROM | disk | FTP | other *** search
- PROGRAM TokDemo;
- { Demonstrates tokenizer by reading a file }
- { one token at a time and writing it out. }
-
- USES Tokenizer;
-
- VAR s: string; f: text;
-
- BEGIN
- write('File to read: '); readln(s);
- assign(f,s); reset(f);
- WHILE NOT eof(f) DO
- BEGIN
- readtoken(f,s);
- writeln(KindName[KindOfToken]:15,' "',s,'"')
- END;
- writeln('Done.')
- END.