Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] debugging ocamllex/ocamlyacc specifications?
@ 2001-12-28  6:40 Will Benton
  2001-12-28 11:05 ` Markus Mottl
  0 siblings, 1 reply; 2+ messages in thread
From: Will Benton @ 2001-12-28  6:40 UTC (permalink / raw)
  To: caml-list

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, 
willb@acm.org    |  sondern daß 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-07  8:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-28  6:40 [Caml-list] debugging ocamllex/ocamlyacc specifications? Will Benton
2001-12-28 11:05 ` Markus Mottl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox