Antlr3.Tool.Grammar.GetUserMaxLookahead C# (CSharp) Method

GetUserMaxLookahead() public method

public GetUserMaxLookahead ( int decision ) : int
decision int
return int
        public virtual int GetUserMaxLookahead( int decision )
        {
            int user_k = 0;
            GrammarAST blockAST = nfa.Grammar.GetDecisionBlockAST( decision );
            object k = blockAST.GetBlockOption( "k" );
            if ( k == null )
            {
                user_k = nfa.Grammar.MaxLookahead;
                return user_k;
            }
            if ( k is int )
            {
                int kI = (int)k;
                user_k = kI;
            }
            else
            {
                // must be String "*"
                if ( k.Equals( "*" ) )
                {
                    user_k = 0;
                }
            }
            return user_k;
        }
Grammar