From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 8E10EBBAF for ; Tue, 5 Jan 2010 11:44:23 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.47,505,1257116400"; d="scan'208";a="40782860" Received: from peray.inria.fr (HELO localhost) ([128.93.8.98]) by mail2-relais-roc.national.inria.fr with ESMTP; 05 Jan 2010 11:44:23 +0100 Content-Type: text/plain; charset=UTF-8 Cc: Jon Harrop , caml-list Subject: Re: [Caml-list] Favorite OCaml editor? From: Nicolas Pouillard To: Alain Frisch In-reply-to: <4B4313FB.6070808@frisch.fr> References: <756daca51001042203w3c6a397cx6a5d594c28855a4d@mail.gmail.com> <201001050813.16437.jon@ffconsultancy.com> <4B4313FB.6070808@frisch.fr> Date: Tue, 05 Jan 2010 11:44:23 +0100 Message-Id: <1262688075-sup-7836@peray> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; ocaml:01 ocaml:01 lablgtk:01 camlp:01 parser:01 syntax:01 parsers:01 camlp:01 parser:01 syntax:01 haskell:01 haskell:01 wrote:01 partial:01 caml-list:01 Excerpts from Alain Frisch's message of Tue Jan 05 11:27:07 +0100 2010: > On 05/01/2010 09:13, Jon Harrop wrote: > > I think the best way to write a decent editor for OCaml would be to write one > > using LablGTK for the GUI and camlp4 to parse OCaml code. > > It is indeed very tempting to reuse an existing OCaml parser in order to > support syntax-related features (indentation, coloring, and whatnot); > especially if you can then support syntax extension properly. > > The problem is that the editor is supposed to work even with partial or > syntactically invalid code, which is not the case for the OCaml parsers > (built-in or Camlp4-based). It would be great to have a parser for OCaml > syntax, with robust error recovery. Has anyone worked on such a project? Reusing the work done in the Yi [1][2] editor for the Haskell syntax should be pretty straightforward. Very long and painful however due to the complexity of the grammar of a real language. [1]: http://www.haskell.org/haskellwiki/Yi [2]: http://www.cse.chalmers.se/~bernardy/FunctionalIncrementalParsing.pdf -- Nicolas Pouillard http://nicolaspouillard.fr