Browse thread
F# lightweight syntax for Ocaml with camlp4 - possible?
-
Dmitry Bely
-
Chris King
- Nicolas Pouillard
- Daniel_Bünzli
-
Chris King
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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 information. 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