Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Generic parser API
Generic parser API [message #597338] Sun, 28 February 2010 18:54 Go to next message
Slavik Taubkin is currently offline Slavik TaubkinFriend
Messages: 4
Registered: February 2010
Junior Member
I just figured out that DTP uses two different kinds of SQL parsers: JavaCC and LPG based.

I have the following problem: I only have a database specific extended JavaCC-parser (extension of org.eclipse.datatools.sqltools.sql.parser.SQLParser). And my aim is to analyze a SQL query in order to print out all columns used in this query. I would easily solve this task using SQL query model, but JavaCC-parser doesn't support this...

I found the following statements in a mail thread from the Eclipse project: "a common parser API (for callers to work with any parser) is planned in the next release of DTP (post DTP 0.9)..." and "...The generic sql parser API will help us to achieve this goal. DTP will only interact with the parser using the generic parser API, no matter what the underlying parser it is".

These mails were written on the June 1, 2006. Now DTP 1.7 is there. Is generic parser API already implemented? Or is there any chance to use the existing AST (parsing tree) from JavaCC-based parser for the recognition of QueryStatement?
Re: Generic parser API [message #597400 is a reply to message #597338] Thu, 08 April 2010 01:46 Go to previous message
Brian Payton is currently offline Brian PaytonFriend
Messages: 154
Registered: July 2009
Senior Member
Unfortunately the common parser API was never implemented.

What database type are you using? Are you analyzing SQL Select
statements only? If so, and your SQL dialect is not too non-standard,
you might be able to use the SQL Query parser and model to do the analysis.

Slavik Taubkin wrote:
> I just figured out that DTP uses two different kinds of SQL parsers:
> JavaCC and LPG based.
>
> I have the following problem: I only have a database specific extended
> JavaCC-parser (extension of
> org.eclipse.datatools.sqltools.sql.parser.SQLParser). And my aim is to
> analyze a SQL query in order to print out all columns used in this
> query. I would easily solve this task using SQL query model, but
> JavaCC-parser doesn't support this...
>
> I found the following statements in a mail thread from the Eclipse
> project: "a common parser API (for callers to work with any parser) is
> planned in the next release of DTP (post DTP 0.9)..." and "...The
> generic sql parser API will help us to achieve this goal. DTP will only
> interact with the parser using the generic parser API, no matter what
> the underlying parser it is".
>
> These mails were written on the June 1, 2006. Now DTP 1.7 is there. Is
> generic parser API already implemented? Or is there any chance to use
> the existing AST (parsing tree) from JavaCC-based parser for the
> recognition of QueryStatement?
Previous Topic:Performance with SQL Server and Birt
Next Topic:H2 enablement
Goto Forum:
  


Current Time: Tue Mar 19 11:39:35 GMT 2024

Powered by FUDForum. Page generated in 0.02351 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top