From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p04FccXZ006854 for ; Tue, 4 Jan 2011 16:38:38 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArAAAOPNIk3RVdg2kGdsb2JhbACcHwGIEggVAQEBAQkJDAcRBCCiaol3ghiFDS6GTgEBAwWFRQSLB4lB X-IronPort-AV: E=Sophos;i="4.60,272,1291590000"; d="scan'208,217";a="71773374" Received: from mail-qw0-f54.google.com ([209.85.216.54]) by mail3-smtp-sop.national.inria.fr with ESMTP; 04 Jan 2011 16:38:32 +0100 Received: by qwj9 with SMTP id 9so14785438qwj.27 for ; Tue, 04 Jan 2011 07:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type; bh=ylKq2iOvYhG6w+kS6pjOTgvemNRbc8UJv72Ghem9Sec=; b=bTqGuGPv/gS+FhaHU4DbODuugIyrrkjc1bunX/vpZ2SUY+/7v0QU0CbeiGOkDOmpsy p+gL2lufrUGl1FQlFh1bS9/8c7SG2bK2MQpqVGVwV9ue7X1YG1ONvfsHggWYATl4ay7I j4NudrjZq1IjwY5tAzP5sRQmqTN+KoX4GmSmc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=rA/JA7pErKoz3IDKTXRzsNEGAuaAF8NXxmgp9O8PXUeghalyFjQdHdDzdZMr7ZLB6A rLv/9+QOuI2YhK4olYbjUof2sjZa1oTn518YR++OS/laV1UB+oJsQYoDduG0Sr+fgWKO GwaZWQ9of1MQulynn8mqGapBhPeXyaWhYF3zo= Received: by 10.229.91.3 with SMTP id k3mr19003954qcm.84.1294155510561; Tue, 04 Jan 2011 07:38:30 -0800 (PST) MIME-Version: 1.0 Sender: gabriel.scherer@gmail.com Received: by 10.229.23.139 with HTTP; Tue, 4 Jan 2011 07:38:10 -0800 (PST) In-Reply-To: References: <4D23353C.8020803@gmail.com> From: bluestorm Date: Tue, 4 Jan 2011 16:38:10 +0100 X-Google-Sender-Auth: zwIhvnKsmpFQXTYwB02YYeo7LkE Message-ID: To: Jean Krivine Cc: =?ISO-8859-1?Q?T=F6r=F6k_Edwin?= , caml-list@inria.fr Content-Type: multipart/alternative; boundary=001636426c617dbb460499070f0f Subject: Re: [Caml-list] Array.make exception and parser --001636426c617dbb460499070f0f Content-Type: text/plain; charset=ISO-8859-1 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. --001636426c617dbb460499070f0f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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 th= e common use cases).

You may be interested in trying to use menhir [1] as a Parse= r generator instead of ocamlyacc. Menhir is mostly compatible with ocamlyac= c, but doesn't use the Parsing module. While I don't think it as do= ne 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.


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 b= ut 90% compatible software may be a least-effort solution for you -- provid= ed it doesn't have the same issue.
--001636426c617dbb460499070f0f--