[antlr-interest]SQL Parser written in C#-- Help please!

Addi Jamshidi ajpb at yahoo.com
Thu Nov 14 22:22:58 PST 2002


Richard:

> Also writing an ANTLR grammar file for SQL92
> shouldn't be that hard if all you are looking for
> is a select
> statement.

Actually I am looking for a complete SQL grammar (not
just the SELECT).

Also the parser I am looking for is required to be
done in C# as it is meant to be used under VS MS .NET
framework.

We have a SQL parser done in Java, and initially I was
going to just covnert the Java code into C# (using
MS's Java-C# convertor). However that parser does more
than just parsing and it is too complicated and kind
of a spagetti code (more than it needs to be leaving
no desire to carry it over to C#).

I am really surprised that no one has done a SQL to
XML parser as I have not yet been able to find one! I
guess I will be the first to do it! :)

In any event, if anyone knows of a tool/parser (in C#)
that takes any given statement and parses it with the
output tree in some form of XML (or similar to that so
it can be traversed), please let me know for which no
words of mine can possibly express how thankful I
would be.


Regards,





--- "Ney, Richard" <richard.ney at aspect.com> wrote:
> There is the Oracle grammer file on the
> www.antlr.org site that could be
> modified to DB2 SQL. Also writing an ANTLR grammar
> file for SQL92 shouldn't
> be that hard if all you are looking for is a select
> statement.
> 
> -Richard
> 
> -----Original Message-----
> From: Addi Jamshidi [mailto:ajpb at yahoo.com] 
> Sent: Thursday, November 14, 2002 7:27 PM
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] A SQL Parser written in
> C#-- Help please!
> 
> 
> Would anyone know if there is a SQL parser written
> in
> C#?
> 
> Basically what I am looking for is for a parser (or
> a
> tool) - written in C# -  that takes as input an SQL
> statement (preferably a DB2 SQL statement) and
> parses
> it and generates the parsed tree in terms of XML (or
> something similar to that - as long as there is a
> way
> to traverse through the output of the parser and
> extract the meta data info constructing that SQL
> statement -- such as table names, column names, the
> Where clause, etc., etc.)...
> 
> Many thanks in advance,
> 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - Let the expert host your site
> http://webhosting.yahoo.com
> 
>  
> 
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/ 
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/ 
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list