Question

I'm about to write an abstract syntax for OCaml in scala, in combination with a pretty printer. After that I want execute the generated OCaml code from scala and work with the result.

Is there a way to do that, without running a external OCaml compiler, execute the program and reading the result from stdout?

Était-ce utile?

La solution

If you want to call external processes from Scala, take a look on the built-in processes DSL. It's pretty nice.

You can also fall back to the simple Java solutions (i.e., ProcessBuilder or Runtime.exec()).

Autres conseils

Preview version of OCaml-Java is available. http://ocamljava.x9c.fr/preview/#scripting

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top