Visual YACC is a tool that automatically creates visualizations of the YACC
LR parsing process and synthesized attribute computation. The Visual YACC
tool works by instrumenting a standard YACC grammar with graphics calls tha
t draw the appropriate data structures given the current actions by the par
ser, The new grammar is processed by the YACC tools and the resulting parse
r displays the parse stack and parse tree for every step of the parsing pro
cess of a given input string.
Visual YACC was initially designed to be used in compiler construction cour
ses to supplement the teaching of parsing and syntax directed evaluation. W
e have also found it to be useful in the difficult task of debugging YACC g
rammars. In this paper, we describe this tool and how it is used in both co
ntexts. We also detail two different implementations of this tool: one that
produces a parser written in C with calls to Motif; and a second implement
ation that generates Java source code. Copyright (C) 1999 John Wiley & Sons
, Ltd.