English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Ampersand in camlp4 grammar extension
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-01-28 (09:39)
From: Paul Steckler <Paul.Steckler@n...>
Subject: Ampersand in camlp4 grammar extension
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