Frage

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?

War es hilfreich?

Lösung

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()).

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top