List:Internals« Previous MessageNext Message »
From:Philip Stoev Date:July 26 2005 5:33pm
Subject:Question about using the MySQL SQL parser
View as plain text  
Hello,

I would like to ask if you think it is possible to give the SQL parser in
sql_yacc.yy a Perl interface so that it can be used to produce parse trees
for statements fed directly into it. The rationale of this is that such a
parser would be almost self-maintaining since it will always use the SQL
schema and parsing code from the most recent MySQL version.

The way I see it, one can set up a fake TID object (mabe even fake the IO)
and call mysql_stmt_prepare directly and then reap the results without any
changes to the actual MySQL code.

However this soon turns into a linkage nightmare. In my humble opinion
mysql_stmt_prepare ultimately depends on variables declared in mysqld.cc,
which in turn has a main() function that I do not really want to bring in.

Any pointers would be much appreciated, including links to other projects
that attempt to reuse portions of MySQL's code base. Please accept my
apologies if all this is complete nonsense.

Philip Stoev

-- 
Mi Bandeja de entrada es protegida por SPAMfighter
16142 hasta ahora los spam correos que han sido bloqueados. 
¡Descargado libremente www.spamfighter.com (gratis) hoy! 

Thread
Question about using the MySQL SQL parserPhilip Stoev26 Jul
  • Re: Question about using the MySQL SQL parserKonstantin Osipov16 Aug
  • Re: Question about using the MySQL SQL parserPhilip Stoev16 Aug
    • Re: Question about using the MySQL SQL parserBrian Aker16 Aug