Version française
Home     About     Download     Resources     Contact us    
Browse thread
Favorite OCaml editor?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] Favorite OCaml editor?
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