I use ocamlformat extensively and it would be awesome to have a similar tool to format lexer and parser files as well. Is there any such tool?
2 Likes
Glad to hear ocamlformat is working out for you! Formatting other related formats such as lex, yacc (and toplevel) scripts has come up before, and should be in scope for the core tool (since these formats spring from the core OCaml distribution). A feature request on the issue tracker would be most welcome.
1 Like
Once we have a fairly self contained grammar for lex & yacc, it will be fairly easy to add support to Merlin too.
. ocp-indent gives a very basic support for .mll files
by adding the line:
syntax=mll
in the .ocp-indent file.
. No support for .mly files.
Issue open (long time ago…)
Thanks. Done: https://github.com/ocaml-ppx/ocamlformat/issues/830
2 Likes
Any news about this ?
1 Like