3 ms·
"I will build haskell by taking the source code and running it" I jest, but this is an issue I've thought about idly for a while. Maybe it's possible to write
by rtpg 12y ago
"I will build haskell by taking the source code and running it"
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.
- eru 12y agoSee eg http://michaeldadams.org/papers/layout_parsing/ http://michaeldadams.org/papers/layout_parsing/
- dllthomas 12y agoI 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.