Files
elna/boot/Compiler.mod

25 lines
482 B
Modula-2

MODULE Compiler;
FROM Terminal IMPORT WriteString, WriteLn;
FROM FIO IMPORT Close, File, IsNoError, OpenToRead;
FROM SYSTEM IMPORT ADR;
FROM Lexer IMPORT Lexer, LexerDestroy, LexerInitialize, LexerLex;
VAR
SourceFile: File;
ALexer: Lexer;
BEGIN
SourceFile := OpenToRead('boot/Compiler.mod');
IF IsNoError(SourceFile) THEN
LexerInitialize(ADR(ALexer), SourceFile);
LexerLex(ADR(ALexer));
LexerDestroy(ADR(ALexer));
Close(SourceFile)
END;
END Compiler.