How can I add a grammar-file for Java20 based on https://docs.oracle.com/javase/specs/jls/se20/jls20.pdf ? #3656
Replies: 8 comments 24 replies
-
I suggest you clone the repo, create a branch for changes, add a directory Or, if you want, given the grammar, I can set up a directory, tar/gzip it, and hand it over to you as an initial version. |
Beta Was this translation helpful? Give feedback.
-
Thank you! Suggestions for improvements are welcome. |
Beta Was this translation helpful? Give feedback.
-
Hi! Is it possible to merge Java 20 grammar into existing Java grammar? I don't see big sense to have multiple Java grammars for different versions especially considering the fact that newer grammars are back compatible. What grammar does Java 20 grammar base on? |
Beta Was this translation helpful? Give feedback.
-
The time necessary to parse 846 files with 39433 lines of Java code is 9 min 50 seconds = 590 seconds, so 66.8 lines/sec. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Thanks. I'll integrate the changes this week. |
Beta Was this translation helpful? Give feedback.
-
Hi, I just ran across this conversation. Is the purpose of this java 20 grammar to make a reference grammar that follows the specification closely, regardless of performance? As far as I know, there are no language changes to java since java 17, so the java 17 grammar should parse java 20 files with no issues. Do I have that right? |
Beta Was this translation helpful? Give feedback.
-
The grammar of java/java, compared to my grammar, results in a parser that is twice as fast! The grammar of java/java handles the Contextual Keywords, such as transitive and open correct. Well done! The grammar of java/java contains two tiny mistakes. The attached Java file can not be parsed, because of the comma-separated lists. |
Beta Was this translation helpful? Give feedback.
-
I have made a grammar for Java20. How can I add the grammar-file to this repository?
Beta Was this translation helpful? Give feedback.
All reactions