Reputation: 16729
Is there a Markdown parser out there that uses tokenization rather than relying on regular expression matching?
From looking at Markdown syntax, it seems pretty easy to implement, so I was thinking to write one, but I'd like to know if someone did it already.
Upvotes: 2
Views: 230
Reputation: 17353
You might try taking a look at Pandoc.
It's written in Haskell, but it builds an AST (without using regular expressions).
See "Scripting with Pandoc" for a more in-depth description.
Upvotes: 2