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.4 required=5.0 tests=AWL,DNS_FROM_RFC_POST, 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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 3C650BBAF for ; Tue, 10 Mar 2009 19:41:16 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlECAKNQtklA6ba/imdsb2JhbACUbz8BAQEKCQwHDwWtGYEHjzQBAwEDhAkGgxc X-IronPort-AV: E=Sophos;i="4.38,337,1233529200"; d="scan'208";a="24134442" Received: from nf-out-0910.google.com ([64.233.182.191]) by mail3-smtp-sop.national.inria.fr with ESMTP; 10 Mar 2009 19:41:15 +0100 Received: by nf-out-0910.google.com with SMTP id b11so361466nfh.13 for ; Tue, 10 Mar 2009 11:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version:from :date:content-transfer-encoding:message-id:content-type:to:x-mailer; bh=9fPap2x5EqxSzElUixWW2QkiQ1GWlJVEWU9mc1SN5BI=; b=OFiEJ6LJcUxOwvyd6kUsD/5JHwfEdJNZsYuNtGUJ9L4zmXHcNF45rheW0qfQgM08Or gnFDt8gvmNSfZ9PgvRCw/zXM69mMgwotcUPW02tifZqEC7fsk3zjN6v0zVAg+WtLuiGI en2JQfCaZSacid/ooGPvKSBTiWPm+3p3b+gC4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:from:date:content-transfer-encoding:message-id :content-type:to:x-mailer; b=XgmDIQXKywX1VLx/fXfP6lvchZKA8tQ+0+ZOzPI2QERLbSn6ZD5msHvIqPbgA4gWLX JQVHqyO1K5NgFOlJ6C8p3oJyApjnBMC9GHBHPIH+XF1posQqI9nzpcFqANkBR0VFLHE9 fk0/lEbvwup80EN+mFvVHIy6VDE71T2kx4CmE= Received: by 10.216.45.78 with SMTP id o56mr2918443web.152.1236710475071; Tue, 10 Mar 2009 11:41:15 -0700 (PDT) Received: from ?10.10.30.5? (215.Red-83-59-252.dynamicIP.rima-tde.net [83.59.252.215]) by mx.google.com with ESMTPS id 10sm5466736eyz.10.2009.03.10.11.41.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 10 Mar 2009 11:41:14 -0700 (PDT) Subject: camlp4 grammar and LIST1 Mime-Version: 1.0 (Apple Message framework v1043) From: Joel Reymont Date: Tue, 10 Mar 2009 18:41:11 +0000 Content-Transfer-Encoding: 7bit Message-Id: <6485A041-8698-471F-9D9C-BF3DFF0D3018@gmail.com> Content-Type: text/plain; delsp=yes; charset=us-ascii; format=flowed To: O'Caml Mailing List X-Mailer: Apple Mail (2.1043) X-Spam: no; 0.00; camlp:01 camlp:01 token:01 grammar:02 grammar:02 types:05 debug:05 debug:05 sep:06 i'm:09 i'm:09 rule:10 rule:10 bit:11 folks:12 In the following bit of camlp4 grammar inputDeclarations: [ [ "Input"; ":"; l = LIST1 inputDeclaration SEP "," -> l ] ]; Is it always necessary to write [ x = inputDeclaration -> x ] instead of just inputDeclaration? I'm trying to debug the type of each rule and I'm often getting complaints about 'unit list' being used instead of just 'statement'. By the same token, can I shorten the gramar below to just [ openStatement | closedStatement ]? statement: [ [ s = openStatement -> s | s = closedStatement -> s ] ]; How do you folks debug grammar rule types? Thanks, Joel --- http://tinyco.de --- Mac & iPhone