caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Markus Mottl <markus.mottl@gmail.com>
To: Jon Harrop <jon@jdh30.plus.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Right recursion with ocamlyacc
Date: Tue, 15 Feb 2005 22:58:11 -0500	[thread overview]
Message-ID: <20050216035811.GA17612@mobile> (raw)
In-Reply-To: <200502160210.46048.jon@jdh30.plus.com>

On Wed, 16 Feb 2005, Jon Harrop wrote:
> I've just been converting a new Computer Language Shootout submission from 
> OCaml to C++ and found that bison falls over very easily with right recursion 
> (failing to load a 10^4-element list) but ocamlyacc had no problems (even on 
> a 10^5-element list).

Why use right recursive productions in the grammar?  Left recursion runs
in constant stack space so this would be the way to go...

Regards,
Markus

-- 
Markus Mottl    markus.mottl@gmail.com    http://www.ocaml.info


  parent reply	other threads:[~2005-02-16  3:58 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 [this message]
2005-02-16  4:35   ` Jon Harrop
2005-02-16  9:18     ` Radu Grigore
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=20050216035811.GA17612@mobile \
    --to=markus.mottl@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).