antlr
Class Lookahead

java.lang.Object
  |
  +--antlr.Lookahead
All Implemented Interfaces:
Cloneable

public class Lookahead
extends Object
implements Cloneable

Untamed:


Field Summary
(package private)  String cycle
          is this computation part of a computation cycle?
(package private)  BitSet epsilonDepth
          What k values were being computed when end of rule hit?
(package private)  BitSet fset
          actual bitset of the lookahead
(package private)  boolean hasEpsilon
          Does this lookahead depth include Epsilon token type? This is used to avoid having a bit in the set for Epsilon as it conflicts with parsing binary files.
 
Constructor Summary
Lookahead()
          Enabled:
Lookahead(BitSet p)
          Enabled: create a new lookahead set with the LL(1) set to the parameter
Lookahead(String c)
          Enabled: create an empty lookahead set, but with cycle
 
Method Summary
 Object clone()
          Suppressed: Make a deep copy of everything in this object
 void combineWith(Lookahead q)
          Enabled:
 boolean containsEpsilon()
          Enabled:
 Lookahead intersection(Lookahead q)
          Enabled: What is the intersection of two lookahead depths? Only the Epsilon "bit" and bitset are considered.
 boolean nil()
          Enabled:
static Lookahead of(int el)
          Enabled:
 void resetEpsilon()
          Enabled:
 void setEpsilon()
          Enabled:
 String toString()
          Suppressed:
 String toString(String separator, CharFormatter formatter)
          Enabled:
 String toString(String separator, CharFormatter formatter, Grammar g)
          Enabled:
 String toString(String separator, Vector vocab)
          Enabled:
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fset

BitSet fset
actual bitset of the lookahead


cycle

String cycle
is this computation part of a computation cycle?


epsilonDepth

BitSet epsilonDepth
What k values were being computed when end of rule hit?


hasEpsilon

boolean hasEpsilon
Does this lookahead depth include Epsilon token type? This is used to avoid having a bit in the set for Epsilon as it conflicts with parsing binary files.

Constructor Detail

Lookahead

public Lookahead()
Enabled:


Lookahead

public Lookahead(BitSet p)
Enabled: create a new lookahead set with the LL(1) set to the parameter


Lookahead

public Lookahead(String c)
Enabled: create an empty lookahead set, but with cycle

Method Detail

clone

public Object clone()
Suppressed: Make a deep copy of everything in this object

Overrides:
clone in class Object
Returns:
a clone of this instance.
See Also:
java.lang.Cloneable

combineWith

public void combineWith(Lookahead q)
Enabled:


containsEpsilon

public boolean containsEpsilon()
Enabled:


intersection

public Lookahead intersection(Lookahead q)
Enabled: What is the intersection of two lookahead depths? Only the Epsilon "bit" and bitset are considered.


nil

public boolean nil()
Enabled:


of

public static Lookahead of(int el)
Enabled:


resetEpsilon

public void resetEpsilon()
Enabled:


setEpsilon

public void setEpsilon()
Enabled:


toString

public String toString()
Suppressed:

Overrides:
toString in class Object
Returns:
a string representation of the object.

toString

public String toString(String separator,
                       CharFormatter formatter)
Enabled:


toString

public String toString(String separator,
                       CharFormatter formatter,
                       Grammar g)
Enabled:


toString

public String toString(String separator,
                       Vector vocab)
Enabled:



comments?