Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jean Krivine <jean.krivine@gmail.com>
To: bluestorm <bluestorm.dylc@gmail.com>
Cc: "Török Edwin" <edwintorok@gmail.com>, caml-list@inria.fr
Subject: Re: [Caml-list] Array.make exception and parser
Date: Tue, 4 Jan 2011 18:43:22 +0100	[thread overview]
Message-ID: <AANLkTi=UOr9K4wBbUrydBuFxn_6qMWWjtKPsRkBHWvpi@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimxLvrgmcSfr8MLg5c2P9e4yrM3zSkOBf4LiWjg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]

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 <bluestorm.dylc@gmail.com> 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/<http://gallium.inria.fr/%7Efpottier/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.
>

[-- Attachment #2: Type: text/html, Size: 1900 bytes --]

  reply	other threads:[~2011-01-04 17:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-04 13:41 Jean Krivine
2011-01-04 14:56 ` Daniel Bünzli
2011-01-04 14:57   ` Daniel Bünzli
2011-01-04 14:57 ` Török Edwin
2011-01-04 15:14   ` Jean Krivine
2011-01-04 15:31     ` Daniel Bünzli
2011-01-04 16:22       ` Yitzhak Mandelbaum
2011-01-04 16:42         ` Daniel Bünzli
2011-01-04 17:03           ` Yitzhak Mandelbaum
2011-01-04 17:04       ` Jean Krivine
2011-01-04 17:22         ` Daniel Bünzli
2011-01-04 15:38     ` bluestorm
2011-01-04 17:43       ` Jean Krivine [this message]
     [not found]       ` <1125074892.441923.1294163043602.JavaMail.root@zmbs2.inria.fr>
2011-01-04 17:53         ` Francois Pottier
     [not found]     ` <1259991756.440008.1294155536392.JavaMail.root@zmbs2.inria.fr>
2011-01-04 17:45       ` Francois Pottier
2011-01-04 19:30         ` Daniel Bünzli
2011-01-04 19:52           ` Yitzhak Mandelbaum
2011-01-04 20:36             ` Daniel Bünzli
     [not found]         ` <1263353434.442766.1294169448342.JavaMail.root@zmbs2.inria.fr>
2011-01-04 20:31           ` Francois Pottier
2011-01-04 20:40             ` Lukasz Stafiniak
2011-01-04 21:03               ` Török Edwin
2011-01-05  3:24                 ` Yitzhak Mandelbaum
2011-01-05 14:12             ` Boris Yakobowski
2011-01-05 21:12             ` Boris Yakobowski
2011-01-05 13:37 ` Xavier Leroy
2011-01-05 13:46   ` Jean Krivine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=UOr9K4wBbUrydBuFxn_6qMWWjtKPsRkBHWvpi@mail.gmail.com' \
    --to=jean.krivine@gmail.com \
    --cc=bluestorm.dylc@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=edwintorok@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox