#124 %apiprivate and %cup2 switches are incompatible

jflex bug
open
Gerwin Klein
5
2013-03-23
2013-03-23
mranderson2007
No

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

Discussion