Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Generation of Java code from OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-09-23 (19:57)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Generation of Java code from OCaml
On Wed, Sep 23, 2009 at 09:15:08PM +0300, Mykola Stryebkov wrote:
> I need to generate arbitrary text (more specifically, Java code) from  
> Ocaml structures, pretty similar to how json-static lib generates  
> ocaml code from ocaml structures.
> Which approach would you recommend?
> Is it possible to use ocamlp4 for it?

Do you want to generate valid Java code (or an AST) or just string
bits of text together?

FWIW we generate 100's of thousands of lines of C, Java and other
languages using OCaml in libguestfs (by stringing bits of text


Richard Jones
Red Hat