Browse thread
Immediate recursive functions
[
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: | 2005-02-18 (16:28) |
From: | Alex Baretta <alex@b...> |
Subject: | Re: [Caml-list] Camlp4 with traditional syntax (was: Camlp4 documentation) |
Hendrik Tews wrote: > Alex Cowie <cowie@cs.unisa.edu.au> writes: > > For me, the use of revised syntax has been a disincentive to using > Camlp4 metaprogramming. I have always wondered whether a traditional > syntax version of Camlp4 was technically feasible. Any comments? > > I believe it is possible. You can parse traditional ocaml (as > opposed to the revised syntax) with camlp4, so it should be > possible to write a quotation expander using traditional ocaml. I > remember Daniel de Rauglaudre complaint a few times about the > difficulty of parsing ocaml. So a quotation expander using > traditional ocaml might have dark corners which do not look as > elegant as pa_macro.ml. There is one more issue with Camlp4: it does not allow for quotations to expand to generic syntactic elements. Often, I use quotations which expand to module definitions. I had to implement my own quotation expander, bypassing the limitations of Camlp4 to achieve this. Alex -- ********************************************************************* http://www.barettadeit.com/ Baretta DE&IT A division of Baretta SRL tel. +39 02 370 111 55 fax. +39 02 370 111 54 Our technology: The Application System/Xcaml (AS/Xcaml) <http://www.asxcaml.org/> The FreerP Project <http://www.freerp.org/>