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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 75D53BC6B for ; Wed, 25 Jul 2007 11:24:32 +0200 (CEST) Received: from smtp20.orange.fr (smtp20.orange.fr [80.12.242.26]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l6P9OWae016827 for ; Wed, 25 Jul 2007 11:24:32 +0200 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2028.orange.fr (SMTP Server) with ESMTP id F392A1C000A6 for ; Wed, 25 Jul 2007 11:24:31 +0200 (CEST) Received: from [192.168.1.61] (APuteaux-154-1-82-25.w83-204.abo.wanadoo.fr [83.204.161.25]) by mwinf2028.orange.fr (SMTP Server) with ESMTP id C3C8C1C00097; Wed, 25 Jul 2007 11:24:31 +0200 (CEST) X-ME-UUID: 20070725092431802.C3C8C1C00097@mwinf2028.orange.fr Message-ID: <46A716CD.6070307@frisch.fr> Date: Wed, 25 Jul 2007 11:24:29 +0200 From: Alain Frisch User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Nicolas Bros , caml-list@inria.fr Subject: Re: [Caml-list] OCalDE References: <46A4D58C.2060108@univ-savoie.fr> <4fbf351c0707250027t33c80ef1gc57f686ef9cfb376@mail.gmail.com> In-Reply-To: <4fbf351c0707250027t33c80ef1gc57f686ef9cfb376@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 46A716D0.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; frisch:01 frisch:01 parser:01 camlp:01 parser:01 ocaml:01 parses:01 syntax:01 syntax:01 camlp:01 marshaled:01 wrote:01 caml-list:01 alain:01 alain:01 Nicolas Bros wrote: >> How can I tell eclipse parser about my own camlp4 extension ? > > For now, you can't. OcaIDE uses a custom parser written in Java, > copied from the rules of the original Ocaml parser. So, it only parses > standard syntax. > To parse a modified syntax, the file would first have to be processed > by camlp4. > But then, how would OcaIDE get the positions of the elements in the > original unprocessed file? Camlp4 makes this information available when it dumps a binary version of the Caml AST. If the problem is to read this marshaled value, it should not be too difficult to write another printer for Camlp4 (e.g. xml-ish, json-ish or lisp-ish, dependening on what is easier to parse in OcaIDE). -- Alain