From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 87AAFBBAF for ; Wed, 7 Apr 2010 21:45:16 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EANd9vEvVuiYS/2dsb2JhbACDE5gQcatLkFwNgR+Cb24E X-IronPort-AV: E=Sophos;i="4.52,164,1270418400"; d="scan'208";a="60358216" Received: from solaria.dimino.org ([213.186.38.18]) by mail4-smtp-sop.national.inria.fr with ESMTP; 07 Apr 2010 21:45:16 +0200 Received: from aurora (localhost.localdomain [127.0.0.1]) by solaria.dimino.org (Postfix) with ESMTP id AA07B80048; Wed, 7 Apr 2010 21:45:15 +0200 (CEST) Received: by aurora (Postfix, from userid 1000) id 780DB4764D; Wed, 7 Apr 2010 21:45:15 +0200 (CEST) Subject: Re: [Caml-list] camlp4 infix let From: =?ISO-8859-1?Q?J=E9r=E9mie?= Dimino To: Jacques Le Normand Cc: caml-list caml-list In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 07 Apr 2010 21:45:15 +0200 Message-ID: <1270669515.22777.4.camel@aurora> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 X-Spam: no; 0.00; camlp:01 infix:01 camlp:01 syntax:01 expr:01 expr:01 syntax:01 cheers:01 complains:01 caml-list:01 parse:02 revised:02 seems:03 jacques:03 lid:03 Hi, Le mercredi 07 avril 2010 =C3=A0 15:05 -0400, Jacques Le Normand a =C3=A9cr= it : > Dear List, > I'm writing a camlp4 syntax extension and I'd like to write=20 >=20 > <:expr< let ( >>=3D ) =3D Bar.( >>=3D ) in 5 >> >=20 > but camlp4 complains: >=20 > While expanding quotation "expr" in a position of "expr": > Parse error: ")" or [ipatt] expected after "(" (in [ipatt]) >=20 > yet it seems to be valid revised syntax. Does anyone have any ideas? It is because the ">>" of the ">>=3D" operator is detected as the end of the camlp4 quotation. You can try something like that: let operator =3D ">>=3D" in <:expr< let ($lid:operator$) =3D Bar.($lid:o= perator$) in 5 >> Cheers, J=C3=A9r=C3=A9mie