This rant is inspired by me just looking at the source code for Text::Tiki, but I certainly don't intend to single that parser out...
Why is it that wikitext [1] parser writers foist upon us broken crappy regexp based parsers that break at the slightest deviation from the spec, don't treat the document as a structure and truly believe that they are just parsing "text" and only need to produce "text". What if I don't want to produce HTML but actually want to *do* something with that data?
Repeat after me: "s///g is not a parser!"
Some day I'm going to find time to finish off Text::WikiFormat::SAX and show people what its all about.
Rant over.
[1] And this includes WikiText, TikiText, UseModText and all the various flavours that I've had the misfortune to look at the source code of.
Someone write Wiki::TextParser kplsthnx (Score:2, Interesting)
Must admit to being an idiot in that it took me quite a while to figure out what thingy to click to reply to this.
We talked about this on IRC and I agreed with you. I went and looked at HTML::Parser, which I think we figured out was a good model for what we want to be able to do with WikiText. It's all in XS, so I ran away. Bad move? Me no spik C.
Kake
Better Alternatives??? (Score:3, Interesting)
Reply to This
Re:Better Alternatives??? (Score:1)
Re:Better Alternatives??? (Score:3, Informative)
Which is great if you want HTML, but what if y
Three Reasons (Score:3, Insightful)
I'm only about halfway kidding.
Reply to This
Re:Three Reasons (Score:2)
Since Text::WikiFormat::SAX doesn't work properly I'm obviously not as smart as you think I am
But in all seriousness this is something I hope to put right, in a similar way to trying to put right the whole XML parser nonesense. That way I can put my code where my rant is, or something like that.
and they use different regexes! (Score:3, Insightful)
Maybe its not too late to get gnat to include recipes on using Parse::Yapp, and Parse::RecDescent in the next cookbook.
Reply to This
Re:and they use different regexes! (Score:2)
--Nat