FYI, Java grammar changes coming in Java SE 7

joe.darcy at oracle.com joe.darcy at oracle.com
Mon Apr 11 15:31:50 PDT 2011


Hello.

FYI, as part of Project Coin / JSR 334, several language changes are 
coming into Java SE 7 and some of those changes alter the Java 
language's grammar in small ways.  In particular, binary integral 
literals and underscores as a digit separator in literals are now legal, 
"diamond" can be used for constructor type arguments, an exception 
parameter can catch multiple types separated by "|", and the try 
statement can have a list of resources which are managed.

It would be helpful to have the grammar changes validated in a system 
like ANTLR.  The latest version of the JSR 334 specification (v0.875), 
including EBNF versions of the grammar changes, can be downloaded from 
the JCP webpage:

   http://jcp.org/aboutJava/communityprocess/pr/jsr334/index.html

and a document on an earlier version, (v0.83), is available from OpenJDK:

   
http://cr.openjdk.java.net/~darcy/ProjectCoin/ProjectCoin-Documentation-v0.83.html

Thanks,

-Joe


More information about the compiler-grammar-dev mailing list