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 ) );
}