From: Richard Jones <rich@annexia.org>
To: Mykola Stryebkov <nick@mykola.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Generation of Java code from OCaml
Date: Wed, 23 Sep 2009 20:57:13 +0100 [thread overview]
Message-ID: <20090923195713.GA12236@annexia.org> (raw)
In-Reply-To: <46ACB6F9-FFAE-4C9C-9E46-21CA2E93434C@mykola.org>
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
together):
http://git.et.redhat.com/?p=libguestfs.git;a=blob;f=src/generator.ml;hb=HEAD
Rich.
--
Richard Jones
Red Hat
next prev parent reply other threads:[~2009-09-23 19:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-23 18:15 Mykola Stryebkov
2009-09-23 19:57 ` Richard Jones [this message]
2009-09-23 22:54 ` [Caml-list] " Mykola Stryebkov
2009-09-24 8:03 ` David Allsopp
2009-09-24 9:45 ` blue storm
2009-09-24 11:18 ` Martin Jambon
2009-09-24 12:02 ` blue storm
2009-09-24 12:19 ` Martin Jambon
2009-10-03 12:16 ` Anil Madhavapeddy
2009-10-03 17:27 ` blue storm
2009-10-03 18:29 ` Anil Madhavapeddy
2009-09-26 7:37 ` ygrek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090923195713.GA12236@annexia.org \
--to=rich@annexia.org \
--cc=caml-list@yquem.inria.fr \
--cc=nick@mykola.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox