Menu

Support for Java 7 features

Anonymous
2013-06-26
2013-07-17
  • Anonymous

    Anonymous - 2013-06-26

    Would it be easy to include Java 7 features like the diamond operator?
    e.g. List<String> myList = new List<>();

     
  • Jason S

    Jason S - 2013-06-26

    yes, working on it, should be available soon

     
  • Jason S

    Jason S - 2013-06-26

    let me know if you want to lend a hand

     
  • pilcrow

    pilcrow - 2013-06-30

    Yes, I'd like to help, and I've made a set of changes for JavaParser.jjt for Java 7 features which I could submit, but I guess I need permission for that, right?

     
    • Jason S

      Jason S - 2013-06-30

      cool, you could upload the Files if you like and I can integrate. You'll
      get full credit of course.

      I'll look at enabling dev access later in the week if that's Ok for you.

      Also, long term I'm looking at using JParsec instead of Javacc. This is
      just an experiment really, JParsec might be more flexible going forward.
      We're having to make changes to JParsec to support it though, check out the
      discussion on github:-
      https://github.com/abailly/jparsec/issues/5
      https://github.com/abailly/jparsec/pull/7

      Jason

      On Sun, Jun 30, 2013 at 10:41 PM, pilcrow okl@users.sf.net wrote:

      Yes, I'd like to help, and I've made a set of changes for JavaParser.jjt
      for Java 7 features which I could submit, but I guess I need permission for
      that, right?


      Support for Java 7 features


      Sent from sourceforge.net because you indicated interest in <
      https://sourceforge.net/p/java2html/discussion/459803/>

      To unsubscribe from further messages, please visit <
      https://sourceforge.net/auth/subscriptions/>

       
  • pilcrow

    pilcrow - 2013-07-01

    here's the new file ...

     
  • pilcrow

    pilcrow - 2013-07-01

    here's another version that includes support for underscores in decimal and hexadecimal floats. This should now cover all Java 7 features.

     
  • Jason S

    Jason S - 2013-07-01

    Cool, tried it on the JDK 7 Source code, worked with no problems, checked in.

     
  • Jason S

    Jason S - 2013-07-01

    How about updating to Support Java 8 ? :-)

     
  • pilcrow

    pilcrow - 2013-07-17

    Sorry, Java 8 is a bit too much - and not even officially out.

    But I found a bug in my changes, although not allowed to submit via svn:
    Index: src/main/jjtree/JavaParser.jjt
    ===================================================================
    --- src/main/jjtree/JavaParser.jjt (Revision 108)
    +++ src/main/jjtree/JavaParser.jjt (working copy)
    @@ -1371,7 +1371,7 @@
    void FormalParameterForCatch():
    {}
    {
    - Type() ("|" Type()) VariableDeclaratorId()
    + Modifiers() Type() ("|" Type())
    VariableDeclaratorId()
    }

    void ConstructorDeclaration():

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.