[Omake] omake support for Menhir?

Jason Hickey jyh at cs.caltech.edu
Wed Jun 14 11:22:22 PDT 2006


Francois Pottier wrote:
> This is great. I have one remark, though: because Menhir supports
> multiple-file grammar specifications, it would be nice if things
> could optionally be slightly less automatic.
...
> The details are not important, but the idea is that the user was supposed
> to call one of MenhirAuto, MenhirMono, or MenhirMulti.

Ah, good.  I wasn't understanding the functions correctly.  We will add 
them to OCaml.om.

> I'll do some local lobbying for the -modules option. As far as I have
> understood, it does not change any existing functionality, only add a
> new output format, so there is no reason not to accept it.

Excellent!

> Yes, currently ocamldep outputs a dependency line that looks like this:
> 
>   foo.cmo: foo.cmi bar.cmi quux.cmi
> 
> (where foo.mly is the grammar file) and Menhir replaces that with
> 
>   foo.ml foo.mli: bar.cmi quux.cmi
> 
> (note that the targets are different and the dependency over foo.cmi
> is dropped).
> 
> Is this something that becomes entirely unnecessary with your ocamldep
> patch?

This makes sense.  I believe we will need to add a slightly modified 
post-processor in OMake for Menhir.  It would do the normal thing, but 
also add the extra dependencies.

    foo.ml foo.mli: bar.cmi quux.cmi

Mainly, we just need for Menhir to pass through the the raw output from 
ocamldep -modules.

> Thank you very much. I'm looking forward to this whole thing working
> smoothly.

You are welcome, this should be very nice!

Jason

-- 
Jason Hickey                  http://www.cs.caltech.edu/~jyh
Caltech Computer Science      Tel: 626-395-6568 FAX: 626-792-4257


More information about the Omake mailing list