Class Expansion

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String eol  
      boolean inMinimumSize
      This flag is used for bookkeeping by the minimumSize method in class ParseEngine.
      long myGeneration  
      static long nextGenerationIndex
      To avoid right-recursive loops when calculating follow sets, we use a generation number which indicates if this expansion was visited by LookaheadWalk.genFollowSet in the same generation.
      java.lang.Object parent
      The parent of this expansion node.
    • Constructor Summary

      Constructors 
      Constructor Description
      Expansion()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.StringBuffer dump​(int indent, java.util.Set<? super Expansion> alreadyDumped)  
      protected java.lang.StringBuffer dumpPrefix​(int indent)  
      java.lang.String getProductionName()  
      int hashCode()
      A reimplementing of Object.hashCode() to be deterministic.
      static void reInit()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • parent

        public java.lang.Object parent
        The parent of this expansion node. In case this is the top level expansion of the production it is a reference to the production node otherwise it is a reference to another Expansion node. In case this is the top level of a lookahead expansion,then the parent is null.
      • nextGenerationIndex

        public static long nextGenerationIndex
        To avoid right-recursive loops when calculating follow sets, we use a generation number which indicates if this expansion was visited by LookaheadWalk.genFollowSet in the same generation. New generations are obtained by incrementing the static counter below, and the current generation is stored in the non-static variable below.
      • myGeneration

        public long myGeneration
      • inMinimumSize

        public boolean inMinimumSize
        This flag is used for bookkeeping by the minimumSize method in class ParseEngine.
      • eol

        protected static final java.lang.String eol
    • Constructor Detail

      • Expansion

        public Expansion()
    • Method Detail

      • hashCode

        public int hashCode()
        A reimplementing of Object.hashCode() to be deterministic. This uses the line and column fields to generate an arbitrary number - we assume that this method is called only after line and column are set to their actual values.
        Overrides:
        hashCode in class java.lang.Object
      • reInit

        public static void reInit()
      • toString

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

        protected java.lang.StringBuffer dumpPrefix​(int indent)
      • dump

        public java.lang.StringBuffer dump​(int indent,
                                           java.util.Set<? super Expansion> alreadyDumped)
      • getProductionName

        public java.lang.String getProductionName()