db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Myrna van Lunteren <m.v.lunte...@gmail.com>
Subject Re: Derby Key Words
Date Wed, 05 Sep 2012 21:25:26 GMT
On Wed, Sep 5, 2012 at 4:02 AM, David Myers
<david.myers.scibearspace@gmail.com> 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
> 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


In eclipse (using the default shortcut keys), I can find sqlgrammar.jj
when I type the name in the screen that pops up on Ctrl-Shift-R...No
special configuration is needed.

I also wanted to mention, that in some cases, Derby allows SQL 2003
reserved keywords as identifiers for backward compatibility - see for
instance the comments from DERBY-5254
(https://issues.apache.org/jira/browse/DERBY-5254). Other DBMSs may be
more strict...


View raw message