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: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] How can I generate an AST?

On Sun, Aug 19, 2007 at 07:39:50PM +0200, Loup Vaillant wrote:

> I would like to write a preprocessor of my own (to make a lisp
> syntax). In the process, I am slowly catching up with the Ocaml AST.

If you just need a Lisp syntax, you can use Camlp5 which proposes a
Lisp syntax among its parsing kits:

Perhaps (probably) incomplete, but you can complete or fix it if you

If you are interested on the fact of *programming* yourself a new
syntax, use Camlp5: make your parser generating Camlp5 AST and the
rest (dumping syntax tree) is already done by Camlp5. See the doc
or ask who knows for hints (me or other).

Daniel de Rauglaudre