You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by bb00bbyy <th...@gmail.com> on 2009/11/12 10:53:50 UTC

SQL grammar building

Hi,

I need advice regarding the file sqlgrammar.jj contained in the
impl.sql.compile package.
Well, it seems the file SQLParser.java is produced by some kind of automatic
process using
the file sqlgrammar.jj. I have to modify the SQL parsing  to add some fuzzy
query in apache derby.
So can somebody help me and tell me where and how to use this "automatic
process" building SQLParser.java
from sqlgrammar.jj ?

Thanks in advance.

Thibault Espanol
-- 
View this message in context: http://old.nabble.com/SQL-grammar-building-tp26315288p26315288.html
Sent from the Apache Derby Developers mailing list archive at Nabble.com.


Re: SQL grammar building

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
bb00bbyy <th...@gmail.com> writes:

> Hi,
>
> I need advice regarding the file sqlgrammar.jj contained in the
> impl.sql.compile package.
> Well, it seems the file SQLParser.java is produced by some kind of automatic
> process using
> the file sqlgrammar.jj. I have to modify the SQL parsing  to add some fuzzy
> query in apache derby.
> So can somebody help me and tell me where and how to use this "automatic
> process" building SQLParser.java
> from sqlgrammar.jj ?

Hi Thibault,

Derby uses JavaCC (http://javacc.dev.java.net) to generate the parser
from sqlgrammar.jj. This is done by the Ant build scripts when Derby is
built. See the genParser target in the top-level build.xml file, and how
it's used in java/engine/org/apache/derby/impl/sql/build.xml.

Hope this helps,

-- 
Knut Anders