To just quickly address (3), I meant to use a preprocessor (the meta-preprocessor) to write the translator, not to write a preprocessor. To address (4), you would use the package ocaml-base-compiler
, library ocamlcommon
, module Compile_common
, function parse_impl
, to get the Parsetree.structure
(AST). Then you would pass this to your translator function, and the translator function could write Julia code to a text file directly.
2 Likes