You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Tore Halset <ha...@pvv.ntnu.no> on 2006/10/20 08:46:39 UTC

true/false & JJTree/JavaCC

Hello.

I am trying to implement true/false. See the following issue.

http://issues.apache.org/cayenne/browse/CAY-696

First, I do not know if this a good idea, but it was requested.. My  
main motivation is to be able to do a expIn(/expNotIn) with an empty  
collection.

How should I update the JJTree stuff? Is that only for parsing ala  
Expression.fromString(...)? I have not touched anything like that  
before..

  - Tore.

Re: Re: true/false & JJTree/JavaCC

Posted by Michael Gentry <bl...@gmail.com>.
I thought the JJTree stuff was for parsing expressions, but it might
be used elsewhere, too.  For example, it might be used by the modeler
when creating a query.  I'd really have to do some grepping to know
more there.

I don't know much about Maven yet, either.  (I've just started reading
a book on it.)  Bill might have an idea, though.  I figure I need to
learn something about it.  Seems like a cool concept so far.

/dev/mrg


On 10/24/06, Tore Halset <ha...@pvv.ntnu.no> wrote:
> On Oct 20, 2006, at 08:46, Tore Halset wrote:
>
> > How should I update the JJTree stuff? Is that only for parsing ala
> > Expression.fromString(...)? I have not touched anything like that
> > before..
>
> Dived into it and found a solution. See CAY-696
>
> Sources for info:
> https://javacc.dev.java.net/doc/JJTree.html
> jakarta-velocity/src/parser/Parser.jjt (velocity has true/false)
>
> There is even a (GPLed) eclipse plugin for javacc:
> http://eclipse-javacc.sourceforge.net/
>
> I do not know maven. Are our maven setup able to do jjtree/javacc? I
> am currently issuing javacc from the eclipse-javacc plugin.
>
>   - Tore.
>

Re: true/false & JJTree/JavaCC

Posted by Andrus Adamchik <an...@objectstyle.org>.
> There is even a (GPLed) eclipse plugin for javacc:
> http://eclipse-javacc.sourceforge.net/

Cool. Need to check it out. I need something like that badly for the  
EJBQL work.

> I do not know maven. Are our maven setup able to do jjtree/javacc?  
> I am currently issuing javacc from the eclipse-javacc plugin.

There is a Maven plugin for JJTree/JavaCC. It is not setup for the  
expression stuff in the pom, but there is a commented out example  
that I created for the EJB QL in the cayenne-jdk1.4 POM:

https://svn.apache.org/repos/asf/incubator/cayenne/main/trunk/core/ 
cayenne-jdk1.4/pom.xml

Andrus


On Oct 24, 2006, at 4:37 PM, Tore Halset wrote:
> On Oct 20, 2006, at 08:46, Tore Halset wrote:
>
>> How should I update the JJTree stuff? Is that only for parsing ala  
>> Expression.fromString(...)? I have not touched anything like that  
>> before..
>
> Dived into it and found a solution. See CAY-696
>
> Sources for info:
> https://javacc.dev.java.net/doc/JJTree.html
> jakarta-velocity/src/parser/Parser.jjt (velocity has true/false)
>
> There is even a (GPLed) eclipse plugin for javacc:
> http://eclipse-javacc.sourceforge.net/
>
> I do not know maven. Are our maven setup able to do jjtree/javacc?  
> I am currently issuing javacc from the eclipse-javacc plugin.
>
>  - Tore.
>


Re: true/false & JJTree/JavaCC

Posted by Tore Halset <ha...@pvv.ntnu.no>.
On Oct 20, 2006, at 08:46, Tore Halset wrote:

> How should I update the JJTree stuff? Is that only for parsing ala  
> Expression.fromString(...)? I have not touched anything like that  
> before..

Dived into it and found a solution. See CAY-696

Sources for info:
https://javacc.dev.java.net/doc/JJTree.html
jakarta-velocity/src/parser/Parser.jjt (velocity has true/false)

There is even a (GPLed) eclipse plugin for javacc:
http://eclipse-javacc.sourceforge.net/

I do not know maven. Are our maven setup able to do jjtree/javacc? I  
am currently issuing javacc from the eclipse-javacc plugin.

  - Tore.

Re: true/false & JJTree/JavaCC

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Oct 20, 2006, at 2:46 AM, Tore Halset wrote:

> Hello.
>
> I am trying to implement true/false. See the following issue.
>
> http://issues.apache.org/cayenne/browse/CAY-696
>
> First, I do not know if this a good idea, but it was requested..

I think it is a good idea.

> My main motivation is to be able to do a expIn(/expNotIn) with an  
> empty collection.
>
> How should I update the JJTree stuff?

Yes, you will need to update the parser for completeness of the  
implementation of this feature.

> Is that only for parsing ala Expression.fromString(...)?

Yes, but as Michael mentioned "Expression.fromString" itself is used  
in the Modeler (and runtime) to parse queries saved in XML.

Andrus