Re:Write You a Haskell: Building a modern functional compile...
by dllthomas on Tuesday January 06, 2015 @07:57PM
(#8848214)
I once took a compiler design course where the instructor said we could use whatever language we wanted (it was a tiny class - I think there were 8 of us?).
I asked whether I could use bash, and consider gcc a feature of the language.
I was informed that would be cheating.
I jest, but this is an issue I've thought about idly for a while. Maybe it's possible to write a two-step parser: one that turns chars into tokens (and cheat a little bit by stripping spaces in some contexts to make it context free), and then you have a nice CFG that you can do easily.