caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Best way to generate OCaml code
@ 2014-08-13 13:06 Christoph Höger
  2014-08-13 13:27 ` Jeremie Dimino
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Höger @ 2014-08-13 13:06 UTC (permalink / raw)
  To: caml users

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear all,

what is the state-of-the-art way to generate (programmatically) and
pretty-print a valid OCaml AST? Should I use camlp4 or is there a
standalone-library?

regards,

Christoph
- -- 
Christoph Höger

Technische Universität Berlin
Fakultät IV - Elektrotechnik und Informatik
Übersetzerbau und Programmiersprachen

Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin

Tel.: +49 (30) 314-24890
E-Mail: christoph.hoeger@tu-berlin.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlPrYuoACgkQhMBO4cVSGS+rIQCfQZjV5XNCFCt9VYEiMr2OF126
FdwAoLRkeo9MW4U0YUgZCIiowLfBBkfE
=A/oh
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Best way to generate OCaml code
  2014-08-13 13:06 [Caml-list] Best way to generate OCaml code Christoph Höger
@ 2014-08-13 13:27 ` Jeremie Dimino
  0 siblings, 0 replies; 2+ messages in thread
From: Jeremie Dimino @ 2014-08-13 13:27 UTC (permalink / raw)
  To: Christoph Höger; +Cc: caml users

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

Hi Christoph,

what is the state-of-the-art way to generate (programmatically) and
> pretty-print a valid OCaml AST? Should I use camlp4 or is there a
> standalone-library?
>

Camlp4 is being deprecated and will be distributed as a separate
package starting with OCaml 4.02. You should now use the compiler
libraries which export the same AST used by the compiler [1] as well
as pretty-printers [2]. These are available through the findlib package
compiler-libs.common. To help produce the AST you can use ppx_tools [3].

 [1] https://github.com/ocaml/ocaml/blob/trunk/parsing/parsetree.mli
 [2] https://github.com/ocaml/ocaml/blob/trunk/parsing/pprintast.mli
 [3] https://github.com/alainfrisch/ppx_tools

-- 
Jeremie

[-- Attachment #2: Type: text/html, Size: 1379 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-13 13:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-13 13:06 [Caml-list] Best way to generate OCaml code Christoph Höger
2014-08-13 13:27 ` Jeremie Dimino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).