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=1.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id A7F20BC69 for ; Mon, 30 Apr 2007 17:46:58 +0200 (CEST) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.230]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3UFkvEF005261 for ; Mon, 30 Apr 2007 17:46:58 +0200 Received: by nz-out-0506.google.com with SMTP id l8so2102182nzf for ; Mon, 30 Apr 2007 08:46:56 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UnP86hiBQU1InZc34Fz6s9Tw0OgQctAdKvrRupH/lu2BrdYdOGmzZHp2kxMi9/BHbkwYtem7L+4Am7JmD0tE+nVZlMFKZsj/GT8d8y+cbvC2O8+PuqCo426lB5HrWitNDyrpUyXK3fTZfwOpLFCpp/jQAgwM023cjlT7TMjtOvQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PsjpJsIzDz/0Wv3s745NLwDC3n44PnzNDpDaHlnUs+69YV/hppYfYkZNQvMvKkjxQMOcsv1Mg9A85InvdBN0vLx8fDrTrdbgtTE7oS6fmoaSgDBQQfY0f9Tav6z19vtokSwqqM25/+MJSdbEZgau1nwLVq3PEkVI3WfcQw/kS44= Received: by 10.115.18.1 with SMTP id v1mr252258wai.1177948016527; Mon, 30 Apr 2007 08:46:56 -0700 (PDT) Received: by 10.114.181.18 with HTTP; Mon, 30 Apr 2007 08:46:56 -0700 (PDT) Message-ID: Date: Mon, 30 Apr 2007 17:46:56 +0200 From: "Nicolas Pouillard" To: "Joel Reymont" Subject: Re: Upgrading sexplib-2.7.0 to camlp4 3.10 Cc: "Caml List" In-Reply-To: <72EB1952-F2C8-44AC-B1A6-7D8CE5F4A157@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <220DCCF0-FD2D-4116-8E30-992C1AD3FE95@gmail.com> <72EB1952-F2C8-44AC-B1A6-7D8CE5F4A157@gmail.com> X-j-chkmail-Score: MSGID : 46360F71.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46360F71.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 syntax:01 pcaml:01 parsing:01 nodes:01 camlp:01 syntax:01 pcaml:01 parsers:01 sexp:01 wrote:01 partial:01 deprecated:01 preprocessor:01 grammar:01 On 4/30/07, Joel Reymont wrote: > One last chunk in that huge file... > > --- > Parse error: Deprecated syntax, the grammar module is expected > Preprocessor error > --- > > This points at "str" in Pcaml.str_item in DELETE_RULE. How do I fix? > > Also, would you have any comments on the code in EXTEND? > Hum that part is really parsing specific, and my answer is only partial. The hard point is that there no more a list of type_declaration but a type_declaration with some `and' nodes to separate them. open Camlp4.PreCast;; open Syntax;; (* now removes all Pcaml. *) > DELETE_RULE DELETE_RULE Gram > Pcaml.str_item: "type"; LIST1 Pcaml.type_declaration SEP "and" str_item: "type"; type_declaration > END You should look at camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml > EXTEND EXTEND Gram [...] > | _ -> <:str_item< declare $tydef$; $valdef$; end >> ]]; | _ -> <:str_item< $tydef$; $valdef$ >> ]]; > > Pcaml.str_item: > [[ "SEXP_CONV_PATH"; conv_path = STRING -> > set_conv_path conv_path; > StDcl (_loc, []) <:str_item<>> > ]]; > END > -- Nicolas Pouillard