Add support for Java7 language features#71
Merged
new-javacc merged 3 commits intojavacc:masterfrom Sep 22, 2019
Merged
Conversation
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
Contributor
Author
|
Hi @new-javacc! could you please comment on this PR? Any chance to have it merged into JavaCC? |
new-javacc
reviewed
Apr 15, 2019
Contributor
new-javacc
left a comment
There was a problem hiding this comment.
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
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. |
Member
|
@inponomarev Could you backport your PR to the 8.0.0 branch? TIA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
JavaCC.jjwas cherry-picked from Allow empty type parameters in Java code of grammar files. #75).Test is also added (in
test/java7featuresandbuild.xml), as well as one TODO frombuild.xmlwas implemented to includeSimpleExamplesinto test process.