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
ocamlyacc loop?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-11-27 (14:55)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] ocamlyacc loop?
On Sat, 2004-11-27 at 20:18, skaller wrote:
> I have an unambiguous ocamlyacc grammar which is dying
> on a particular input term with a stack overflow.

Argg. no it isn't. Please ignore my message.
The problem was actually in the routine *printing*
the parse tree. It said the (moral equivalent of):

let rec string_of_expr e =
match e with
| `AST_the q -> "the " ^ string_of_expr e

It should have said 'q' not 'e'... :)

John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net