Version française
Home     About     Download     Resources     Contact us    
Browse thread
How can I generate an AST?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] How can I generate an AST?
Hi,

On Mon, Aug 20, 2007 at 03:24:50PM +0200, Loup Vaillant wrote:

> I have still one problem, though : how should I access this code? It
> is not part of the standard library, so I can't just "open Config;;".
> I can't hard-copy this code, either, that is too ugly. Maybe there is
> a way to install a "development package" of Ocaml so I can link it?

For Camlp5, and Camlp4 (before it was integrated into OCaml), I had to
"hard copy" this code, like you say, since it is not exported indeed.

Notice that you have the same problem with the definition of the
abstract syntax tree, since is not exported either.

Perhaps convice the ocaml team to do it, in a specific sub-directory,
since I see that there are already: "ocamldoc", "camlp4", "labltk",
"threads", "vmthreads", "stublibs".

A new installed directory, named, e.g. "syntaxtree" would be great,
containing "parseetree.mli", "parsetree.cmi" and all its dependencies,
as well as this "pconfig.ml" and its object file or a subpart of it,
containing at least these "ast_impl_magic_number" and
"ast_intf_magic_number".

I can do it in the ocaml compiler if I have the permission.

Xavier ?

-- 
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/