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.0 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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 5779EBB84 for ; Wed, 28 Jan 2009 10:39:54 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhMDAEe2f0ndx9kLgWdsb2JhbACUDQEBFiIutnGFRwY X-IronPort-AV: E=Sophos;i="4.37,337,1231110000"; d="scan'208";a="22128877" Received: from ajax.nicta.com.au ([221.199.217.11]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 28 Jan 2009 10:39:53 +0100 Received: from nicta-atp-mail.in.nicta.com.au ([129.94.151.12]) by ajax.nicta.com.au with esmtp (Exim 4.63) (envelope-from ) id 1LS6tQ-0005lI-3V for caml-list@yquem.inria.fr; Wed, 28 Jan 2009 20:39:49 +1100 Received: from atp-mbx1.in.nicta.com.au ([221.199.216.123]) by nicta-atp-mail.in.nicta.com.au with Microsoft SMTPSVC(5.0.2195.6713); Wed, 28 Jan 2009 20:39:17 +1100 Received: from atp-mbx1.in.nicta.com.au ([221.199.216.123]) by atp-mbx1.in.nicta.com.au ([221.199.216.123]) with mapi; Wed, 28 Jan 2009 20:39:17 +1100 From: Paul Steckler To: "caml-list@yquem.inria.fr" Date: Wed, 28 Jan 2009 20:39:16 +1100 Thread-Topic: Ampersand in camlp4 grammar extension Thread-Index: AQHJgSxJxLt9Kd97YkiJ0bmghaIhWw== Message-ID: <2EB36A07AAE8C44BBB1986425E7A22D0034D5BEF2D@atp-mbx1.in.nicta.com.au> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US x-tm-as-product-ver: SMEX-8.0.0.1181-5.500.1027-16428.000 x-tm-as-result: No--34.031000-8.000000-31 x-tm-as-user-approved-sender: No x-tm-as-user-blocked-sender: No Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 28 Jan 2009 09:39:17.0811 (UTC) FILETIME=[4A139030:01C9812C] X-SA-Exim-Connect-IP: 129.94.151.12 X-SA-Exim-Mail-From: Paul.Steckler@nicta.com.au Subject: Ampersand in camlp4 grammar extension X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000) X-SA-Exim-Scanned: Yes (on ajax.nicta.com.au) X-Spam: no; 0.00; steckler:01 steckler:01 camlp:01 camlp:01 ocaml:01 preprocessed:01 rewrite:01 rewrite:01 grammar:02 grammar:02 expression:02 match:02 match:02 otoh:02 expressions:04 I'm writing a camlp4 grammar extension for OCaml that tries to match ampersands and rewrite expressions containing them. That wouldn't be a good idea if my code contained ordinary ampersands used for conjunctio= ns. But the code doesn't. I'm struggling how to match the ampersands in my expression rewrite rules. I've tried "&" and SYMBOL "&", which don't work -- the preprocessed file co= ntains the original ampersands. OTOH, I've written rules which use things like "-= >" and work fine. Any help appreciated. -- Paul -- Paul Steckler National ICT Australia paul DOT steckler AT nicta.com.au