# LL(1) Parser Applet: Output Windows

Last Update Time-stamp: "97/06/28 17:16:42 umrigar"

The LL(1) parser displays its output in three windows:

- Parse Tree Window
    The top window displays the parse tree as it is being constructed. Nodes which are still on the parse stack are shown in green (tracing the green nodes from the bottom to the top gives the contents of the stack). When a node is removed from the parse stack, it's color is changed to red. As the parser is stepped, the window will always display the current node of interest which is highlighted in yellow.
- LL(1) Parse Table Window
    This shows the LL(1) parse table. The table contains rule numbers. When a nonterminal is being predicted, the appropriate row (indexed by nonterminal) and column (indexed by terminal) are highlighted to show the predicted rule. Since a LL(1) parse table does not need any rows indexed by terminal symbols, no row in the table is highlighted when a terminal is being predicted.
- 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 is the reverse of what remains to be seen in the current sentential form. The stack contents 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