Skip to content

Add support for Java7 language features#71

Merged
new-javacc merged 3 commits intojavacc:masterfrom
inponomarev:master
Sep 22, 2019
Merged

Add support for Java7 language features#71
new-javacc merged 3 commits intojavacc:masterfrom
inponomarev:master

Conversation

@inponomarev
Copy link
Copy Markdown
Contributor

@inponomarev inponomarev commented Oct 18, 2018

Java 7 was released in 2011, however its syntax features are still unsupported in JavaCC.

The proposed change introduces the support of all the syntax features introduced in Java 7 (see here for reference):

Test is also added (in test/java7features and build.xml), as well as one TODO from build.xml was implemented to include SimpleExamples into test process.

@inponomarev inponomarev changed the title add support for try-with-resources syntax in rules Add support for Java7 language features Jan 3, 2019
inponomarev and others added 3 commits March 16, 2019 17:06
This allows one to use the diamond when constructing a generic class: new ArrayList<>()

This feature of the Java compiler is documented at https://docs.oracle.com/javase/7/docs/technotes/guides/language/type-inference-generic-instance-creation.html
Multiple exception catching
Underscores in numeric literals
Binary literals

+tests
@inponomarev
Copy link
Copy Markdown
Contributor Author

Hi @new-javacc! could you please comment on this PR? Any chance to have it merged into JavaCC?

Copy link
Copy Markdown
Contributor

@new-javacc new-javacc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not sure we want this. In fact, I want to get rid of all language (java) specific parts of the JavaCC grammar. In the spirit of the new code generators, it should be done in the java code generator.

phax added a commit to tulipcc/ParserGeneratorCC that referenced this pull request May 1, 2019
@new-javacc
Copy link
Copy Markdown
Contributor

Since the new code generators are in a different branch, I think it's ok for now. I would appreciate it more if you can fix the Java grammar to be the latest (Java 11?) so that we can use that for parsing in the new world.

@new-javacc new-javacc merged commit a31ea55 into javacc:master Sep 22, 2019
@zosrothko
Copy link
Copy Markdown
Member

@inponomarev Could you backport your PR to the 8.0.0 branch? TIA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants