Category: Perl

DBIx::MyParsePP


DBIx::MyParsePP is a Pure-perl implementation of the MySQL SQL parser.

[edit] Synopsis

 ue DBIx::MyParsePP;
 use Data::Dumper;
 
 my $parser = DBIx::MyParsePP->new();
 
 my $query = $parser->parse("SELECT 1");
 
 print Dumper $query;
 print $query->toString();

[edit] Method of Operation

This module works by taking the sql_yacc.yy grammar file from the MySQL source, removing all C code and compiling it using Parse::Yapp. The lexer from sql_lex.cc has also been translated in Perl.

The end result is a self-contained, stand-alone, pure-Perl (My)SQL parser.

For a faster, C-based parsing solution, please check out DBIx::MyParse

[edit] Links

Retrieved from "http://forge.mysql.com/wiki/DBIx::MyParsePP"

This page has been accessed 2,157 times. This page was last modified 17:19, 10 September 2007.

Find

Browse
MySQLForge
Main Page
Current events
Recent changes
Random page
Help
Edit
Edit this page
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Special pages
New pages
File list
Statistics
Bug reports
More...