English version
Accueil     Ŕ propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis ŕ jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml ŕ l'adresse ocaml.org.

Browse thread
F# lightweight syntax for Ocaml with camlp4 - possible?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-05-10 (15:24)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] F# lightweight syntax for Ocaml with camlp4 - possible?
On 5/8/07, Chris King <colanderman@gmail.com> wrote:
> On 5/7/07, Dmitry Bely <dmitry.bely@gmail.com> wrote:
> > Could the same idea be implemented for Ocaml with Camlp4? Can it use
> > an indentation level while parsing?
> It has been... http://people.csail.mit.edu/mikelin/ocaml+twt/
> But it doesn't use camlp4 (since camlp4 can't modify the lexer to
> handle tabs specially).

This is somewhat different in the new version of Camlp4 even if one
cannot dynamically extend the default lexer.

1/ One can now change a Camlp4 module by another, since the
implementation is functorized.

2/ The default lexer now keeps all bits of the input including layout

3/ One can setup a custom token filter, that can handle the
indentation, and then drop the layout information (The default filter
drops layout information).

Best regards,

Nicolas Pouillard