OCaml lexer is not up-to-date
Menhir's lexer does not recognize OCaml string literals of the form {a|...|a}
. This has been reported by Demi Marie Obenour.
At the very least, Menhir's lexer should be updated so as to remain in sync with OCaml's lexer.
More ambitiously, this may be a good time to think about splitting the lexer, that is, distinguishing the lexer that is used outside semantic actions and the lexer that is used inside semantic actions. The former is Menhir-specific; the latter could conceivably depend on the target language (in a future version of Menhir with multiple target languages).