package mlt_parser
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=8469b4116bd2a03210d371c4c7cb5d76151e24a66dea053f51c5290c8a13907b
md5=a397ffdc9138d39ae6bbf29d7dc9785f
Description
Mlt_parser contains functions for parsing .mlt files (which contain OCaml toplevel sessions) both to power toplevel expect tests and to support a tool that converts .mlt files into .org files, for literate-style documentation.
Published: 04 Feb 2022
README
MLT Parser
Mlt_parser contains functions for parsing *.mlt
files, which contain OCaml toplevel sessions -- i.e., a series of statements followed by their output (in the form of expect tests).
The first of these functions, split_chunks
, was extracted out of Toplevel_expect_test, where it's used to divide the toplevel session into "chunks", where each chunk comprises a set of toplevel code phrases (statements separated by ;;
) and the expect test they precede.
The second, parse
, is used by a tool that converts *.mlt
files into *.org
files. That tool needs to be able to distinguish OCaml code phrases, expect tests, and blocks of org-mode markup (delimited by [%%org]
annotations).
Dependencies (6)
-
ppxlib
>= "0.18.0"
-
dune
>= "2.0.0"
-
ppx_jane
>= "v0.14" & < "v0.15"
-
ppx_expect
>= "v0.14" & < "v0.15"
-
core_kernel
>= "v0.14" & < "v0.15"
-
ocaml
>= "4.08.0"
Dev Dependencies
None
Used by (1)
-
toplevel_expect_test
>= "v0.14.0" & < "v0.15.0"
Conflicts
None