Version française
Home     About     Download     Resources     Contact us    
Browse thread
Size of produced parser: menhir vs ocamlyacc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Francois Pottier <Francois.Pottier@i...>
Subject: Re: [Caml-list] Size of produced parser: menhir vs ocamlyacc

Hello,

On Fri, Mar 30, 2007 at 02:14:53PM +0100, Joel Reymont wrote:
> _build/easy_parser.cmo -- ocamlyacc: 98,339,  menhir: 1,542,108
> _build/easy_parser.ml  -- ocamlyacc: 323,729, menhir: 3,550,332
> 
> Compiling a parser with produced by ocamlyacc also takes a fraction  
> of a second vs several seconds with menhir.

This is because we compile automata down to code, whereas ocamlyacc compiles
them down to tables. Ideally, we should provide an option to compile down to
tables instead of code, but we never found time to do so.

> I hope parsers produced by menhir is just as fast as those produce by  
> ocamlyacc during execution!

We did not perform any serious measurements, but we believe that we are
competitive. If you run a comparison, we would be interested in knowing
about the results.

-- 
François Pottier
Francois.Pottier@inria.fr
http://cristal.inria.fr/~fpottier/