I can& #39;t get out of my head, the idea that it would be cool if Mirth could target DOS, you know, as a platform.
But the only Mirth program is the Mirth compiler. So...
Sofia makes a self-hosting compiler for DOS.
A thread.
But the only Mirth program is the Mirth compiler. So...
Sofia makes a self-hosting compiler for DOS.
A thread.
The main challenge is fitting all the operations of the compiler in a small amount of memory.
640 KB actually sounds like a lot . . .
640 KB actually sounds like a lot . . .
Ok, I reserved a lot of big buffers in the compiler but they& #39;re mostly useless or empty.
The file buffer holds the whole file, but I really only need to look at it one character at a time, when I& #39;m lexing.
So let& #39;s make it small, and read the file on demand.
The file buffer holds the whole file, but I really only need to look at it one character at a time, when I& #39;m lexing.
So let& #39;s make it small, and read the file on demand.
Hmm... Lexical data (row & column data) sure takes up a lot of space that& #39;s only useful when there are errors/warnings to display.
I don& #39;t need to store the data. I can re-lex the file just to pick out the row & column data, if needed. Surely that& #39;s fast enough for errors.
I don& #39;t need to store the data. I can re-lex the file just to pick out the row & column data, if needed. Surely that& #39;s fast enough for errors.