ocamllex -ml does not generate code compilable with -safe-string #7323
Original bug ID: 7323
It generates code like this
let c = lexbuf.Lexing.lex_buffer.[i] in
where lex_buffer is a buffer, and
The text was updated successfully, but these errors were encountered:
Comment author: @gasche
Good point, and should be relatively easy to fix (by using Bytes.get instead).
Using Bytes.get means that code generated from new versions of ocamllex will not compile under old versions of the standard library, but I think this is just fine -- people using an old compiler can use an old ocamllex to regenerate the parser.