[
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: | -- (:) |
| From: | Will Benton <willb@c...> |
| Subject: | [Caml-list] debugging ocamllex/ocamlyacc specifications? |
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