Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TorgoX (1933)


"Il est beau comme la retractilité des serres des oiseaux rapaces [...] et surtout, comme la rencontre fortuite sur une table de dissection d'une machine à coudre et d'un parapluie !" -- Lautréamont

Journal of TorgoX (1933)

Sunday December 23, 2001
09:06 AM

Pod parser progress

[ #1776 ]
Sometime this summer while I was poking at perlpodspec, I wrote all the hard parts of a from-scratch Pod parser, to make sure it actually was implementable. But I tossed out my code out, since I assumed that I wouldn't actually need it -- since once perlpodspec was out, all the Pod::* authors would instantly leap up and make their modules compliant, right? Ahem.
Well, I probably didn't actually toss out the code, but I failed to name the files anything particularly meaningful or put it anywhere where I'd find it again, so I can't now find it on my vast hard drive.

Anyhow, I rewrote it from scratch, and doing that is never as tedious as I think. Indeed, as many people will tell you, tossing out your first try at something and rewriting, is usually a pretty good idea.

So now I have the hardest parts done of the new Pod parser module. It's downhill from here, just a bunch of busywork. The one remaining notable hurdle that I see, is the processing of L<...> codes. That's a mess and then some.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Sean, please tell me that this parser generates events (in the order they occur). We talked about this at the last TPC, actually. I'd kill for a simple event-generating POD parser. None of this "Hey, we have some text. Oh, and in that text there was a C section, which was surrounded by an L tag!" AAAAAAAAAAAHHHHHHHHHHHHHHHHHH! I hate that.

    Anyway, a nice event firing parser (ooh, SAX2!) would be super-sweet.

    • Yes, very much event-based, and with events getting fired in a sane order. (Because this is going to be a real parser, not a tokenizer [].) It'll be either natively SAX, or natively something that's clearly a notational variant of SAX and for which I'd probably provide a simple SAX wrapper.

      Incidentally: originally I was going to make this be one black box where you pour Pod in one end and get XML out the other. (That's as opposed to a model where there's a whole Habitrail set [] of modules, each handling on