From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id HAA17068; Fri, 28 Dec 2001 07:40:47 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id HAA16702 for ; Fri, 28 Dec 2001 07:40:46 +0100 (MET) Received: from cilantro.cs.wisc.edu (cilantro.cs.wisc.edu [128.105.166.48]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id fBS6ejT01775 for ; Fri, 28 Dec 2001 07:40:45 +0100 (MET) Received: from localhost (willb@localhost) by cilantro.cs.wisc.edu (8.9.2/8.9.2) with ESMTP id AAA14225 for ; Fri, 28 Dec 2001 00:40:44 -0600 (CST) Date: Fri, 28 Dec 2001 00:40:44 -0600 (CST) From: Will Benton To: caml-list@pauillac.inria.fr Subject: [Caml-list] debugging ocamllex/ocamlyacc specifications? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, all. I am writing a simple interpreter for fun but am having trouble with ocamllex and ocamlyacc. To test my lexer and parser, I am using the test program from the desk calculator example in the manual, but I when I type in an expression and press EOL, it does nothing (my "main" rule in the parser is "exp EOL"); I know it's doing something because if I type in a garbage expression, it gives me a parse error exception. When I type in an expression and press EOF, on the other hand, it gives me a Failure("lexing: empty token") exception. If anyone knows what might cause these problems, that would be nice to know. Otherwise, if there is some way to put the lexer and parser in a "verbose debug mode", detailing what tokens are produced and/or what productions are applied, that would be really helpful. thanks, wb --- Will Benton | "Nicht wie die Welt ist, ist das Mystische,=20 willb@acm.org | sondern da=DF sie ist." --L. Wittgenstein ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr