From: David Teller <David.Teller@univ-orleans.fr>
To: OCaml <caml-list@inria.fr>
Subject: Camlp4 as a universal pre-processor ?
Date: Tue, 23 Oct 2007 07:54:33 +0200 [thread overview]
Message-ID: <1193118873.7228.10.camel@Blefuscu> (raw)
Hello list,
I'm currently playing with camlp4 3.10. I've succeeded in making a
syntax extension to help me generate annotated trees, which is a good
start.
Now, I understand that, by invoking ocpp, camlp4 may be used as a
pre-processor for non-OCaml language, which sounds interesting, for I
have need of pre-processing some parser generator input (at the moment,
menhir, but there are good chances I'll switch to Dypgen to get around
some limitations) to maintain consistency between the implementation and
the specifications. There are very good chances that I could do that
with cpp, as it's essentially trivial pre-processing, but I'd rather use
camlp4, if only to learn more about it.
So, my question is: how do I write a pre-processor that doesn't depend
on the syntax of OCaml ? I'm hoping I can get away with one or two
quotations and one anti-quotation, but I have no clue how to register
these without adding dependencies to either OCaml's Original or Revised
syntax. Does anyone have any examples handy ?
Thanks,
David
--
David Teller ------------------------------------------
Security of Distributed Systems -----------------------
Project JStify: Static Analysis for JavaScript 2 -----
-- http://www.univ-orleans.fr/lifo/Members/David.Teller
----- Laboratoire d'Informatique Fondamentale d'Orleans
next reply other threads:[~2007-10-23 5:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 5:54 David Teller [this message]
2007-10-23 9:39 ` [Caml-list] " Nicolas Pouillard
2007-10-23 10:34 ` David Teller
2007-10-24 13:23 ` Nicolas Pouillard
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=1193118873.7228.10.camel@Blefuscu \
--to=david.teller@univ-orleans.fr \
--cc=caml-list@inria.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