org.antlr.analysis
Class LookaheadSet

java.lang.Object
  extended by org.antlr.analysis.LookaheadSet

public class LookaheadSet
extends java.lang.Object

An 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
 IntervalSet tokenTypeSet
           
 
Constructor Summary
LookaheadSet()
           
LookaheadSet(int atom)
           
LookaheadSet(IntSet s)
           
LookaheadSet(LookaheadSet other)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
 int hashCode()
           
 LookaheadSet intersection(LookaheadSet s)
           
 boolean isNil()
           
 boolean member(int a)
           
 LookaheadSet or(LookaheadSet other)
           
 void orInPlace(LookaheadSet other)
           
 void remove(int a)
           
 LookaheadSet subtract(LookaheadSet other)
           
 java.lang.String toString()
           
 java.lang.String toString(Grammar g)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString(Grammar g)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object