* Parametrizing ocamlyacc
@ 2008-11-12 14:30 Andrej Bauer
2008-11-12 15:35 ` [Caml-list] " Francois Pottier
0 siblings, 1 reply; 2+ messages in thread
From: Andrej Bauer @ 2008-11-12 14:30 UTC (permalink / raw)
To: caml-list
I have the following situation:
- a signature S
- two modules A and B, which both implement S
- an ocamlyacc file which refers to an implementation of S
I want to generate two executable, one where A is used and another
where B is used.
The most logical thing would be to turn the ocamlyacc part into a
functor which accepts an implementation of S. But there does not seem
to be any way of doing this. What can I do?
Can menhir do this?
Best regards,
Andrej
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Parametrizing ocamlyacc
2008-11-12 14:30 Parametrizing ocamlyacc Andrej Bauer
@ 2008-11-12 15:35 ` Francois Pottier
0 siblings, 0 replies; 2+ messages in thread
From: Francois Pottier @ 2008-11-12 15:35 UTC (permalink / raw)
To: Andrej Bauer; +Cc: caml-list
On Wed, Nov 12, 2008 at 03:30:22PM +0100, Andrej Bauer wrote:
> The most logical thing would be to turn the ocamlyacc part into a
> functor which accepts an implementation of S. But there does not seem
> to be any way of doing this. What can I do?
>
> Can menhir do this?
Yes, Menhir has a keyword (%parameter) that allows precisely this.
--
François Pottier
Francois.Pottier@inria.fr
http://cristal.inria.fr/~fpottier/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-12 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-12 14:30 Parametrizing ocamlyacc Andrej Bauer
2008-11-12 15:35 ` [Caml-list] " Francois Pottier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox