Browse thread
How can I generate an AST?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 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: http://pauillac.inria.fr/~ddr/camlp5/doc/html/scheme.html Perhaps (probably) incomplete, but you can complete or fix it if you want. 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 http://pauillac.inria.fr/~ddr/