|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oops.parser.Set
manages lookahead set.
Field Summary | |
protected boolean |
empty
true if empty input is acceptable. |
protected java.util.BitSet |
set
if != null: many elements. |
protected int |
token
else if >= 0: single element. |
Constructor Summary | |
Set(int token)
set accepting indicated token. |
|
Set(Set s)
set accepting indicated set of tokens. |
Method Summary | |
boolean |
accepts(Set s)
check for ambiguous lookahead. |
boolean |
add(Set s)
set to accept additional set of tokens. |
void |
addEmpty()
set to accept empty input. |
static Set |
getEOFSet()
|
boolean |
matches(Set tokenSet)
check if lookahead accepts input symbol. |
boolean |
matchesEmpty()
check if lookahead accepts empty input. |
void |
removeEmpty()
set not to accept empty input. |
java.lang.String |
toString()
|
java.lang.String |
toString(Parser parser)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected boolean empty
protected java.util.BitSet set
protected int token
Constructor Detail |
public Set(int token)
token
- number created by parser.public Set(Set s)
s
- set to be cloned.Method Detail |
public static Set getEOFSet()
public void addEmpty()
public void removeEmpty()
public boolean add(Set s)
public boolean matchesEmpty()
public boolean matches(Set tokenSet)
public boolean accepts(Set s)
public java.lang.String toString()
public java.lang.String toString(Parser parser)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |