From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: echinuz echinuz <echinuz@yahoo.com>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] How to Write a Pretty Printer for a DSL Using camlp4
Date: Sun, 25 Nov 2007 11:37:00 +0100 [thread overview]
Message-ID: <1195986928-sup-8134@ausone.local> (raw)
In-Reply-To: <838783.64773.qm@web60123.mail.yahoo.com>
Excerpts from echinuz echinuz's message of Sun Nov 25 09:46:22 +0100 2007:
> Hi,
> I'm writing a DSL where I'd like to leverage camlp4 for parsing and
> printing. Right now, I'm having trouble with the pretty printer. As an
> example, let's take the simple calculator example. With the following code, I
> can replace the OCaml toplevel and and print the AST for a simple algebraic
> expression:
[...]
> module Make (Syntax : Camlp4.Sig.Syntax) : Camlp4.Sig.Printer(Syntax.Ast).S =
module Make (Syntax : Camlp4.Sig.Camlp4Syntax) : Camlp4.Sig.Printer(Syntax.Ast).S =
[...]
> module M = Camlp4.Register.Printer(Id)(Make)
module M = Camlp4.Register.OCamlPrinter(Id)(Make)
HTH,
--
Nicolas Pouillard aka Ertai
prev parent reply other threads:[~2007-11-25 10:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-25 8:46 echinuz echinuz
2007-11-25 10:37 ` 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=1195986928-sup-8134@ausone.local \
--to=nicolas.pouillard@gmail.com \
--cc=caml-list@inria.fr \
--cc=echinuz@yahoo.com \
/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