Browse thread
Right recursion with ocamlyacc
-
Jon Harrop
- Eric C. Cooper
-
Markus Mottl
-
Jon Harrop
- Radu Grigore
- skaller
-
Jon Harrop
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 <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/