From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: *** X-Spam-Status: No, score=3.0 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS,FORGED_YAHOO_RCVD autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 5ADEBBC0A for ; Sun, 15 Apr 2007 07:01:38 +0200 (CEST) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3F51bWL001366 for ; Sun, 15 Apr 2007 07:01:38 +0200 Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id C7D4A21506A; Sun, 15 Apr 2007 01:01:40 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Sun, 15 Apr 2007 01:01:38 -0400 X-Sasl-enc: H2sAhclYmqW5Hp/pi8oeJLnmp7F321l1SG+YOv7N3j04 1176613297 Received: from [192.168.0.4] (70-56-65-228.tukw.qwest.net [70.56.65.228]) by mail.messagingengine.com (Postfix) with ESMTP id 7EC072237; Sun, 15 Apr 2007 01:01:37 -0400 (EDT) Message-ID: <4621B284.7000801@yahoo.com> Date: Sat, 14 Apr 2007 22:05:08 -0700 From: Jeff Henrikson User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: Nicolas Pouillard Cc: caml-list@inria.fr Subject: Re: [Caml-list] compiling camlp4 dynamic_functor_example.ml References: <46182064.5030209@yahoo.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-j-chkmail-Score: MSGID : 4621B1B1.000 on concorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at concorde with ID 4621B1B1.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; henrikson:01 jehenrik:01 camlp:01 functor:01 functor:01 camlp:01 sig:01 syntax:01 lident:01 jehenrik:01 ocamlc:01 -pp:01 sig:01 bool:01 bool:01 Sorry, there still seems to be an issue with the dynamic_functor_example.ml. The version I got to compile still had a bit of functionality removed. > Yes just open Camlp4.Sig to see the token type now. Really? This seems to generate a type of conflict with the Syntax.Gram when LIDENT is used in an EXTEND. dynamic_functor_example5 is the text on your page verbatim. ~/src/camlp4-beta jehenrik$ ocamlc -I +camlp4 -pp camlp4orf -c dynamic_functor_example5.ml File "dynamic_functor_example5.ml", line 18, characters 20-30: This expression has type (Camlp4.Sig.camlp4_token -> bool) * string but is here used with type Gram.token_pattern = (Gram.Token.t -> bool) * string Type Camlp4.Sig.camlp4_token is not compatible with type Gram.Token.t = Syntax.Token.t Regards, Jeff Henrikson Nicolas Pouillard wrote: > Hello, > > On 4/8/07, Jeff Henrikson wrote: >> The "dynamic_functor_example.ml" from the documentation appears to not >> compile anymore with the latest camlp4 release. Here's my attempt to >> make it work. > > Thanks. > >> from http://gallium.inria.fr/~pouillar/camlp4-changes.html > > I've updated it! > > [...] > >> The first thing I am reasonably sure needs changing is Sig.Syntax.S >> doesn't seem to exist anymore, and judging by the signature of the >> Register.SyntaxExtension functor, we want a Sig.SyntaxExtension. If we >> make the parameter Syntax a Sig.Syntax then Make becomes a functor with >> signature Sig.SyntaxExtension. > > Right. > >> The next thing I figured out by looking at the translated >> json_static.ml, which is that >> >> GLOBAL: foo >> >> needs to be >> >> GLOBAL: foo; > > It always had to be like that (even in the previous web page, strange...) > >> To avert a syntax error. >> >> Likewise, the DELETE_RULE seems to upset the lexer with syntax errors: > > Yes, the DELETE_RULE example was br0ken. > > [...] > >> And yet there is still a symbol not found: >> >> ~/src/camlp4-beta jehenrik$ ocamlc -I +camlp4 -I +camlp4/Camlp4Parsers >> -pp camlp4orf camlp4.cma -c dynamic_functor_example3.ml >> File "dynamic_functor_example3.ml", line 14, characters 2-29: >> Unbound module Camlp4.Sig.Camlp4Token >> >> Which is an unbound because in the current version Camlp4, >> Camlp4.Sig.Camlp4Token is a module type, not a module. I have no idea >> what is intended here. > > Yes just open Camlp4.Sig to see the token type now. > >> BTW, my compilation string is: >> >> ocamlc -I +camlp4 -I +camlp4/Camlp4Parsers -pp camlp4orf camlp4.cma -c >> dynamic_functor_example3.ml > > -I +camlp4/Camlp4Parsers is useless since one doesn't use any > Camlp4*Parser module. > > camlp4.cma no longer exists it's camlp4lib.cma but here it's also > useless since one doesn't link (-c) > > ocamlc -I +camlp4 -pp camlp4orf -c dynamic_functor_example3.ml > >> So that's the best I can do. Please help. The application I want to >> write is not feasible in the old camlp4, but I suspect may be possible >> in the new. Thanks for all the effort getting the system to the next >> level. > > Thanks for your porting efforts! >