Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Immediate recursive functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Martin Jambon <martin_jambon@e...>
Subject: Re: [Caml-list] Camlp4 with traditional syntax (was: Camlp4 documentation)
On 18 Feb 2005, Hendrik Tews wrote:

> Alex Cowie <> 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

There is (at least) one construct which is not provided by the regular
syntax (because it is totally useless when writing code by hand) but
which is essential:

  declare <list of str_items> end

This just packs several definitions (str_items) as one single
This is extremely useful when replacing one definition written in an
extended syntax by several successive definitions (or zero) written in


Martin Jambon, PhD
Researcher in Structural Bioinformatics since the 20th Century
The Burnham Institute
San Diego, California