English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
camlp5 questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-08-12 (15:02)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] camlp5 questions

> 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:

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