RDQL and Perl

March 1st, 2004 11:02 PM

More and more I cringe at the mess (a useful mess, mind) that CPAN has become. But for all the cruft in there, I still delight at being able to plug a few modules together and make something useful in a handful of lines.

This weekend, I bolted an RDQL query onto RDF::Core in roughly 225 lines of code, and 25 lines of grammar. Now, this is only a subset of RDQL (no ConstraintClause support just yet, or any use of commas), and it’s slow, but it’s functional.

No matter how many times I look at it or use it, I’m always blown away by the power of Parse::RecDescent to implement a parser and lexer in such a perl-ishly concise manner.

I’m not sure it belongs on CPAN, but here it is in all it’s hacked up glory: RDF-Query-1.001.tar.gz

#Perl
Next: Sleep
Previous: Beer