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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
secret project (Score:1)
Reply to This
Re:secret project (Score:2)
Has anyone considered a Parse::RecDescent based SQL parser?
J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
Re:secret project (Score:1)
Take a look at
SQL::Translator(on CPAN [cpan.org], also at http://sf.net/projects/sqlfairy/ [sf.net]), which is a set of modules designed to translate the CREATE syntax of one DB into another. Many of the parsers we currently have (MySQL, Sybase, Pg, Oracle) are based on Parse::RecDescent.(darren)
Re:secret project (Score:1)
Random thought: would it make any sense to skip ahead a bit by poking around in the source of open source databases like MySQL & PostgreSQL and using their SQL parsing code as the basis for a general purpose SQL interpreter?
--
DO NOT LEAVE IT IS NOT REAL.
Re:secret project (Score:1)
The SQL::Translator [cpan.org] folks have discussed (OK, I brought it up [sourceforge.net]) using the provided yacc grammars as the basis for the MySQL and Pg parsers, although none of us has done anything with it yet.
Patches welcome... [sf.net]
(darren)
Re:secret project (Score:1)
--
DO NOT LEAVE IT IS NOT REAL.
Re:secret project (Score:1)
I had a conversation about this very topic with Jeff Zucker a few weeks ago, because I had the same issues with
SQL::Statement. He pointed me atSQL::Parser, upon whichSQL::Statementis based, and which is much more flexible. You simply need to subclassSQL::Parser, and override the methods that aren't flexible enough for you.Also, the guts of
SQL::Parserare regex-based, and Jeff seems pretty open to accepting id(darren)