Version française
Home     About     Download     Resources     Contact us    
Browse thread
Camlp4 as a universal pre-processor ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Teller <David.Teller@u...>
Subject: Re: [Caml-list] Camlp4 as a universal pre-processor ?
I've read the Lambda example, but it looked to me like it was a syntax
extension for OCaml and no other language, unless I completely
misunderstand the meaning of, say, <:expr<...>> .

Now, do you suggest I should write a full lexer and parser with Camlp4
just in order to write simple macros ?

Cheers,
 David

On Tue, 2007-10-23 at 11:39 +0200, Nicolas Pouillard wrote:
> A  way  to  start  this  is  to  just keep the lexer and provide a new grammar
> including  quotations  [2] and antiquotations. On the wiki [1] there is also a
> small  but  complete example of a grammar for the untyped lambda calculus with
> antiquotations [3], and also a tutorial of making a full parser with Camlp4 [4].
> 
> [1]: http://brion.inria.fr/gallium/index.php/Camlp4
> [2]: http://brion.inria.fr/gallium/index.php/Quotation
> [3]: http://brion.inria.fr/gallium/index.php/Lambda_calculus_quotations
> [4]: http://brion.inria.fr/gallium/index.php/Full_parser_tutorial
-- 
David Teller ------------------------------------------
Security of Distributed Systems -----------------------
Project JStify: Static Analysis for JavaScript 2  -----
-- http://www.univ-orleans.fr/lifo/Members/David.Teller
----- Laboratoire d'Informatique Fondamentale d'Orleans