Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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