Class NormalProduction

    • Field Detail

      • parents

        private final java.util.List<Expansion> parents
        The NonTerminal nodes which refer to this production.
      • accessMod

        private java.lang.String accessMod
        The access modifier of this production.
      • lhs

        private java.lang.String lhs
        The name of the non-terminal of this production.
      • return_type_tokens

        private final java.util.List<Token> return_type_tokens
        The tokens that make up the return type of this production.
      • parameter_list_tokens

        private final java.util.List<Token> parameter_list_tokens
        The tokens that make up the parameters of this production.
      • throws_list

        private java.util.List<java.util.List<Token>> throws_list
        Each entry in this list is a list of tokens that represents an exception in the throws list of this production. This list does not include ParseException which is always thrown.
      • expansion

        private Expansion expansion
        The RHS of this production. Not used for JavaCodeProduction.
      • emptyPossible

        private boolean emptyPossible
        This boolean flag is true if this production can expand to empty.
      • leftExpansions

        private NormalProduction[] leftExpansions
        A list of all non-terminals that this one can expand to without having to consume any tokens. Also an index that shows how many pointers exist.
      • leIndex

        int leIndex
      • walkStatus

        private int walkStatus
        The following variable is used to maintain state information for the left-recursion determination algorithm: It is initialized to 0, and set to -1 if this node has been visited in a pre-order walk, and then it is set to 1 if the pre-order walk of the whole graph from this node has been traversed. i.e., -1 indicates partially processed, and 1 indicates fully processed.
      • lastToken

        private Token lastToken
        The first and last tokens from the input stream that represent this production.
      • firstToken

        private Token firstToken
      • eol

        private final java.lang.String eol
    • Constructor Detail

      • NormalProduction

        public NormalProduction()
    • Method Detail

      • dumpPrefix

        protected java.lang.StringBuffer dumpPrefix​(int indent)
        Overrides:
        dumpPrefix in class Expansion
      • getSimpleName

        protected java.lang.String getSimpleName()
      • dump

        public java.lang.StringBuffer dump​(int indent,
                                           java.util.Set<Expansion> alreadyDumped)
        Overrides:
        dump in class Expansion
      • getParents

        java.util.List<Expansion> getParents()
        Returns:
        the parents
      • setAccessMod

        public void setAccessMod​(java.lang.String accessMod)
        Parameters:
        accessMod - the accessMod to set
      • getAccessMod

        public java.lang.String getAccessMod()
        Returns:
        the accessMod
      • setLhs

        public void setLhs​(java.lang.String lhs)
        Parameters:
        lhs - the lhs to set
      • getLhs

        public java.lang.String getLhs()
        Returns:
        the lhs
      • getReturnTypeTokens

        public java.util.List<Token> getReturnTypeTokens()
        Returns:
        the return_type_tokens
      • getParameterListTokens

        public java.util.List<Token> getParameterListTokens()
        Returns:
        the parameter_list_tokens
      • setThrowsList

        public void setThrowsList​(java.util.List<java.util.List<Token>> throws_list)
        Parameters:
        throws_list - the throws_list to set
      • getThrowsList

        public java.util.List<java.util.List<Token>> getThrowsList()
        Returns:
        the throws_list
      • setExpansion

        public void setExpansion​(Expansion expansion)
        Parameters:
        expansion - the expansion to set
      • getExpansion

        public Expansion getExpansion()
        Returns:
        the expansion
      • setEmptyPossible

        boolean setEmptyPossible​(boolean emptyPossible)
        Parameters:
        emptyPossible - the emptyPossible to set
      • isEmptyPossible

        boolean isEmptyPossible()
        Returns:
        the emptyPossible
      • setLeftExpansions

        void setLeftExpansions​(NormalProduction[] leftExpansions)
        Parameters:
        leftExpansions - the leftExpansions to set
      • getLeftExpansions

        NormalProduction[] getLeftExpansions()
        Returns:
        the leftExpansions
      • setWalkStatus

        void setWalkStatus​(int walkStatus)
        Parameters:
        walkStatus - the walkStatus to set
      • getWalkStatus

        int getWalkStatus()
        Returns:
        the walkStatus
      • setFirstToken

        public Token setFirstToken​(Token firstToken)
        Parameters:
        firstToken - the firstToken to set
      • getFirstToken

        public Token getFirstToken()
        Returns:
        the firstToken
      • setLastToken

        public void setLastToken​(Token lastToken)
        Parameters:
        lastToken - the lastToken to set
      • getLastToken

        public Token getLastToken()
        Returns:
        the lastToken