Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Right recursion with ocamlyacc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-02-16 (09:18)
From: Radu Grigore <radugrigore@g...>
Subject: Re: [Caml-list] Right recursion with ocamlyacc
On Wed, 16 Feb 2005 04:35:23 +0000, Jon Harrop <> 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 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.