Fork me on GitHub

Frequently Asked Questions

  1. How can I use custom sources for some of the generated parser files?
How can I use custom sources for some of the generated parser files?

If you have custom source files like a hand-crafted Token.java and want to use these files instead of the ones generated by JavaCC/JJTree/JTB, simply store your custom sources in the ordinary directory for Java sources, i.e. usually src/main/java. This will prevent the plugin from generating these files.

For plugin versions prior to 2.5, you will need to put any custom source files directly next to the grammar file instead. The plugin will then copy your sources to the output directory of the generated parser file such that they eventually make it onto your class path. This approach is still supported by newer plugin versions but not recommended.

[top]