[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-01-29 (09:18) |
From: | |
Subject: | RE: [Caml-list] Ampersand in camlp4 grammar extension |
Excerpts from Paul Steckler's message of Thu Jan 29 05:36:44 +0100 2009: > Hi Nicolas, > > > However I can guess in your question that you don't really want to change the > syntax of the binary operator "&", but rather to change it's meaning. In > camlp4 there is a much more sane and easier way to do this using filters. > By the way there is an example in the camlp4 sources that does exactly this. > > Yes, this seems to work -- but it would be simpler, in fact, if I could just use > a rule in my grammar extension. > Do you know if there's a way to debug grammar extensions? I don't think there is a nice way do to it. > Maybe I need to > DELETE a rule from the original grammar, though it's not clear to me which > rule that is. Look at Camlp4Parsers/Camlp4OCamlRevisedParser.ml The rule is: infixop5: [ [ x = [ "&" | "&&" ] -> <:expr< $lid:x$ >> ] ] ; -- Nicolas Pouillard