%apiprivate and %cup2 switches are incompatible
The fast lexer generator for Java
Brought to you by:
lsf37,
steve_rowe
Jflex-1.4.3 with the cup2 patch applied generates bad code when combining the apiprivate switch and the cup2 switch.
A cup2 scanner implements the interface edu.tum.cup2.scanner.Scanner that contains the signature
> public ScannerToken<? extends Object> readNextTerminal()
> throws java.io.IOException;
The method is implemented in the generated scanner class, but the apiprivate switch changes the public modifier to private, leading to the error message
> cannot implement readNextTerminal() in edu.tum.cup2.scanner.Scanner; attempting to assign weaker access privileges; was public