Package org.antlr.analysis
Class LookaheadSet
- java.lang.Object
-
- org.antlr.analysis.LookaheadSet
-
public class LookaheadSet extends java.lang.ObjectAn LL(1) lookahead set; contains a set of token types and a "hasEOF" condition when the set contains EOF. Since EOF is -1 everywhere and -1 cannot be stored in my BitSet, I set a condition here. There may be other reasons in the future to abstract a LookaheadSet over a raw BitSet.
-
-
Field Summary
Fields Modifier and Type Field Description IntervalSettokenTypeSet
-
Constructor Summary
Constructors Constructor Description LookaheadSet()LookaheadSet(int atom)LookaheadSet(LookaheadSet other)LookaheadSet(IntSet s)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)inthashCode()LookaheadSetintersection(LookaheadSet s)booleanisNil()booleanmember(int a)LookaheadSetor(LookaheadSet other)voidorInPlace(LookaheadSet other)voidremove(int a)LookaheadSetsubtract(LookaheadSet other)java.lang.StringtoString()java.lang.StringtoString(Grammar g)
-
-
-
Field Detail
-
tokenTypeSet
public IntervalSet tokenTypeSet
-
-
Constructor Detail
-
LookaheadSet
public LookaheadSet()
-
LookaheadSet
public LookaheadSet(IntSet s)
-
LookaheadSet
public LookaheadSet(int atom)
-
LookaheadSet
public LookaheadSet(LookaheadSet other)
-
-
Method Detail
-
orInPlace
public void orInPlace(LookaheadSet other)
-
or
public LookaheadSet or(LookaheadSet other)
-
subtract
public LookaheadSet subtract(LookaheadSet other)
-
member
public boolean member(int a)
-
intersection
public LookaheadSet intersection(LookaheadSet s)
-
isNil
public boolean isNil()
-
remove
public void remove(int a)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString(Grammar g)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-