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 ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Monday April 25, 2005
07:28 PM

Lex rethink this.

[ #24370 ]

Recently I wrote about some software I wrote that's a complicated lexer/parser all rolled into one. I mused about how this ultimately needed to be broken out into separate classes so lexing and parsing could be discreet behaviors. Unfortunately, we've discovered this has to happen now. This has to happen because we need to support this:

Lexer::Code   \
               \          / Parser::DB
Lexer::XML  --- Data Store
               /          \ Parser::LDAP
Lexer::String /

Every lexer will take its source and produce canonical lists of tokens that, regardless of source, will be identical. The parsers will grab the tokens and spit out an intermediate representation that's appropriate for the data store being used. It tremendously simplifies implementing these things, but the initial work of pulling apart the lexer and parser is a bear. If only Dominus' HOP had been published six months earlier ...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.