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
camlp4 help
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-18 (10:12)
From: Hendrik Tews <tews@t...>
Subject: Re: [Caml-list] camlp4 help
Pietro Abate <Pietro.Abate@anu.edu.au> writes:

   declared. Is there a way to tell campl4 : pass everything in between 
   RULE and END to a function my_parser ?
In principle yes: You can convert any function (of the right
type) into a camlp4 grammar entry. Then you can do something like

  | "RULE"; result = enty_of_your_function -> ...

See "More Power for Camlp4 recursive descent parsing" in 
(if this leaves anything unclear just ask).