Stories
Slash Boxes
Comments
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 ]

Matts (1087)

Matts
  (email not shown publicly)

I work for MessageLabs [messagelabs.com] in Toronto, ON, Canada. I write spam filters, MTA software, high performance network software, string matching algorithms, and other cool stuff mostly in Perl and C.

Journal of Matts (1087)

Monday September 03, 2001
04:41 AM

Net connection

[ #740 ]

Sheesh... gnat has it easy. 3 days wait to get his cable modem installed!!! No fair. I've now been waiting 3 weeks for DSL, and I don't have an installation date yet. Damnit I hate British Telecom.

axkit.org (et-al) is still down. I'm very seriously considering going to cable and a dynamic IP address, and hosting everything off site. I'd actually *save* money that way. Yes, I have offers of hosting, however if you have shit loads of bandwidth that you desparately want to give me, and don't mind me adding loads of sub-domains at my whim, then drop me an email.

XML Parser is coming along. Parsing XML declarations works, and now I'm onto parsing the internal subset (the bit between [ ] in the DOCTYPE declaration). There's a confusion here as the grammar isn't 100% on its own - you need to write your parser with support of the verbiage in the spec too. And that's hard work. Not sure why they couldn't have just written the grammar right, goddamn it :-)

I'm using my left-factored grammar technique that I used in XML::XPath. Obviously this is a much bigger grammar though, and harder to work with. I had to write a support class to make this work, which allows you to attach a string or a stream to a Reader class, which allows you to say if the current character matches either a given character or a regexp. If it does, it advances the character stream along one, and returns true. I guess this is the same as Parse::Nibbler which I just saw on CPAN, but didn't like the "eat" metaphor being used there, and writing my own meant I don't have any pre-requisistes for this module, which is nice. It works a bit like recursive descent parsing, because you take different paths through the parser engine depending on what you see in the tokens coming down the stream, and continuously go deeper into the recursive method calls. It's kinda nice in that the method names match the production names in the grammar, and the parser ends up looking like an annotated version of the grammar (a lot like P::RecDescent does, but a bit faster and no pre-requisites, and the annotations are a hell of a lot more verbose :-).

Boss is in this week. Have to do some real work. Back to app server and XSLT stuff. Might even persuade the people here to let me do some XS stuff...