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=2.0 required=5.0 tests=AWL,DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id BD343BC37 for ; Sun, 14 Jun 2009 02:25:22 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvkCAP7fM0rRVdvVkWdsb2JhbACCITGVNT8BAQEBCQkMBxGnBYEYjlUBAwIEhAkF X-IronPort-AV: E=Sophos;i="4.42,215,1243807200"; d="scan'208";a="41731090" Received: from mail-ew0-f213.google.com ([209.85.219.213]) by mail4-smtp-sop.national.inria.fr with ESMTP; 14 Jun 2009 02:25:22 +0200 Received: by ewy9 with SMTP id 9so2179143ewy.27 for ; Sat, 13 Jun 2009 17:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=MPKobEYd1vgGniJLgCnY1nc7dD4n0Ml2chRBA3qmCDg=; b=gl42QlpzfxyyCZHjKi9PBpg2iiwif22vZ5lkgUlMW5cI7LIXiqX2RipF/7xCImArTg lu4xHpJr98a75TAiOEsxDu0aof4JmHJQBMOaG+QnK+2tHqy4yvqNQAwgqomfOqJRdoQr TtXmM0+q4f5OpNwqrieXGi0ujwWy+ShR6DnN0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=C5xBuapZKBuAdWXKKYyA7Q98Zla6m5EDOQaeukW5ixqy1IocUkPze8E5XL6WScD9Md Zz3kd2AlxlHIy+g1hD5h82QvOhAZJncomTBezo1oWiwf2GpNs6hX/6W8U9N39/F13SKS zdCu/KN8F5hmN2/HW8ZKB5l1Ch12cWrK/93hQ= MIME-Version: 1.0 Received: by 10.216.36.80 with SMTP id v58mr1828095wea.193.1244939121624; Sat, 13 Jun 2009 17:25:21 -0700 (PDT) Date: Sat, 13 Jun 2009 20:25:21 -0400 Message-ID: Subject: Camlp4 question From: Jacques Le Normand To: caml-list caml-list Content-Type: multipart/alternative; boundary=0016367b6af21c890b046c43fa62 X-Spam: no; 0.00; camlp:01 syntax:01 camlp:01 mytype:01 lident:01 ctyp:01 params:01 params:01 syntax:01 lident:01 ctyp:01 atoms:98 atoms:98 W6:98 ident:01 --0016367b6af21c890b046c43fa62 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello list, how does one define type parameter syntax with camlp4? right now I'm using: test: [[ "mytype" ; options = OPT parameters ; ident = a_LIDENT; "=" ; ctyp -> (ident,atoms) ]]; parameters: [ ["(";params = comma_type_parameter;")" -> params] | [tp = type_parameter -> tp ]]; Is this the right way to do it or has parameters already been defined elsewhere? --Jacques L. --0016367b6af21c890b046c43fa62 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello list,
how does one define type parameter syntax with camlp4?
ri= ght now I'm using:

=A0 test:
=A0=A0=A0 [[
=A0=A0=A0=A0=A0= =A0 "mytype" ; options =3D OPT parameters=A0 ; ident =3D a_LIDENT= ; "=3D" ; ctyp -> (ident,atoms)
=A0=A0=A0=A0 ]];
=A0
=A0 parameters:
=A0=A0=A0 [
=A0=A0=A0=A0= =A0 ["(";params =3D comma_type_parameter;")" -> para= ms]
=A0=A0=A0 |
=A0=A0=A0 [tp =3D type_parameter -> tp ]];

= Is this the right way to do it or has parameters already been defined elsew= here?

--Jacques L.
--0016367b6af21c890b046c43fa62--