A G L P R S T

A

Action - class Action.
This abstract class specifies a method for processing the three kinds of parsing action in the program from Figure 4.30 of the Dragon book.
Action() - Constructor for class Action
 
action(int, String) - Method in class LRTable
Returns action[s, a], or null on error.

G

getLHS() - Method in class Production
Returns the left-hand-side symbol of this production.
getRHS() - Method in class Production
Returns the right-hand-side symbols of this production as an array.
getStartState() - Method in class LRTable
Returns the initial state of the parser.
goTo(int, String) - Method in class LRTable
Returns goto[s, a].

L

LRStack - class LRStack.
This class implements the behavior of a stack appropriate for LR parsing.
LRStack() - Constructor for class LRStack
 
LRTable - class LRTable.
This class implements an LR parsing table.
LRTable() - Constructor for class LRTable
 
LRTableException - exception LRTableException.
This class provides an exception for use by LRTableReader, when the latter detects a malformed parse table.
LRTableException(int) - Constructor for class LRTableException
Constructs an exception specifying the line number in the parse-table file where the error occurred.
LRTableReader - class LRTableReader.
This class contains a static method for reading an LR parsing table from a file
LRTableReader() - Constructor for class LRTableReader
 

P

peek() - Method in class LRStack
Returns the top symbol on the stack, without popping it.
pop() - Method in class LRStack
Pops the stack without returning anything.
process(LRTable, LRStack, String, int) - Method in class Action
Abstract processing method.
process(LRTable, LRStack, String, int) - Method in class Shift
Performs the shift actions specified in the LR parsing program from Figure 4.30 of the Dragon book:

push a then s' on top of the stack
advance ip to the next input symbol
process(LRTable, LRStack, String, int) - Method in class Reduce
Performs the reduce actions specified in the LR parsing program from Figure 4.30 of the Dragon book:

pop 2*|beta| symbols off the stack
let s' be the new state now on top of the stack
push A then goto[s', A] on top of the stack
output the production A -> beta
Production - class Production.
This class implements a grammar production (rule).
Production(String, String[]) - Constructor for class Production
Build a production from a left-hand side symbol and sequence of right-hand-side symbols
push(int) - Method in class LRStack
Pushes a state onto the stack.
push(String) - Method in class LRStack
Pushes a left-hand-side symbol onto the stack.

R

readTable(String) - Static method in class LRTableReader
Reads an LR parsing table from a file.
Reduce - class Reduce.
This class implements the reduce action specified in the LR parsing program from Figure 4.30 of the Dragon book.
Reduce(Production) - Constructor for class Reduce
Constructs a reduce action involving the specified production.

S

Shift - class Shift.
This class implements the shift action specified in the LR parsing program from Figure 4.30 of the Dragon book.
Shift(int) - Constructor for class Shift
Constructs a shift action into specified new state.

T

toString() - Method in class LRTable
Returns a string representation of this object.
toString() - Method in class Shift
Returns a string representation of this object.
toString() - Method in class Reduce
Returns a string representation of this object.
toString() - Method in class LRStack
Returns a string representation of this object.
toString() - Method in class Production
Returns a string representation of this object.

A G L P R S T