From: Radu Grigore <radugrigore@gmail.com>
To: Jon Harrop <jon@jdh30.plus.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Right recursion with ocamlyacc
Date: Wed, 16 Feb 2005 11:18:21 +0200 [thread overview]
Message-ID: <7f8e92aa0502160118388588b4@mail.gmail.com> (raw)
In-Reply-To: <200502160435.23574.jon@jdh30.plus.com>
On Wed, 16 Feb 2005 04:35:23 +0000, Jon Harrop <jon@jdh30.plus.com> wrote:
> Yes, left recursion is definitely the way to go in general. But has anyone
> ever had a problem with right-recursion when using ocamlyacc? Is there a
> theoretical reason why this is not a problem with ocamlyacc?
In parsing.ml you will find a function approprately named growstacks.
For very big lists you will get an exception from Array.make. In my
experiment this happened after about 3x10^6 elements. OTOH bison/flex
use AFAIK a fixed stack and fails (as you said) on smaller lists.
--
regards,
radu
http://rgrig.idilis.ro/
next prev parent reply other threads:[~2005-02-16 9:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-16 2:10 Jon Harrop
2005-02-16 2:28 ` [Caml-list] " Eric C. Cooper
2005-02-16 3:58 ` Markus Mottl
2005-02-16 4:35 ` Jon Harrop
2005-02-16 9:18 ` Radu Grigore [this message]
2005-02-18 15:27 ` Radu Grigore
2005-02-16 4:42 ` skaller
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=7f8e92aa0502160118388588b4@mail.gmail.com \
--to=radugrigore@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=jon@jdh30.plus.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;
as well as URLs for NNTP newsgroup(s).