From: Will Benton <willb@cs.wisc.edu>
To: caml-list@pauillac.inria.fr
Subject: [Caml-list] debugging ocamllex/ocamlyacc specifications?
Date: Fri, 28 Dec 2001 00:40:44 -0600 (CST) [thread overview]
Message-ID: <Pine.LNX.4.21.0112280027530.14207-100000@cilantro.cs.wisc.edu> (raw)
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
next reply other threads:[~2001-12-28 6:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-28 6:40 Will Benton [this message]
2001-12-28 11:05 ` Markus Mottl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.21.0112280027530.14207-100000@cilantro.cs.wisc.edu \
--to=willb@cs.wisc.edu \
--cc=caml-list@pauillac.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox