From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id D65A2BBAF for ; Tue, 5 Jan 2010 11:27:09 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnYEAEuiQkvB/Bd4dmdsb2JhbACbUgEMCxEPAgW3EIQwBA X-IronPort-AV: E=Sophos;i="4.47,504,1257116400"; d="scan'208";a="44202205" Received: from smtp-msa-out01.orange.fr ([193.252.23.120]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Jan 2010 11:27:09 +0100 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a04.orange.fr (SMTP Server) with ESMTP id 8D5CA1C00084; Tue, 5 Jan 2010 11:27:09 +0100 (CET) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf5a04.orange.fr (SMTP Server) with ESMTP id 7582C1C00083; Tue, 5 Jan 2010 11:27:09 +0100 (CET) Received: from [192.168.1.53] (APuteaux-154-1-76-21.w83-204.abo.wanadoo.fr [83.204.179.21]) by mwinf5a04.orange.fr (SMTP Server) with ESMTP id A09DC1C00084; Tue, 5 Jan 2010 11:27:08 +0100 (CET) X-ME-UUID: 20100105102708658.A09DC1C00084@mwinf5a04.orange.fr X-ME-User-Auth: lexifi Message-ID: <4B4313FB.6070808@frisch.fr> Date: Tue, 05 Jan 2010 11:27:07 +0100 From: Alain Frisch User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Jon Harrop Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Favorite OCaml editor? References: <756daca51001042203w3c6a397cx6a5d594c28855a4d@mail.gmail.com> <201001050813.16437.jon@ffconsultancy.com> In-Reply-To: <201001050813.16437.jon@ffconsultancy.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; frisch:01 frisch:01 ocaml:01 ocaml:01 lablgtk:01 camlp:01 parser:01 syntax:01 parsers:01 camlp:01 parser:01 syntax:01 wrote:01 partial:01 caml-list:01 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? Alain