Hi, On Mon, Oct 24, 2011 at 01:50:25PM +0200, Diego Olivier Fernandez Pons wrote: > I was rather thinking of translating on-the-fly into Caml code and letting > Caml do the job. Is that technically possible (rewriting a toplevel ? a > CamlP4 grammar ?). If so guess I would have to license the Caml compiler > from the INRIA.
You can link with the toplevellib and use the Toploop module which provides functions for executing an OCaml AST. To create the AST you can for example write a parser for your language with Camlp4 and translate it using the Camlp4_import module. Note that you still need to have standard library cmi's at runtime. Also you can only compile your interpreter in bytecode. Cheers, -- Jérémie -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs