I am looking for code that will take an SQL command and break it into it's parts.  I 
have found some attempts, but none that use the
code from an actual SQL engine, and big surprise, they don't work 100%.

I have a few goals:

1) developer tool: cut/paste the SQL command and get a pretty format display - color, 
each component on a separate line, sub selects
indented, etc.  How often have you done this by hand and missed a paren?

2) part of an app: user is given a form with a bunch of textbox's.  The form has a 
'basic query' and each textbox has properties
defining how to augment the basic query.  For each input the user gives, augment the 
query.  This would be much easier if I had
something to break the basic query up into it's parts.

I am guessing that such a thing does exist, so before I go spelunking through the 
source code, perhaps someone can point me
somewhere.

It looks like sql_yacc.y is what is used to define the syntax that MySql uses.  It has 
been a while sense I took a compiler class,
so forgive my ignorance.  is sql_yacc.y used to generate the parser which is then 
compiled, or is it used at runtime?

The goal is to be able to hook into the MySql code without having to copy it.  That 
way as MySql evolves, so will my tool.

http://www.personnelware.com/carl/resume.html


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to