caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Paul Steckler <Paul.Steckler@nicta.com.au>
To: "caml-list@yquem.inria.fr" <caml-list@yquem.inria.fr>
Subject: Ampersand in camlp4 grammar extension
Date: Wed, 28 Jan 2009 20:39:16 +1100	[thread overview]
Message-ID: <2EB36A07AAE8C44BBB1986425E7A22D0034D5BEF2D@atp-mbx1.in.nicta.com.au> (raw)

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 conjunctions.
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 contains
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


             reply	other threads:[~2009-01-28  9:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-28  9:39 Paul Steckler [this message]
2009-01-28 20:47 ` [Caml-list] " Nicolas Pouillard
2009-01-29  4:36   ` Paul Steckler
2009-01-29  9:17     ` nicolas.pouillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2EB36A07AAE8C44BBB1986425E7A22D0034D5BEF2D@atp-mbx1.in.nicta.com.au \
    --to=paul.steckler@nicta.com.au \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).