nice ass
nice ass

Reputation: 16729

Reliable Markdown parser written in PHP that uses tokenization

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

Answers (1)

David Cain
David Cain

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

Related Questions