From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yquem.inria.fr (Postfix, from userid 25991) id 074A2BBAF; Tue, 7 Dec 2010 19:09:52 +0100 (CET) Date: Tue, 7 Dec 2010 19:09:52 +0100 From: Daniel de Rauglaudre To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] how to generate ocaml ast? Message-ID: <20101207180951.GA10157@yquem.inria.fr> References: <1095780421.1793530.1291717442907.JavaMail.root@zmbs3.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1095780421.1793530.1291717442907.JavaMail.root@zmbs3.inria.fr> User-Agent: Mutt/1.5.9i X-Spam: no; 0.00; rauglaudre:01 rauglaudre:01 ocaml:01 0100,:01 compiler:01 ocaml:01 camlp:01 camlp:01 compiler:01 'small:98 wrote:01 compile:01 compile:01 caml-list:01 ast:02 Hi, On Tue, Dec 07, 2010 at 11:24:02AM +0100, Nicolas Ojeda Bar wrote: > I am writing a compiler for a small language into ocaml. > I can generate ocaml code and then compile that, but I was wondering > if there was a way to directly generate ocaml AST and compile or > execute that using camlp[45]? With Camlp[45], you can make the OCaml compiler consider your programs in your 'small language' as valid OCaml sources. -- Daniel de Rauglaudre http://pauillac.inria.fr/~ddr/