ocamllex -ml does not generate code compilable with -safe-string #7323
Labels
Comments
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original bug ID: 7323
Reporter: @bobzhang
Assigned to: @bobzhang
Status: closed (set by @xavierleroy on 2017-09-24T15:33:25Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: tools (ocaml{lex,yacc,dep,debug,...})
Tags: junior_job
Monitored by: @gasche
Bug description
It generates code like this
let c = lexbuf.Lexing.lex_buffer.[i] in
where lex_buffer is a buffer, and
.[i]
syntax expect stringThe text was updated successfully, but these errors were encountered: