ph-javacc-maven-plugin depends on ParserGeneratorCC which says:
This fork is not really actively maintained, except some severe problems arise
OOTB, ph-javacc-maven-plugin generates code differently than JavaCC 7.0.10. For example:
- The methods in the parser are generated with the
static keyword, but they reference generic parameters from the class definition. This causes hundreds of compilation errors similar to the one below:
non-static type variable POS cannot be referenced from a static context
static final public List<StringPos<POS>> LabelOrRelTypes() throws ParseException {List<StringPos<POS>> labels = new ArrayList<>();
This is fixed by passing STATIC=false during code generation.
- Class
CypherCharStream implements generated interface CharStream, but some of the methods differ in case. For example, Done is implemented in CypherCharStream as done, so, compilation fails. There are other differences where deprecated (but not removed) methods are not implemented.
CypherCharStream is manually modified to fix these errors.
Why use a plugin that depends on one person and a unmaintained codebase?
ph-javacc-maven-plugin depends on ParserGeneratorCC which says:
OOTB, ph-javacc-maven-plugin generates code differently than JavaCC 7.0.10. For example:
statickeyword, but they reference generic parameters from the class definition. This causes hundreds of compilation errors similar to the one below:This is fixed by passing
STATIC=falseduring code generation.CypherCharStreamimplements generated interfaceCharStream, but some of the methods differ in case. For example,Doneis implemented inCypherCharStreamasdone, so, compilation fails. There are other differences where deprecated (but not removed) methods are not implemented.CypherCharStreamis manually modified to fix these errors.Why use a plugin that depends on one person and a unmaintained codebase?