I just tried menhir. Looks great ! Problem is it generates an invalid myParser.ml file: it contains a integer _menhir_shifted = 4611686018427387903; which way beyond int32 integers. I guess it comes from my grammar file which is certainly very bad, but in any case I should receive some insult from menhir first no ? I guess this error is linked to the Array.make exception that I get when I use ocamlyacc! J On Tue, Jan 4, 2011 at 4:38 PM, bluestorm wrote: > Indeed, Ocaml arrays are limited in length, and the parser generator may > use arrays internally that would run into the limit for specific grammars (I > don't think the memory used is linear in the size of the input in the common > use cases). > > You may be interested in trying to use menhir [1] as a Parser generator > instead of ocamlyacc. Menhir is mostly compatible with ocamlyacc, but > doesn't use the Parsing module. While I don't think it as done anything > specific to support larger input files, the issue may go away (or don't > appear on the input sizes you need) using the different menhir > implementation. > > [1] http://gallium.inria.fr/~fpottier/menhir/ > > Of course, patching ocamlyacc (or any other generator) to fix this issue > would be the best way to handle this. But still, switching to a different > but 90% compatible software may be a least-effort solution for you -- > provided it doesn't have the same issue. >