> menhir has a QPL license so that I can not patch it
I don't see the problem with the QPL license. As any free software license, it allows you to use the software for any uses, and in particular you can *of course* do modifications to the existing software. The license requires that you make it very explicit what is yours and what comes from the original software, but it certainly does not prohibit changes.
If the licensing is an issue, have you trying contacting the author (François Pottier) about this?