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
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: 2007-08-22 (18:11)
From: Loup Vaillant <loup.vaillant@g...>
Subject: Re: [Caml-list] How can I generate an AST?
(Woops, did not use the list to reply)

2007/8/20, Daniel de Rauglaudre <>:
> 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?
> [...]
> A new installed directory, named, e.g. "syntaxtree" would be great,
> containing "parsetree.mli", "parsetree.cmi" and all its dependencies,
> as well as this "" and its object file or a subpart of it,
> containing at least these "ast_impl_magic_number" and
> "ast_intf_magic_number".

That would be great. It would really help third parties to add any
fancy preprocessor they like, without worrying too much about the AST
implementation details. Could we expect this to appear in a future
release, or in CVS, even?

I wonder : if you expose the AST in an accessible library, will it be
considered part of the standard (and as such an additional burden)? Or
could it be subject to changes like camlp4 (risking a schism)?

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

please ;-(