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 F1B81BBAF for ; Tue, 5 Jan 2010 14:11:49 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.47,505,1257116400"; d="scan'208";a="40793302" Received: from peray.inria.fr (HELO localhost) ([128.93.8.98]) by mail2-relais-roc.national.inria.fr with ESMTP; 05 Jan 2010 14:11:49 +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: <4B4337F4.4070407@frisch.fr> References: <756daca51001042203w3c6a397cx6a5d594c28855a4d@mail.gmail.com> <201001050813.16437.jon@ffconsultancy.com> <4B4313FB.6070808@frisch.fr> <1262688075-sup-7836@peray> <4B4337F4.4070407@frisch.fr> Date: Tue, 05 Jan 2010 14:11:49 +0100 Message-Id: <1262696874-sup-2960@peray> User-Agent: Sup/git Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; ocaml:01 haskell:01 syntax:01 haskell:01 buffer:01 buffer:01 trivial:01 parser:01 emacs:01 noticeably:01 ocaml's:01 wrote:01 parsing:01 parsing:01 caml-list:01 Excerpts from Alain Frisch's message of Tue Jan 05 14:00:36 +0100 2010: > On 05/01/2010 11:44, Nicolas Pouillard wrote: > > 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 > > Thanks for the links. The paper is a very interesting reading indeed. > Its main focus is on incrementality (not reparsing the whole buffer at > every keystroke). I'm not so sure how important it is in the context of > the current discussion though: I guess that with an efficient parsing > technology and modern computers, parsing even a big buffer at every > keystroke should be fast enough. Trivial optimizations like storing the > internal state of the parser at some point could also be used if needed. Hum I doubt, or maybe you are prepared to accept more penalty than I do (I consider Emacs to be noticeably slower than Vim on keystrokes, but please don't feed the troll). > I'm more concerned about the error recovery aspect; the paper suggests > the use of annotated error recovery rules, but writing them for a > grammar like OCaml's does not seem an easy task at all. Indeed this is really a manual process but incrementally adding the rules seemed to work. Actually this is a really visual process. -- Nicolas Pouillard http://nicolaspouillard.fr