Closed kpitt closed 1 year ago
For Java language it seems that it's enough to add the right artifact to the dependencies and pass CODE_GENERATOR
to the tool.
Implementation: #60
Documentation: https://github.com/javacc/javaccPlugin/commit/1974a55c4c5ea5717a3ea298feca9db3728f5dcf
For other languages: C++ support is a separate issue https://github.com/javacc/javaccPlugin/issues/33, once that's implemented (and if there is demand) we can add more.
The JavaCC Gradle plugin currently defaults to using JavaCC version 6.1.2, which was released in May 2014, but it allows a different JavaCC version to be selected by setting a dependency for the
javacc
configuration. This works smoothly up through JavaCC version 7.0.10, at least for Java-only projects:JavaCC 8 represents a major architectural change, with a "core" front-end and separate "generator" back-ends for each supported target language. JavaCC 8 still needs to be tested to verify if the
javacc
dependency mechanism for selecting a JavaCC version will work correctly with multiple artifacts. Extensions to thejavacc
plugin DSL will also be needed to provide full support for target languages other than Java.