From: nicolas.pouillard <nicolas.pouillard@gmail.com>
To: Paul Steckler <paul.steckler@nicta.com.au>
Cc: "caml-list@yquem.inria.fr" <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] Ampersand in camlp4 grammar extension
Date: Thu, 29 Jan 2009 10:17:20 +0100 [thread overview]
Message-ID: <1233220464-sup-8447@ausone.local> (raw)
In-Reply-To: <2EB36A07AAE8C44BBB1986425E7A22D0034D5BEF2F@atp-mbx1.in.nicta.com.au>
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
prev parent reply other threads:[~2009-01-29 9:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-28 9:39 Paul Steckler
2009-01-28 20:47 ` [Caml-list] " Nicolas Pouillard
2009-01-29 4:36 ` Paul Steckler
2009-01-29 9:17 ` nicolas.pouillard [this message]
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=1233220464-sup-8447@ausone.local \
--to=nicolas.pouillard@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=paul.steckler@nicta.com.au \
/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