From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 8CEEFBC69 for ; Mon, 20 Aug 2007 10:29:29 +0200 (CEST) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.178]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7K8TSxQ008510 for ; Mon, 20 Aug 2007 10:29:29 +0200 Received: by wa-out-1112.google.com with SMTP id j37so813682waf for ; Mon, 20 Aug 2007 01:29:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=g8HGY/tVFTu0j911LqQsXGAH4kPDbOFeaXZNyxw4AMg10EVsC96PGMmA8rBis7RhvebICMkj3L8FctaAPyNz7pNDNil2DNQDXTzMbXbla2xtMRxZuR0Zc6lsyVu2N3g8zYHdTOvelHC7wyj1IZus6C2f7QtKttZ3hdHbGPhTaxg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EDDjcmCg6AUFYCe383cEWQqJV94pZY9K0YfO3bDhfGCyCNm5IlFd91YcnnPcJFsjB0mKHK2887t+tqaUFyeSSH7pQ7EW10t3BCHmueK+J/XDl5+C1FVPOHIeJw3URXNI6avgGoOH11a3F6fxyKKdVZVpOGhdXvJAeJKqP5jahs0= Received: by 10.115.23.12 with SMTP id a12mr2202792waj.1187598567527; Mon, 20 Aug 2007 01:29:27 -0700 (PDT) Received: by 10.64.148.3 with HTTP; Mon, 20 Aug 2007 01:29:27 -0700 (PDT) Message-ID: <6f9f8f4a0708200129ye6e81c4x5bdb558f579df5ae@mail.gmail.com> Date: Mon, 20 Aug 2007 10:29:27 +0200 From: "Loup Vaillant" To: caml-list@inria.fr Subject: Re: [Caml-list] How can I generate an AST? In-Reply-To: <46C8B80E.1020901@frisch.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6f9f8f4a0708191039o2119f94bm10959175cc887eef@mail.gmail.com> <46C8B80E.1020901@frisch.fr> X-j-chkmail-Score: MSGID : 46C950E8.002 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46C950E8.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; frisch:01 frisch:01 pointer:01 pparse:01 compiler:01 marshaled:01 impl:01 intf:01 marshaled:01 parsetree:01 parsetree:01 config:01 config:01 resp:01 resp:01 2007/8/19, Alain Frisch : > Loup Vaillant wrote: > > Can anybody give me a pointer about how to do this? > > The function Pparse.file is the one that makes the compiler accepts > either source code or marshaled ASTs. By looking at its implementation > and its call sites, you'll discover that the binary format is the > concatenation of a magic string Config.ast_impl_magic_number (resp. > Config.ast_intf_magic_number) and the marshaled version of a > Parsetree.structure (resp. a Parsetree.signature). Great. Thank you. I'll go and try some toy example. Loup