db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@oracle.com>
Subject Re: Derby Key Words
Date Wed, 05 Sep 2012 21:29:19 GMT
On 9/5/12 7:02 AM, David Myers wrote:
> Hello all,
> Bryan, thanks for the info (although I was using 'locate' on my ubuntu
> box, and it still didn't find it ?) I'll have a look tonight.
> Kathey, I don't intend to modify the file, just grab the contents, if
> possible an without using a file Input Stream
Hi David,

Note that the keywords appear in an array of String constants that are 
generated by javacc into 
That may be a more straightforward way to get your hands on the keywords 
but it may require understanding more about how the generated grammar 
behaves and it may involve building a compile time tool which scrapes 
the keywords out of SQLParserConstants. I am waving my hands, of course.

Hope this helps,
> I also noted that the DatabaseMetaData.getSQLkeywords() actually has a
> hard coded list of words! I have no problem with that in the first
> instance, but I'm sure that the engine doesn' check every word with a
> call to this method before throwing an error!
> I need to keep looking...I'll keep you all posted.
> D
> On Wed, Sep 5, 2012 at 6:25 AM, Katherine Marsden
> <kmarsdenderby@sbcglobal.net>  wrote:
>> On 9/4/2012 7:44 PM, Bryan Pendleton wrote:
>>>> I've had success in pointing Eclipse to the source code that I have
>>>> built. I have had a nice look around for the file that I am
>>>> interested in, which from the previously mentioned JIRA issues etc
>>>> suggest a file called sqlgrammar.jj
>>>> only problem is I can't find it!
>>> It's possible that Eclipse doesn't grok '.jj' files in its normal
>>> configuration.
>>> The file should be in your source tree as:
>>>      ./java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
>>> There is a compiler-generation tool that processes this file during
>>> the Ant build of Derby and generates Java source from the grammar.
>>   The tool that generates the java code for the parser from sqlgrammar.jj is
>> Javacc.  The generated code is in
>> generated/java/org/apache/derby/impl/sql/compile which is fun to look at but
>> shouldn't be changed.
>> I think there may be an exclipse plugin for javacc but I have never used
>> one.
>> Kathey

View raw message