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

GenerateMethodForRule() public method

public GenerateMethodForRule ( string ruleName ) : bool
ruleName string
return bool
        public virtual bool GenerateMethodForRule( string ruleName )
        {
            if ( ruleName.Equals( ArtificialTokensRuleName ) )
            {
                // always generate Tokens rule to satisfy lexer interface
                // but it may have no alternatives.
                return true;
            }
            if ( overriddenRules.Contains( ruleName ) )
            {
                // don't generate any overridden rules
                return false;
            }
            // generate if non-synpred or synpred used in a DFA
            Rule r = GetLocallyDefinedRule( ruleName );
            return !r.IsSynPred ||
                   ( r.IsSynPred && synPredNamesUsedInDFA.Contains( ruleName ) );
        }
Grammar