Has anyone started working on this yet?
What is meta?
- Any Stack Exchange user can ask a question
- The community provides support, votes on ideas, and reports bugs
- Your voice helps shape the way Stack Exchange operates
I had a little think about this after the podcast last week (having not paid much attention to Markdown before) and it's quite problematic to process with the a standard compiler front-end tool like lex&yacc / ANTLR. The problem is that so much of the language is positional and those tools are really designed to deal with context-free grammars.
It's probably still the way to go, but you need to put a stage infront of the lexer stage to handle it. You'd need to read all the lines into an array first and recognise those that start with quote '>' marks or tab/4space indents, then recognise groups of lines at the same level and insert tokens at the beginning/end of those groups of lines. Then you can proceed in a more context-free manner.