From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA19089; Tue, 8 Jul 2003 18:55:59 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA29912 for ; Tue, 8 Jul 2003 18:55:57 +0200 (MET DST) Received: from axiom.anu.edu.au (axiom.anu.edu.au [150.203.127.200]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h68Gttf20891 for ; Tue, 8 Jul 2003 18:55:56 +0200 (MET DST) Received: from pulp.anu.edu.au (pulp.anu.edu.au [150.203.126.25]) by axiom.anu.edu.au (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id h68GtrG31150 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified NO) for ; Wed, 9 Jul 2003 02:55:53 +1000 Received: from pulp.anu.edu.au (localhost [127.0.0.1]) by pulp.anu.edu.au (8.12.9/8.12.9/Debian-5) with ESMTP id h68GuEOf003406 for ; Wed, 9 Jul 2003 02:56:15 +1000 Received: (from abate@localhost) by pulp.anu.edu.au (8.12.9/8.12.9/Debian-5) id h68GuEqI003403 for caml-list@inria.fr; Wed, 9 Jul 2003 02:56:14 +1000 Date: Wed, 9 Jul 2003 02:56:14 +1000 From: Pietro Abate To: caml-list@inria.fr Subject: [Caml-list] camlp4 and eval... Message-ID: <20030708165614.GA3338@anu.edu.au> Mail-Followup-To: Pietro Abate , caml-list@inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: GNU/Linux X-Organization: Research School of Information Science and Engineering (Australian National University) User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; pietro:01 abate:01 camlp:01 hashtbl:01 expr:01 lident:01 int:01 sep:01 let:04 definition:06 parsed:06 north:92 problem:07 mixing:07 i'm:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi all, I'm trying to write a a cp4 extension that evals and use a parsed value during the parsing process... in symbols my problem looks like : let h = Hashtbl.create 10 let store l = Hashtbl.add h l expr: [ [ "keyword"; e = expr -> let e' = EVAL_MAGIC_FUNCTION e in let _ = store e' in <:expr> ] ] I don't want to write something like "["; e = LIST1 int SEP ";"; "]" because I want to maintain the flexibility to accept a function or a LIDENT instead that hard wired a list definition... what's the magic function that gives me back an expression that I can use in the extension context ? Does this function exist or I'm mixing everything again ? tnx, p -- Civilization advances by extending the number of important operations which we can perform without thinking. (Alfred North Whitehead) ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners