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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 1F465BC69 for ; Thu, 4 Oct 2007 18:41:04 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAPK0BEfAXQInemdsb2JhbACOOAEBCQo X-IronPort-AV: E=Sophos;i="4.21,230,1188770400"; d="scan'208";a="2384767" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 04 Oct 2007 18:41:03 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l94Gf3Oh008770 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 4 Oct 2007 18:41:03 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAPK0BEdC+Vypnmdsb2JhbACOOAEBAgcEBic X-IronPort-AV: E=Sophos;i="4.21,230,1188770400"; d="scan'208";a="2384764" Received: from ug-out-1314.google.com ([66.249.92.169]) by mail2-smtp-roc.national.inria.fr with ESMTP; 04 Oct 2007 18:41:03 +0200 Received: by ug-out-1314.google.com with SMTP id m3so341204ugc for ; Thu, 04 Oct 2007 09:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; bh=VJs3cKbmpKOOq3b8FXIEIIiesYmpyUpBfGSzOJ3dBkE=; b=V8miwpewg/WyuQ83Qw+coPjZPZLr3qk33BUypBNHrd63T+0MklcghR0IlyOaoQcuS9QUGaQhXvFyql28v72vv9s8D0SMRFXVUCt46Mhoiz+2eXKKvmI84Y0BRXgTv6gprxqFIz4jMAAdyeoIFiI7TAf/edSHliq3LbfeiNJwt1k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=PZIVE8lnallmQfNv4CPJ1Ncqc+OFRqAb3emehhrgfekMYO3KN3Ot/fwnaZodkmgm99XSKhCAeytmocIfj09v5xsCH3f8M+DFFMOJpAFgKce2YqS0Q6HJwpsqCZqYxF0+jdBCPtoqNGd7Hx/DCKOKya5KLO/rLXkzWQOekfKFeRY= Received: by 10.67.116.4 with SMTP id t4mr2168485ugm.1191516062352; Thu, 04 Oct 2007 09:41:02 -0700 (PDT) Received: from ?192.168.1.33? ( [83.52.235.32]) by mx.google.com with ESMTPS id m1sm2522856ugc.2007.10.04.09.41.00 (version=SSLv3 cipher=OTHER); Thu, 04 Oct 2007 09:41:01 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: Caml List From: Joel Reymont Subject: camlp4: Understanding class_declaration Date: Thu, 4 Oct 2007 17:40:58 +0100 X-Mailer: Apple Mail (2.752.3) X-Miltered: at concorde with ID 4705179F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlp:01 expr:01 expr:01 variants:01 strings:01 declaration:02 declaration:02 binding:02 lefta:02 lefta:02 seems:03 loc:03 loc:03 quotation:08 quotation:08 Would someone kindly explain LEFTA, SELF, ANTIQUOT and QUOTATION below? class_declaration: [ LEFTA [ c1 = SELF; "and"; c2 = SELF -> <:class_expr< $c1$ and $c2$ >> | `ANTIQUOT (""|"cdcl"|"anti"|"list" as n) s -> <:class_expr< $anti:mk_anti ~c:"class_expr" n s$ >> | `QUOTATION x -> Quotation.expand _loc x Quotation.DynAst.class_expr_tag | ci = class_info_for_class_expr; ce = class_fun_binding -> <:class_expr< $ci$ = $ce$ >> ] ] It seems they are variants but that's about as much as I understand. What are the "cdcl", "anti" or "list", for example? Why are they strings? And why is `QUOTATION x expanded into Quotation.expand _loc x Quotation.DynAst.class_expr_tag? Thanks in advance, Joel -- http://wagerlabs.com