in reply to Re^4: In search of an efficient query abstractor
in thread In search of an efficient query abstractor
yacc requires the grammar to be LALR, which I agree belongs in the ninth circle of hell. The grammar on the MySQL pages is an unspecified sort of context free grammar and I believe RecDescent supports that.
This is pretty similar to the HTML parsing debate (which never seems to end). You want to get some data out of an HTML page? Go with regex. Want to do anything related to the structure of the HTML and actually parse it? Definitely go with one of the parser modules.
Analogously, since you're trying to poke around the structure of SQL statements, my recommendation still stands. OTOH, I can understand resistance with regard to picking up RecDescent for a relatively straightforward task such as this one.
Best of luck!