|
Generic Interpreter 1.2 Private API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgi.Lexicon.Stack
gi.Lexicon.Set
gi.LR0_Grammar.Contexts
gi.LR1_Grammar.Contexts
This class implements a set of LR(1) .Contexts
| Field Summary | |
(package private) Object[] |
get
The objects on this Stack. |
(package private) int |
size
The number of objects on this Stack. |
| Constructor Summary | |
(package private) |
LR1_Grammar.Contexts()
|
| Method Summary | |
private int |
add(Grammar.Production p,
int lookahead,
Lexicon.Set follow)
Adds an LR(1) Context to this set of LR(1) Contexts. |
(package private) boolean |
add(Lexicon.Set S)
Adds a Set of objects to this Set. |
(package private) boolean |
add(Lexicon.Set S,
int start)
Adds a Set of objects to this Set. |
(package private) boolean |
add(Object object)
Adds an object to this Set. |
(package private) boolean |
contains(Object object)
Indicates whether an object occurs in this Set. |
(package private) Object |
pop()
Pops and returns the top object of this Stack. |
private int |
push(Grammar.Production p,
int lookahead,
Lexicon.Set follow)
Pushes an LR(1) Context onto this set of LR(1) Contexts. |
(package private) boolean |
push(Object object)
Pushes an object onto this Stack. |
(package private) Object |
top()
Returns the top object of this Stack. |
String |
toString()
Returns the string representation of this set of LR(0) Contexts. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
Object[] get
The objects on this Stack.
int size
The number of objects on this Stack.
| Constructor Detail |
LR1_Grammar.Contexts()
| Method Detail |
private int add(Grammar.Production p,
int lookahead,
Lexicon.Set follow)
Adds an LR(1) Context to this set of LR(1) Contexts. The capacity is expanded if necessary.
p - the Production in the Context added.lookahead - the lookahead position in the Context added.follow - the follow Set in the Context added.
Contexts at which the Context occurs if this set of LR(1) Contexts changed; otherwise the size of this set of LR(1) Contexts.
private int push(Grammar.Production p,
int lookahead,
Lexicon.Set follow)
Pushes an LR(1) Context onto this set of LR(1) Contexts. The capacity is expanded by 100 if necessary.
p - the Production in the Context pushed.lookahead - the lookahead position in the Context pushed.follow - the follow Set in the Context pushed.
Contexts at which the pushed Context occurs.public String toString()
Returns the string representation of this set of LR(0) Contexts.
toString in class Lexicon.StackContexts.boolean add(Lexicon.Set S)
Adds a Set of objects to this Set. An object is not added if it occurs in this Set or it is null and the null exclusion indicator is true. The capacity is expanded if necessary.
S - the Set to add to this Set.
true if this Set is changed; false otherwise.
boolean add(Lexicon.Set S,
int start)
Adds a Set of objects to this Set. An object is not added if it occurs in this Set or it is null and the null exclusion indicator is true. The capacity is expanded if necessary.
S - the Set to add to this Set.start - the index in S beyond which objects are added.
true if this Set is changed; false otherwise.boolean add(Object object)
Adds an object to this Set. The object is not added if it occurs in this Set or it is null and the null exclusion indicator is true. The capacity is expanded if necessary.
object - the object to add to this Set.
true if this Set is changed; false otherwise.boolean contains(Object object)
Indicates whether an object occurs in this Set.
object - the object whose membership if requested.
true if o occurs in this Set; false otherwise.Object pop()
Pops and returns the top object of this Stack.
Stack.boolean push(Object object)
Pushes an object onto this Stack. The capacity is expanded by 50% if necessary.
object - the object to push onto this Stack.
true indicates this Stack is changed.Object top()
Returns the top object of this Stack.
Stack.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||