Recursive Descent Parser Applet: Output Windows

Last Update Time-stamp: "97/06/27 19:17:11 umrigar"

The recursive descent parser displays its output in three windows:

  • Parse Tree Window
    The top window displays the parse tree as it is being constructed. Nodes are shown in green while their subtrees are still being built (tracing the green nodes from the bottom to the top gives the contents of the stack). When all the subtrees of a node have been built, the color of the node is changed to red. As the parser is stepped, the window will always display the current node of interest which is highlighted in yellow.
  • Program Window
    This shows the recursive descent parsing program in java. At each step, the parser highlights the line it is currently executing.
  • Trace Window
    This window shows the trace history in the format used in classical compiler texts. Each trace line consists of the stack (in green) followed by the input (in black) which is yet to be processed. The current lookahead token is always the first token in the unexpended input. The stack shows the control stack --- i.e., it contains the parsing functions which have been called but have not yet returned. They correspond to the green nodes in the parse tree.
  • Each window displays a brief description of itself for a short period after the mouse pointer enters it.


    Feedback: Please email any feedback to zdu@acm.org.

    Up to Parsing Demos Main Page