uses classes, DFAs, highlighterDFAs, lexer_interfaces, sysutils; var fAutomaton : IDFAAutomaton; fLexer : ILexer; fStream : TFileStream; //property InputConsumed : TLexerInputConsumed read GetInputConsumed write SetInputConsu begin fAutomaton := LoadJOESyntaxDefintionFile('/etc/joe/syntax/pascal.jsf'); fLexer := TDFALexer.Create(fAutomaton); fStream := TFileStream.Create('test_DFA.pp', fmOpenRead); fLexer.SourceStream := fStream; while not fLexer.EOF do begin if fLexer.Token <> TokenNone then begin Writeln('token: ', Integer(fLexer.Token)); if fLexer.Token <> TokenInvalid then Writeln(Format('[%d:%d]', [fLexer.MatchBeginning, fLexer.MatchEnd])); end; fLexer.Consume(); end; end.