So, in the interest of sharing I thought I'd mention a couple of interesting libraries I came across.
In Ruby I think Temple (https://github.com/judofyr/temple) is really quite cool. It's designed to make creating templating languages really easy, and constructs ASTs using user-defined parsers.
And even more interesting in my opinion is Haskell's Parsec (http://www.haskell.org/haskellwiki/Parsec). It uses combinators to build up parsers, and can produce friendly parse error messages "for free."
Thanks for the intersting read.