Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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

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

See "More Power for Camlp4 recursive descent parsing" in 
http://wwwtcs.inf.tu-dresden.de/~tews/ocamlp4/camlp4-undoc.html
(if this leaves anything unclear just ask).

Bye,

Hendrik