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 XAA13225; Tue, 20 Jan 2004 23:26:40 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA13325 for ; Tue, 20 Jan 2004 23:26:39 +0100 (MET) Received: from junkmail.cs.umd.edu (junkmail.cs.umd.edu [128.8.128.69]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id i0KMQcv02633 for ; Tue, 20 Jan 2004 23:26:38 +0100 (MET) Received: from toblerone.cs.umd.edu (toblerone.cs.umd.edu [128.8.129.39]) by junkmail.cs.umd.edu (8.12.10/8.12.5) with ESMTP id i0KMQbnB014277 for ; Tue, 20 Jan 2004 17:26:37 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by toblerone.cs.umd.edu (8.12.10/8.12.5) with ESMTP id i0KMQbkP006897 for ; Tue, 20 Jan 2004 17:26:37 -0500 (EST) Date: Tue, 20 Jan 2004 17:26:37 -0500 (EST) From: Michael Furr To: Subject: [Caml-list] module declarations in camlp4 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: caml-list@inria.fr X-Spam: no; 0.00; camlp:01 camlp:01 uident:01 uident:01 funcs:01 -mike:01 module:03 module:03 binding:03 binding:03 grammar:05 grammar:05 str:05 str:05 defined:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi all, I'm working on a project where I need to extend large portions of the grammar. This has been pretty straightforward with camlp4 for most things but I'm having some trouble getting at the guts of the grammar in a few spots. For instance, I would like to modify the entries for module declarations ala: DELETE_RULE str_item: "module"; UIDENT; module_binding END; EXTEND str_item: [ [ "module"; i = UIDENT; mb = module_binding -> (* call a few funcs *) <:str_item< module $i$ = $mb$ >> ] ]; END; However, since the entry "module_binding" is not defined to be GLOBAL, I can not access it here. Does anyone have any suggestions about how to get around this? Is there any specific reason that some of the grammar entries are defined locally? thanks, -mike ------------------- 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