From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p04FVljk005816 for ; Tue, 4 Jan 2011 16:31:47 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQAAMfLIk1KfVO2hmdsb2JhbACDdqA8CBUBAQEKCwoHFSCifYk7glSFD4Z8AQEDBYEbgzZ0BIsHiUE X-IronPort-AV: E=Sophos;i="4.60,272,1291590000"; d="scan'208";a="83856292" Received: from mail-pv0-f182.google.com ([74.125.83.182]) by mail4-smtp-sop.national.inria.fr with ESMTP; 04 Jan 2011 16:31:41 +0100 Received: by pvc22 with SMTP id 22so3194244pvc.27 for ; Tue, 04 Jan 2011 07:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=251z8wWlGN7VCkuhJ1gJJSY5ytyGoq+cHOq/I+gL2p8=; b=GpTD54mlIswBDdiDlAnroyeIM1jvKjrsOYqSY6MafkHqesCQfYZUqIUB7FwBrTPfDJ RTP8AEW/SHoKEy4L1sUtx0LbZeqAMYtNDKzSDZiE3j5EHWJkQgqXADUoDNDMSxrmHhaj R8GRJ2GIhj1QxBObhXkQq5OOQU33IF99RuCCY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=XqtLg/gYIVQedxfTvo9S0BJT4TWrNbT/un8GuRNQ8P6iqttR7Bu54KD+WHIgz0wOGF Z5IDtyne+emNqrYwhVe2DrSgMWe+3myMQ93FygtIkcPAJmjKTBcXDrlNIHpmJbabYVo+ OdpHZcd84ef8Gz5+k9rBUhg5Gicu1bpt5Iorc= MIME-Version: 1.0 Received: by 10.142.135.2 with SMTP id i2mr3172709wfd.0.1294155100439; Tue, 04 Jan 2011 07:31:40 -0800 (PST) Sender: daniel.c.buenzli@gmail.com Received: by 10.142.89.17 with HTTP; Tue, 4 Jan 2011 07:31:40 -0800 (PST) In-Reply-To: References: <4D23353C.8020803@gmail.com> Date: Tue, 4 Jan 2011 16:31:40 +0100 X-Google-Sender-Auth: SPWmO2EPfD4mAbIyRa3h4Z4LL4c Message-ID: From: =?UTF-8?Q?Daniel_B=C3=BCnzli?= To: Jean Krivine Cc: caml-list@inria.fr Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] Array.make exception and parser > I can see several calls to Array.create that are > not encapsulated in a try .. with. Isn't that a bug ? That's not the bug. The Invalid_argument exception is never supposed to be caught, it denotes a programming error from the client of the module. The bug lies in calling Array.make with a value larger than Sys.max_array_length. Best, Daniel P.S. I don't know if that's your case but so many languages to parse are LL(k) for some k. I don't really understand why people insist on using yacc like parser generators where a recursive descent parser with some combinators fits perfectly, seems nearly as efficient and allow you to give more precise syntax errors to your users.