From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: "michel levy" <michel.levy@imag.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] camlp4 and dirac notation
Date: Mon, 19 Mar 2007 21:04:28 +0100 [thread overview]
Message-ID: <cd67f63a0703191304s7d417b59me477244dca3fdd4@mail.gmail.com> (raw)
In-Reply-To: <45FECE85.8080403@imag.fr>
On 3/19/07, michel levy <michel.levy@imag.fr> wrote:
> I try to modify the ocaml syntax with camlp4 to add the Dirac notation
> |v >.
> Have you any solution ?
>
> I have tried with
> EXTEND
> expr : LEVEL "simple"
> [["|"; e=expr ;">" -> <:expr< ket $e$>>]
e = expr LEVEL "simple"
You don't want to allow any expression here since it will be ambiguous
with the '>' operator.
You even perhaps don't want an expression here |(f x y z)> seems not
really readable, you can allow only identifiers.
[["|"; id = LIDENT ;">" -> <:expr< ket $lid:id$>> ]]
Hope this helps,
--
Nicolas Pouillard
prev parent reply other threads:[~2007-03-19 20:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 17:55 michel levy
2007-03-19 20:04 ` 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=cd67f63a0703191304s7d417b59me477244dca3fdd4@mail.gmail.com \
--to=nicolas.pouillard@gmail.com \
--cc=caml-list@inria.fr \
--cc=michel.levy@imag.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