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

GetLocallyDefinedRule() public method

public GetLocallyDefinedRule ( string ruleName ) : Antlr3.Tool.Rule
ruleName string
return Antlr3.Tool.Rule
        public virtual Rule GetLocallyDefinedRule( string ruleName )
        {
            Rule r;
            if ( nameToRuleMap.TryGetValue( ruleName ?? string.Empty, out r ) )
                return r;

            return null;
        }

Usage Example

 public ActionAnalysisLexer(Grammar grammar, string ruleName, GrammarAST actionAST)
     : this(new ANTLRStringStream(actionAST.Token.Text))
 {
     this.grammar = grammar;
     this.enclosingRule = grammar.GetLocallyDefinedRule(ruleName);
     this.actionToken = actionAST.Token;
     this.outerAltNum = actionAST.outerAltNum;
 }
All Usage Examples Of Antlr3.Tool.Grammar::GetLocallyDefinedRule
Grammar