English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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 (02:28)
From: Eric C. Cooper <ecc@c...>
Subject: Re: [Caml-list] Right recursion with ocamlyacc
On Wed, Feb 16, 2005 at 02:10:45AM +0000, Jon Harrop wrote:
> Now, I don't know much about yacc internals but I'm curious as to why this 
> would be. Does g++ simply consume much bigger stack frames as it recurses 
> (>10x the size?) running out much earler, or is there another reason?

See section 5.9 of the Bison info file:

    By defining the macro `YYMAXDEPTH', you can control how deep the
    parser stack can become before a stack overflow occurs.  Define
    the macro with a value that is an integer.  This value is the
    maximum number of tokens that can be shifted (and not reduced)
    before overflow.  It must be a constant expression whose value is
    known at compile time.
    The default value of `YYMAXDEPTH', if you do not define it, is

Eric C. Cooper          e c c @ c m u . e d u