BNFC / bnfc

BNF Converter
http://bnfc.digitalgrammars.com/
587 stars 165 forks source link

Fix #414: do not use error token in Menhir backend #415

Closed andreasabel closed 2 years ago

andreasabel commented 2 years ago

Fix #414: do not use error token in Menhir backend, rather catch ParXXX.Error.

The semantics of the error token changed in Menhir-2021-12-30 and is no longer compatible to OcamlYacc. Basically, its use is deprecated for just throwing a parse error.

This PR keeps the error rule for the OcamlYacc backend, for backwards-compatibility of the API.