Re: any lex/yacc debuggers????

"Scott Nicol" <sbnicol@mindspring.com>
13 Apr 2002 23:02:30 -0400

          From comp.compilers

Related articles
any lex/yacc debuggers???? varunyagain@rediffmail.com (2002-04-06)
Re: any lex/yacc debuggers???? sbnicol@mindspring.com (Scott Nicol) (2002-04-07)
Re: any lex/yacc debuggers???? k.prasad@attbi.com (Kamal R. Prasad) (2002-04-07)
Re: any lex/yacc debuggers???? sbnicol@mindspring.com (Scott Nicol) (2002-04-10)
Re: any lex/yacc debuggers???? sbnicol@mindspring.com (Scott Nicol) (2002-04-13)
Re: any lex/yacc debuggers???? lex@cc.gatech.edu (Lex Spoon) (2002-04-29)
| List of all articles for this month |

From: "Scott Nicol" <sbnicol@mindspring.com>
Newsgroups: comp.compilers
Date: 13 Apr 2002 23:02:30 -0400
Organization: MindSpring Enterprises
References: 02-04-034 02-04-047 02-04-057 02-04-063
Keywords: yacc, debug
Posted-Date: 13 Apr 2002 23:02:30 EDT

> [If you turn on YYDEBUG in Berkeley yacc, you get a blow by blow report
> on what tokens it reads, what state it shifts into, and what rules it
> reduces. The info is all there if you wanted tart it up into a video
> debugger. -John]


It tells you state numbers. That's all well and good - every YACC
I've seen tells you that. It just doesn't tell you what those state
numbers mean (i.e. I'm at this point in this rule), nor does it tell
you what valid tokens follow next.


The info is all in y.output. The traditional "yacc debugger" is
manual - have one window with YYDEBUG output, another with y.output,
and run through it yourself to see where it went, usually
retrospectively. If you code what is in y.output into y.tab.c, then
all you need is a hook to stop yyparse at every token read and state
change, and you have a "debugger".
--
Scott Nicol
sbnicol@mindspring.com


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.