P is for Practical | |
PerlMonks |
Re: need to parse firts part of SQL-query (regex question)by bart (Canon) |
on Jan 17, 2008 at 22:33 UTC ( [id://662967]=note: print w/replies, xml ) | Need Help?? |
Take a look at the article Lexing Your Data by Ovid on perl.com, in which he uses HOP::Lexer to tokenize SQL statements.
He did use a bit of a weird grammar, as a trick to circumvent some problems with that module, as I described in the thread HOP::Lexer not doing what I expected. But otherwise, it should fit your bill perfectly.
In Section
Seekers of Perl Wisdom
|
|