I find discussion of techniques for building Markdown parsers very interesting. It's slightly off topic, perhaps, but I don't think this list is large enough to spawn a separate "Markdown implementers" list.
David On 1 December 2011 16:53, Seumas Mac Uilleachan <[email protected]> wrote: > On 12/01/2011 11:37 AM, [email protected] wrote: > > john said: > > Have you considered using a PEG instead of regexes? > > for all you home-schooled and self-taught programmers > for whom "peg" is far too computer-sciencey for comfort, > consider as an alternative the simple methodology i use... > > i split the text-file on blank lines and place it in an array. > > that is first-cut for my light-markup format, a.k.a., "zml" > -- zen markup language -- but it's alright with me if you > markdown people want to borrow it for your own purpose. > > i mean, seriously, it's not like i could patent it, or anything. > (but, on second thought, perhaps i _should_ at least apply.) > > then i walk the array, analyzing each item to see what it is; > the chunk might get tagged as a blockquote, or a heading, > or a list item, or a plain old paragraph, or _whatever_ it is. > > then i walk the array again, using the tag for each chunk to > generate the appropriate output for the desired format(s)... > > (sometimes the tag, or the output, is dependent upon the > surrounding chunks, and that's the reason i walk it twice.) > > it's the methodology of a simpleton, i am the first to admit, > but it works, and it works well, and it works sufficiently fast. > > best of all, for me, is that it's extremely easy to understand. > > even better, for everyone: it's easy for users to understand. > > after all, there's no payoff in confusing the users. is there? > > -bowerbird > > p.s. "alright" is a word i like to use... it's akin to "already"... > > > _______________________________________________ > Markdown-Discuss mailing > [email protected]http://six.pairlist.net/mailman/listinfo/markdown-discuss > > What confuses me is what this all has to do with markdown. > > _______________________________________________ > Markdown-Discuss mailing list > [email protected] > http://six.pairlist.net/mailman/listinfo/markdown-discuss > >
_______________________________________________ Markdown-Discuss mailing list [email protected] http://six.pairlist.net/mailman/listinfo/markdown-discuss
