Browse thread
[Caml-list] debugging ocamlyacc grammars
-
Rafael 'Dido' Sevilla
-
James Leifer
-
Rafael 'Dido' Sevilla
- Kenneth Knowles
-
Rafael 'Dido' Sevilla
-
James Leifer
[
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: | Kenneth Knowles <kknowles@u...> |
| Subject: | Re: [Caml-list] debugging ocamlyacc grammars |
>From the manual: "At run-time, the ocamlyacc-generated parser can be debugged by setting the p option in the OCAMLRUNPARAM environment variable (see section 10.2). This causes the pushdown automaton executing the parser to print a trace of its action (tokens shifted, rules reduced, etc). The trace mentions rule numbers and state numbers that can be interpreted by looking at the file grammar.output generated by ocamlyacc -v." -Kenn On Tue, Sep 30, 2003 at 12:45:14PM +0800, Rafael 'Dido' Sevilla wrote: > On Mon, Sep 29, 2003 at 03:27:24PM +0200, James Leifer wrote: > > Do you mean the parser.output file produced when you use the -v > > option? > > > > ocamlyacc -v foo.mly > > > > No. I mean that once the parser is *already running*, you get a > complete trace of the entire action of the parser for some particular > input. What states it enters as it reads particular input tokens, the > contents of its stack as it enters and leaves states, and so on. This > is possible with Bison and Yacc, and I've used it before to debug > grammars written with those tools. I read nothing in Ocamlyacc's (very > meager) documentation that indicates how one should do this or if it is > even possible at all. > > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners