Hobby-hacking Eric


yaht (badly) imported

YAHT is now a part of the wikibook. It took me a day of scripting, plus a couple hours here and there. I'm pretty embarassed about the way I did it, mostly a bunch of dumb regular expressions (Text.Regex) mixed in with a hacked-up versiono of lhs2tex. Lhs2TeX only has a pseudo TeX parser, which is better than anything I could have come up with in a short time. The lack of an abstract syntax tree was a bit annoying, but then I just recursively ran the texparser on any strings that were in environments, and things were more or less ok. Two things I really handled badly were math (you can see where my regexps go horribly awry) and links (I could have come up with better smarts for this...) (*).

There'll be some cleaning up to do, but as far as I know, it's all there. Let the great Haskell Remix begin!

(*) I call the result "YahtSee", short for "Yaht converter"

No comments: