You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Olivier Lamy (JIRA)" <ji...@apache.org> on 2011/05/12 09:17:47 UTC

[jira] [Created] (OGNL-8) use javacc to generate AST* java sources

use javacc to generate AST* java sources
----------------------------------------

                 Key: OGNL-8
                 URL: https://issues.apache.org/jira/browse/OGNL-8
             Project: OGNL (Incubating)
          Issue Type: Task
            Reporter: Olivier Lamy
            Assignee: Olivier Lamy




--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Issue Comment Edited] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Christian Grobmeier (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119656#comment-13119656 ] 

Christian Grobmeier edited comment on OGNL-8 at 10/3/11 9:52 PM:
-----------------------------------------------------------------

Daniel, i tried to include your patches. So far it looks like the right direction. I have even managed to compile it one time. But mvn test fails because of unresolved compilation failures. My assumption is that the generated sources are not put on the classpath when the mvn test runs. Can you confirm that?

Another problem is Eclipse (at least for me). You generate into the target folder, which is surely correct, but did you somehow manage to add the generated sources on your ides classpath? (assuming you do not use Notepad and mvn only hehe :-))

I made a similar page this evening before I read you message. I have generated it into the src/main/java/.../javacc package which at least does solve the eclipse problem. My suggestion is we reenable code generation first and then care about the maven problems. What do you think?

Any hints to make your patch working are very welcome of course.
                
      was (Author: cgrobmeier):
    Daniel, i tried to include your second patch (assuming the first one is already in svn - could not find any differences). So far it looks like the right direction. I have even managed to compile it one time. But mvn test fails because of unresolved compilation failures. My assumption is that the generated sources are not put on the classpath when the mvn test runs. Can you confirm that?

Another problem is Eclipse (at least for me). You generate into the target folder, which is surely correct, but did you somehow manage to add the generated sources on your ides classpath? (assuming you do not use Notepad and mvn only hehe :-))

I made a similar page this evening before I read you message. I have generated it into the src/main/java/.../javacc package which at least does solve the eclipse problem. My suggestion is we reenable code generation first and then care about the maven problems. What do you think?

Any hints to make your patch working are very welcome of course.
                  
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114428#comment-13114428 ] 

Daniel Pitts commented on OGNL-8:
---------------------------------

Looking even more closely at the JJTree documentation, it looks like the expectation is that node classes are editable after they are generated :-(.  This is never explicitly determined in the docs, but 

The Parser on the other hand is what needs to be regeneratable, and it looks like it is easy to do.  I'll attach a patch.

What this *doesn't* buy us is the ability to adjust node generating features (for instance, visitor pattern support).

This would have to be added by hand. Which is just as well, as good visitor support would need generics, and jjtree doesn't yet support that. 

The current code-base doesn't need visitor pattern support, but I'm thinking of a few refactorings that could benefit from it, so I'm going to open a new feature request here and provide a patch.

> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120820#comment-13120820 ] 

Maurizio Cucchiara commented on OGNL-8:
---------------------------------------

Anyway, the error I got is:
{{Cannot find file to patch: ognl.jjt}} 
that it would seem that some generated file, in some way, go under version control. 
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Christian Grobmeier (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121791#comment-13121791 ] 

Christian Grobmeier commented on OGNL-8:
----------------------------------------

@Maurizio: my patch is against trunk, not other patches need to be applied before. Looking at the patch, this beast does not reflect the move of the ognl.jj/ognl.jjt file (or so it seems). I suggest we go the way Simone proposed doing a nice CTR strategy.


@Daniel: For sure I didn't want to step on your tooth! Your work is great and actually is pretty similar to what I made. I cannot say mine is better. I just had problems applying the patch. Same story as Maurizio having problems with applying my patch. To be honest, it really looks as you have much more experience with JavaCC and I would LOVE to see you contributing more. Actually I learned from you that it is the parser I need to regenerate. Anyway, please follow commons dev list and discuss here. As Simone already mentioned, you are welcome.



                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simone Tripodi updated OGNL-8:
------------------------------

    Summary: use javacc to generate AST* and OGNLParser Java sources  (was: use javacc to generate AST* java sources)

> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL (Incubating)
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13121005#comment-13121005 ] 

Simone Tripodi commented on OGNL-8:
-----------------------------------

Hi Daniel,
I am worried you got us wrong, let's clarify misunderstanding before it is too late: there's nothing about lack of merit to patches, Apache projects are 100% community driven and, according to what Christian (one of the OGNL mentor/committer) reported in his [comment|https://issues.apache.org/jira/browse/OGNL-8?focusedCommentId=13119941&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13119941]

{quote}
[...] generates the parsers sources into /target/generated-sources/java and adds the folder to the classpath [...]
{quote}

It doesn't mean *your* patch cannot be committed, simply needed little improvements before be committed.

I personally haven't had the time to read both patches, but since Christian is taking care of it, I strongly believe he is working in the way we all have this issue fixed, thanks also to the community support that people like you are volunteering on submitting patches. You will be indeed added in the contributors list, since you are participating on fixing issues.

You, and smart volunteering people like you, are more than welcome, and we are happy to see new lifeblood participating on commons components. Please hijack your energies on submitting patches and take in consideration you are in a friendly environment! :)
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Christian Grobmeier (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123619#comment-13123619 ] 

Christian Grobmeier commented on OGNL-8:
----------------------------------------

I have looked a bit more deeply into the AST generation.
As Daniel already found out here: http://bit.ly/nB0xT6
it seems that the AST*files are meant for customization.

This is from the docs:
http://javacc.java.net/doc/JJTree.html

"If you don't provide implementations for the node classes JJTree will generate sample implementations based on SimpleNode for you. You can then modify the implementations to suit."

When the Patches are reviewed on trunk, I would suggest to close this issue and look a bit more into the Visitor possibilities of javacc, which might make it possible to move the custom code to the visitor.
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119917#comment-13119917 ] 

Simone Tripodi commented on OGNL-8:
-----------------------------------

+1 to Olivier :)
If you take a look at the first patch draft (18/May/11), you will notice that there are the javacc/build-helper plugins configurations that allow a clean maven build - that works as well also with m2eclipse.
Hope that helps, unfortunately I'm not having so much spare time this week to touch directly stuff :(

{code}
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>javacc-maven-plugin</artifactId>
+        <version>2.6</version>
+        <executions>
+          <execution>
+            <id>jjtree-javacc</id>
+            <goals>
+              <goal>jjtree-javacc</goal>
+            </goals>
+            <configuration>
+              <!-- options for JJTree and JavaCC go here -->
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.5</version>
+        <executions>
+          <execution>
+            <id>add-source</id>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${project.build.dir}/generated-sources/jjtree</source>
+                <source>${project.build.dir}/generated-sources/javacc</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
{code}
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Olivier Lamy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035638#comment-13035638 ] 

Olivier Lamy commented on OGNL-8:
---------------------------------

I have started this locally too.
But AST* has been modified too much with *non grammar* related code !

> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL (Incubating)
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123631#comment-13123631 ] 

Simone Tripodi commented on OGNL-8:
-----------------------------------

I still haven't had the time to take a look at the modifications, but what you say makes sense, and we already have an open issue (OGNL-24) for visitor support with proposed patch.
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120702#comment-13120702 ] 

Simone Tripodi commented on OGNL-8:
-----------------------------------

Sorry to be late Christian, but didn't have enough spare time :(

I experienced some issue on applying the patch on my local copy, even checking-it out form scratch, got the following error:

{code}
Hunk #1 FAILED at 1.
File src/main/java/org/apache/commons/ognl/JavaCharStream.java is not empty after patch, as expected
1 out of 1 hunk FAILED -- saving rejects to file src/main/java/org/apache/commons/ognl/JavaCharStream.java.rej
patching file src/main/java/org/apache/commons/ognl/OgnlParser.java
{code}

I ask the kind favor someone else applies and test it; otherwise Christian commits it then we will review - it is versioned, we can apply improvements later or revert in any way!
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Simone Tripodi (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119956#comment-13119956 ] 

Simone Tripodi commented on OGNL-8:
-----------------------------------

Cool, thanks a lot for your effort Daniel, Christian and everybody involved!
I should be able to try it in the afternoon, I'll let you know ASAP!
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104019#comment-13104019 ] 

Daniel Pitts commented on OGNL-8:
---------------------------------

I'm starting to wonder if it is even possible to have jjtree produce the code necessary with out a large refactoring. It could be that jjtree itself doesn't have enough features to support the OGNL language use-case the way the original developers wanted (hence).

Someone with more time and patience than I might want to try converting the polymorphic methods into externalized visitor-pattern instead (jjtree does support visitor pattern creation).

I really just don't have the time to learn all the ins-and-outs of jjtree :-(

> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042958#comment-13042958 ] 

Simone Tripodi commented on OGNL-8:
-----------------------------------

Sorry for having missed your reply Olivier! My lack of JavaCC knowledge doesn't allow me to understand if that code can be merged inside the jjt source... any idea?

> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL (Incubating)
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Daniel Pitts (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119666#comment-13119666 ] 

Daniel Pitts commented on OGNL-8:
---------------------------------

Christian, my patch is an alternative to the original patch. 

I use IntelliJ IDEA for my IDE.  If I recall correctly, it seemed to pick up the new code fine (the pom.xml file does set up a .  You might have to manually update your project settings to include the generated code. I've never used Eclipse so I'm not sure how you might do that.  

I would suggest *not* generating into src/* since it is not a "source" per-se, but a production of the jjt file.

FWIW, if I run mvn test from the command line, it passes:

"Tests run: 727, Failures: 0, Errors: 0, Skipped: 0"

If you can't get that to work, try applying the patch to the trunk revision as of 
"26/Sep/11 01:32"

                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Christian Grobmeier (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Grobmeier updated OGNL-8:
-----------------------------------

    Attachment: patch-ognl-8-v2.patch

New patch: generates the parsers sources into /target/generated-sources/java and adds the folder to the classpath (with mvn eclipse:eclipse)

Please review before I commit it
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Daniel Pitts (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120985#comment-13120985 ] 

Daniel Pitts commented on OGNL-8:
---------------------------------

This comment may come across as my ego, but I'm more curious why this thread has gone the way it has.

My OGNL-8-keep-custom-AST.patch works and I think it could be used as a starting point.  Someone can add the eclipse stuff after my patch is applied.

It compiles.
The tests are successful. 
The generated files are under target/. 

Why are we trying to patch with the other patches? What is the perceived merit of the other patches; or what is the lack of merit to my patch?
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13108846#comment-13108846 ] 

Daniel Pitts commented on OGNL-8:
---------------------------------

I also wanted to comment that I'd like it if we could include the "visitor" option in the jjt, once we fix this.  I think that'll allow greater flexibility in the future if we want to externalize any functionality.

> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Olivier Lamy (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119703#comment-13119703 ] 

Olivier Lamy commented on OGNL-8:
---------------------------------

perso I don't like too the idea about generating files to src/main/java as Daniel said it's generated files during the build.
If there is any timestamp generated or a "touch" on those files, mvn release plugin will fail because you have file modified locally.
I use idea and I don't have any issues with files generated in target/generated-sources.
It's not a maven issue here but a poor support of generated sources by m2e. To fix that you have to add a huge number of files or write your own configurator
Is there any possibility to add manually in eclipse target/generated-sources in sources directory ?
Or at least this must not be in the standard lifecycle but in a profile activated by only for folks using m2e.


                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Christian Grobmeier (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Grobmeier resolved OGNL-8.
------------------------------------

    Resolution: Fixed

resolved as discussed on ml/issue
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* java sources

Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032295#comment-13032295 ] 

Simone Tripodi commented on OGNL-8:
-----------------------------------

Just one big reminder for who will take care of the issue: during OGNL evolution, generated JavaCC sources have been versioned in the SCM and *modified*.
That is wrong, because let's suppose grammar has bugs, once fixed and when re-generating the sources, they will be overridden, loosing latest modifications :(

The necessary steps are:

 * Plug the JavaCC Plugin for Maven [http://mojo.codehaus.org/javacc-maven-plugin/];
 * See which classes are generated (AST*.java classes and few more);
 * Understand which methods have been added in the versioned;
 * Merging all those methods inside the JavaCC grammar

I already tried this before OGNL joined the Incubator, but not being JavaCC expert I fixed that issue only partially, I missed the last point.

Feel free to ping me directly if any help is needed!

> use javacc to generate AST* java sources
> ----------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL (Incubating)
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Maurizio Cucchiara (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120816#comment-13120816 ] 

Maurizio Cucchiara commented on OGNL-8:
---------------------------------------

Hi guys,
unfortunately I am not able to apply Christian's patch, I guess because I have not any directory called javacc or jtree under /src/main path.
Am I missing something? Christian, is it your patch against the trunk? Should I apply another patch before yours?
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Christian Grobmeier (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119656#comment-13119656 ] 

Christian Grobmeier commented on OGNL-8:
----------------------------------------

Daniel, i tried to include your second patch (assuming the first one is already in svn - could not find any differences). So far it looks like the right direction. I have even managed to compile it one time. But mvn test fails because of unresolved compilation failures. My assumption is that the generated sources are not put on the classpath when the mvn test runs. Can you confirm that?

Another problem is Eclipse (at least for me). You generate into the target folder, which is surely correct, but did you somehow manage to add the generated sources on your ides classpath? (assuming you do not use Notepad and mvn only hehe :-))

I made a similar page this evening before I read you message. I have generated it into the src/main/java/.../javacc package which at least does solve the eclipse problem. My suggestion is we reenable code generation first and then care about the maven problems. What do you think?

Any hints to make your patch working are very welcome of course.
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Christian Grobmeier (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Grobmeier updated OGNL-8:
-----------------------------------

    Attachment: patch-ognl-8-v1.patch

Patch allows regeneration of the parser, leaves AST files intact. Generates into the java folder, which prevents problems with Eclipse/Maven (but is not very nice)
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Sebb (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119711#comment-13119711 ] 

Sebb commented on OGNL-8:
-------------------------

Have a look at jexl - that also uses javacc, and puts the generated sources under target.

The Eclipse classpath just needs to be updated to add the source folders, something like:

{code}
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="src" output="target/classes" path="target/generated-sources/java"/>
<classpathentry kind="src" output="target/classes" path="target/generated-sources/jjtree"/>
{code}
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114480#comment-13114480 ] 

Simone Tripodi commented on OGNL-8:
-----------------------------------

Thanks a lot for your effort Daniel, I will have a look at your patch as soon as I get I good slot of spare time during the week. Thanks again! :)

> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123553#comment-13123553 ] 

Hudson commented on OGNL-8:
---------------------------

Integrated in ognl #128 (See [https://builds.apache.org/job/ognl/128/])
    OGNL-8 needs a better package name than just ognl
OGNL-8: added change description
added Daniel Pitts as contributor (for OGNL-8) - thanks very much!
OGNL-8: removed files because they are generated by the maven plugin now. Otherwise generation would be skipped

grobmeier : http://svn.apache.org/viewvc/?view=rev&rev=1180460
Files : 
* /commons/proper/ognl/trunk/src/main/javacc/ognl.jj

grobmeier : http://svn.apache.org/viewvc/?view=rev&rev=1180459
Files : 
* /commons/proper/ognl/trunk/src/changes/changes.xml

grobmeier : http://svn.apache.org/viewvc/?view=rev&rev=1180458
Files : 
* /commons/proper/ognl/trunk/pom.xml

grobmeier : http://svn.apache.org/viewvc/?view=rev&rev=1180455
Files : 
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/JavaCharStream.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlParser.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlParserConstants.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/OgnlParserTokenManager.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/ParseException.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/Token.java
* /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/TokenMgrError.java

                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Christian Grobmeier (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119669#comment-13119669 ] 

Christian Grobmeier commented on OGNL-8:
----------------------------------------

Daniel and others,

I have attached my own patch I did before I saw you have added one. It should be similar to what you did, because I:

- moved jj/jjt files to src/main/javacc
- integrated a javacc maven plugin into the pom.xml [1]
- renamed the packages of the generated classes into o.a.c.ognl.javacc
- removed the old sources
- modified many AST* classes to suck the *.ognl.javacc classes
- made mvn generate-sources
- and runned all Junit tests from Eclipse.

This worked well for me. According to your explaination it seems to be quite ok to modify the AST* files. My patch does reflect this too. The main difference is I am not going the nice way as you do but a bit more dirty way and generate into the src/main/java package. This resolves the ide problem and the maven-can-only-have-one-src-foler problem.

If you want could take a look at it? Maybe we can make up a good solution with combined forces.
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Pitts updated OGNL-8:
----------------------------

    Attachment: OGNL-8-keep-custom-AST.patch

OGNL-8-keep-custom-AST patch will keep the custom AST* node implementations, but allow regeneration of the parser, which shall never end up in source controll.

> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Christian Grobmeier (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13123552#comment-13123552 ] 

Christian Grobmeier commented on OGNL-8:
----------------------------------------

I added the change.

To enable jjtree too, one need to update the pom to run jjtree-javacc instead of javacc.

I suggest we change the package of the tree stuff to something else. Then customized versions can extend the originals and we clean them out one by one (*sigh*).

Anyway, I have not checked in that change, because it would lead to a compile error. For some reasons the parser will then call methods which are not generated in the AST files. very weird. Probably this is the reason for the customizing. 

Example: ASTConst does not contain setValue( Object ) in the generated sources.

If any ideas let me know, if not... will try to dig that one out.
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Christian Grobmeier (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13119944#comment-13119944 ] 

Christian Grobmeier commented on OGNL-8:
----------------------------------------

Actually I have looked into JEXL and saw that it was good. I found out that I need to remove the OgnlParser files before the plugin works as expected. If there is already source code in /src/main/java, no new generations happen.

With this new patch everything goes into /target/generated-sources and even the folder is attached to eclipse (mvn eclipse:eclipse)

No build-helper-plugin necessary, actually.

Please review, as I am very new with this stuff. 

PS; tests are running as they do before
                
> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8-keep-custom-AST.patch, OGNL-8.patch, patch-ognl-8-v1.patch, patch-ognl-8-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (OGNL-8) use javacc to generate AST* and OGNLParser Java sources

Posted by "Daniel Pitts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098455#comment-13098455 ] 

Daniel Pitts commented on OGNL-8:
---------------------------------

I'm kind of new to this scene, so excuse me if my comments are misplaced. It seems to me that the AST code is too tightly coupled to the workings of the actual running engine. I wonder if there can be a way to fix that with performance and maintenance in mind, and perhaps (related to my other open feature request OGNL-19) extensibility.

> use javacc to generate AST* and OGNLParser Java sources
> -------------------------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (OGNL-8) use javacc to generate AST* java sources

Posted by "Simone Tripodi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OGNL-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simone Tripodi updated OGNL-8:
------------------------------

    Attachment: OGNL-8.patch

Salut Olivier!
please review the attached patch; it is not complete at all but at least is a helpful starting point, it plugs the necessary components to compile the jjt grammar to generate the parser and then the Java classes (that I dropped from the src dir).
As you can see, if you run {{mvn compile}} a lot of errors happen because, during its history, generated classes by JavaCC have been versioned in the SCM and modified.
Hope it helps, unfortunately I don't have enough knowledge ATM about JavaCC to help more, to modify the grammar :(
Feel free to ping me directly if any help is needed!

> use javacc to generate AST* java sources
> ----------------------------------------
>
>                 Key: OGNL-8
>                 URL: https://issues.apache.org/jira/browse/OGNL-8
>             Project: OGNL (Incubating)
>          Issue Type: Task
>            Reporter: Olivier Lamy
>            Assignee: Olivier Lamy
>         Attachments: OGNL-8.patch
>
>


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira