caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ocamlbuild support for Menhir
@ 2007-03-30 12:17 Joel Reymont
  2007-03-30 12:55 ` [Caml-list] " Nicolas Pouillard
  2007-03-30 12:56 ` Joel Reymont
  0 siblings, 2 replies; 5+ messages in thread
From: Joel Reymont @ 2007-03-30 12:17 UTC (permalink / raw)
  To: Caml List

Is there support for Menhir in ocamlbuild?

Menhir uses the same 'mly' extension as ocamlyacc so I figure I need  
to replace the default rule.

I'm digging around in the ocamlbuild documentation now.

	Thanks, Joel

--
http://wagerlabs.com/






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] ocamlbuild support for Menhir
  2007-03-30 12:17 ocamlbuild support for Menhir Joel Reymont
@ 2007-03-30 12:55 ` Nicolas Pouillard
  2007-03-30 13:05   ` Joel Reymont
  2007-03-30 12:56 ` Joel Reymont
  1 sibling, 1 reply; 5+ messages in thread
From: Nicolas Pouillard @ 2007-03-30 12:55 UTC (permalink / raw)
  To: Joel Reymont; +Cc: Caml List

On 3/30/07, Joel Reymont <joelr1@gmail.com> wrote:
> Is there support for Menhir in ocamlbuild?

Yes -use-menhir

> Menhir uses the same 'mly' extension as ocamlyacc so I figure I need
> to replace the default rule.

Nop that's builtin.

-- 
Nicolas Pouillard


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ocamlbuild support for Menhir
  2007-03-30 12:17 ocamlbuild support for Menhir Joel Reymont
  2007-03-30 12:55 ` [Caml-list] " Nicolas Pouillard
@ 2007-03-30 12:56 ` Joel Reymont
  1 sibling, 0 replies; 5+ messages in thread
From: Joel Reymont @ 2007-03-30 12:56 UTC (permalink / raw)
  To: Caml List

Please disregard the question. This is described in the User's Guide:

3.21 ocamllex, ocamlyacc and menhir

ocamlbuild knows how to run the standard lexer and parser generator  
tools ocamllex and ocamlyacc when your files have the standard .mll  
and .mly extensions.

If you want to use menhir instead of ocamlyacc, you can either launch  
ocamlbuild with the -use-menhir option or add a true: use_menhir line  
to your _tags file.

On Mar 30, 2007, at 1:17 PM, Joel Reymont wrote:

> Is there support for Menhir in ocamlbuild?
>
> Menhir uses the same 'mly' extension as ocamlyacc so I figure I  
> need to replace the default rule.

--
http://wagerlabs.com/






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] ocamlbuild support for Menhir
  2007-03-30 12:55 ` [Caml-list] " Nicolas Pouillard
@ 2007-03-30 13:05   ` Joel Reymont
  2007-03-30 13:09     ` Nicolas Pouillard
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Reymont @ 2007-03-30 13:05 UTC (permalink / raw)
  To: Nicolas Pouillard; +Cc: Caml List

Nicolas,

On Mar 30, 2007, at 1:55 PM, Nicolas Pouillard wrote:

> Yes -use-menhir

The guide says I can put "true: use_menhir" in my _tags file. I tried  
that and this is what I get:

ocamlbuild test.byte --
+ ocamlyacc --raw-depend --ocamldep 'ocamldep.opt -modules'  
easy_parser.mly > easy_parser.mly.depends
usage: ocamlyacc [-v] [-q] [-b file_prefix] filename
Command exited with code 1.
Compilation unsuccessful after building 7 targets (0 cached) in  
00:00:00.

Apparently, ocamlbuild still tries to use ocamlyacc to process  
dependencies. menhir is correctly used with -use-menhir.

I would prefer the _tags option since there's gonna be no way back to  
ocamlyacc for me once I start using menhir's error reporting.

	Thanks, Joel

--
http://wagerlabs.com/






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Caml-list] ocamlbuild support for Menhir
  2007-03-30 13:05   ` Joel Reymont
@ 2007-03-30 13:09     ` Nicolas Pouillard
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Pouillard @ 2007-03-30 13:09 UTC (permalink / raw)
  To: Joel Reymont; +Cc: Caml List

On 3/30/07, Joel Reymont <joelr1@gmail.com> wrote:
> Nicolas,
>
> On Mar 30, 2007, at 1:55 PM, Nicolas Pouillard wrote:
>
> > Yes -use-menhir
>
> The guide says I can put "true: use_menhir" in my _tags file. I tried
> that and this is what I get:
>

Yes that's a known bug :(

-- 
Nicolas Pouillard


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-03-30 13:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-30 12:17 ocamlbuild support for Menhir Joel Reymont
2007-03-30 12:55 ` [Caml-list] " Nicolas Pouillard
2007-03-30 13:05   ` Joel Reymont
2007-03-30 13:09     ` Nicolas Pouillard
2007-03-30 12:56 ` Joel Reymont

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).