caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: Nicolas Ojeda Bar <nojb@math.harvard.edu>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] camlp5 questions
Date: Thu, 12 Aug 2010 17:02:06 +0200	[thread overview]
Message-ID: <20100812150206.GA18721@yquem.inria.fr> (raw)
In-Reply-To: <EDEAE5EA-41D3-4FC7-B765-9771EFFBB83A@math.harvard.edu>

Hi,

> 2. What is the simplest way of replacing (not extending) Ocaml's
> grammar using Camlp5 ? Or equivalently, if I have a parser that
> generates Ocaml AST using q_MLast, how do I do to feed that to
> the Ocaml compiler?

I added a (small) chapter about how to make one's syntax for OCaml
using Camlp5. This chapter will be in next version (5.16) but you
can see it there:
   http://pauillac.inria.fr/~ddr/camlp5/doc/html/redef.html

For the current Camlp5 version (5.15), this part works except that
you have to compile the file "mysyntax.ml" (of that chapter) by:
    ocamlc -pp "camlp5r pa_extend.cmo q_MLast.cmo" -I $(camlp5 -where) -c mysyntax.ml

-- 
Daniel de Rauglaudre
http://pauillac.inria.fr/~ddr/


      parent reply	other threads:[~2010-08-12 15:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 23:45 Nicolas Ojeda Bar
2010-08-12  9:06 ` [Caml-list] " Daniel de Rauglaudre
2010-08-12 15:02 ` Daniel de Rauglaudre [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=20100812150206.GA18721@yquem.inria.fr \
    --to=daniel.de_rauglaudre@inria.fr \
    --cc=caml-list@yquem.inria.fr \
    --cc=nojb@math.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).