| Modifier and Type | Class and Description |
|---|---|
| public static interface | Parser.ActionHandler
The parser knows how to handle the terminal and non-terminal symbols. |
| Modifier and Type | Field and Description |
|---|---|
| protected int | |
| protected Symbol[] | |
| protected final Parser. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final Symbol | Returns: The terminal symbol at the top of the stack unless an implicit action resulted in another symbol, in which case that symbol is returned.The symbol to match against the terminal at the top of the
stack. input)Recursively replaces the symbol at the top of the stack with its production, until the top is a terminal. |
| public int | |
| private void | |
| public Symbol | |
| public final void | processImplicitActions()
Performs any implicit actions at the top the stack, expanding any production (other than the root) that may be encountered. |
| public final void | |
| public final void | |
| public void | |
| public void | |
| public Symbol |
| pos | back to summary |
|---|---|
| protected int pos | |
| stack | back to summary |
|---|---|
| protected Symbol[] stack | |
| symbolHandler | back to summary |
|---|---|
| protected final Parser. | |
| Parser | back to summary |
|---|---|
| public Parser(Symbol root, Parser. | |
| advance | back to summary |
|---|---|
| public final Symbol advance(Symbol input) throws IOException Recursively replaces the symbol at the top of the stack with its production, until the top is a terminal. Then checks if the top symbol matches the terminal symbol suppled terminal. | |
| depth | back to summary |
|---|---|
| public int depth() Returns the depth of the stack. | |
| expandStack | back to summary |
|---|---|
| private void expandStack() If there is no sufficient room in the stack, use this expand it. | |
| popSymbol | back to summary |
|---|---|
| public Symbol popSymbol() Pops and returns the top symbol from the stack. | |
| processImplicitActions | back to summary |
|---|---|
| public final void processImplicitActions() throws IOException Performs any implicit actions at the top the stack, expanding any production (other than the root) that may be encountered. This method will fail if there are any repeaters on the stack. | |
| processTrailingImplicitActions | back to summary |
|---|---|
| public final void processTrailingImplicitActions() throws IOException Performs any "trailing" implicit actions at the top the stack. | |
| pushProduction | back to summary |
|---|---|
| public final void pushProduction(Symbol sym) Pushes the production for the given symbol sym. If sym is a
repeater and input is either | |
| pushSymbol | back to summary |
|---|---|
| public void pushSymbol(Symbol sym) Pushes sym on to the stack. | |
| reset | back to summary |
|---|---|
| public void reset() | |
| topSymbol | back to summary |
|---|---|
| public Symbol topSymbol() Returns the top symbol from the stack. | |
| Modifier and Type | Method and Description |
|---|---|
| public Symbol | Returns: null if advance() is to continue processing the stack. If not null the return value will be returned by advance().The input symbol from the caller of advance input, Symbol The symbol at the top the stack. top)Handle the action symbol top when the input is sought to be taken off the stack. |
| doAction | back to summary |
|---|---|
| public Symbol doAction(Symbol input, Symbol top) throws IOException Handle the action symbol top when the input is sought to be taken off the stack. | |