SQL Parser?


(Shashank Date) #1

Is there any resource where I can get an SQL parser (which generates the
Syntax tree for SQL code input) in Ruby ?

There are quite a few entries under the “Databases” category on RAA, but
they all seem to provide some kind of API wrappers to databases.
Please correct me if I got that wrong …

My other option is to build one. Any suggestions, insights, advice on this
area will be highly appreciated.

TIA,

– Shanko


#2

Yo!

I do not know, if there is an implementation in Ruby available. But

My other option is to build one. Any suggestions, insights, advice on this
area will be highly appreciated.

The “lex & yacc” book from O’Reilly & Associates contains a complete
yacc grammar for SQL (chapter 5) and you can download the book’s
example source code for free under http://www.oreilly.com/catalog/lex

Hope that helps!


(Shashank Date) #3

Thanks for the suggestion Maik, I will check it out …
– Shanko

“Maik Schmidt” webmaster@maik-schmidt.de wrote in message
news:405fa58.0206142143.596ba3bf@posting.google.com

Yo!

I do not know, if there is an implementation in Ruby available. But

My other option is to build one. Any suggestions, insights, advice on
this

···

area will be highly appreciated.

The “lex & yacc” book from O’Reilly & Associates contains a complete
yacc grammar for SQL (chapter 5) and you can download the book’s
example source code for free under http://www.oreilly.com/catalog/lex

Hope that helps!