|
|
On 08/05/2013 09:26 PM, Orchid Win7 v1 wrote:
> I then did some reading about how the professionals do this stuff. It
> seems the key is that where a subexpression has alternatives, you
> generate a series of states, but those diverging branches *merge* again
> at the end of the subexpression. What I was doing was effectively
> duplicating the rest of the expression - which is obviously more
> space-hungry.
>
> Anyway, having implemented all this, the generated Haskell file is now a
> mere 600KB. It still takes a while to compile it, but nowhere near as
> long as before.
So... I've written a program that reads a text file, and [eventually]
generates executable code which implements the instructions in that file?
Holy crap, I've implemented a compiler! :-D
Post a reply to this message
|
|