Browse thread
quasiquoting: 3 parsers for camlp4 vs 1 for haskell?
-
Joel Reymont
- Jake Donham
-
Jon Harrop
- Geoffrey Mainland
- Nicolas Pouillard
[
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: | Geoffrey Mainland <mainland@e...> |
| Subject: | Re: [Caml-list] quasiquoting: 3 parsers for camlp4 vs 1 for haskell? |
On Thu, Apr 23, 2009 at 12:19:09AM +0100, Jon Harrop wrote: > On Friday 17 April 2009 19:24:31 Joel Reymont wrote: > > From the quasiquoting paper by Geoffrey Mainland [1], page 7: > > > > "The major advantage of our approach over that of camlp4 > > is that we demonstrate how to use generic programming > > to reuse a single parser to parse quasiquoted patterns, > > quasiquoted expressions and plain syntax that does not > > include antiquotes. Because OCaml does not support generic > > programming out of the box, > > I have no idea what he meant by this. > > > in camlp4 this would require three separate parsers, > > AFAICT, that was not true when he wrote it (Sept 2007) and is not true today. > > > each generating different representations of the same concrete syntax." > > That has never been true. > > > Can someone shed light on how, where and why three different > > parsers are required for camlp4? > > I've CC'd the author. Perhaps he can shed some light on this. I actually spoke with Nicolas Pouillard about this at the workshop, and he informed me that his rewrite of camlp4 for the 3.10 release included a facility for translating a value into an OCaml AST representing that value, so yes, that statement is now incorrect. I think Jake Donham's reply to Joel's message of 4/15 made this clear and even helpfully pointed to some code. As for my work, I hope that anyone reading the paper will find the technique I used to provide this functionality in the Haskell implementation of quasiquotation both elegant and easy to understand. Geoff