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

DefineSyntacticPredicate() public method

public DefineSyntacticPredicate ( Antlr3.Tool.GrammarAST blockAST, string currentRuleName ) : string
blockAST Antlr3.Tool.GrammarAST
currentRuleName string
return string
        public virtual string DefineSyntacticPredicate( GrammarAST blockAST,
                                               string currentRuleName )
        {
            if ( nameToSynpredASTMap == null )
            {
                nameToSynpredASTMap = new List<KeyValuePair<string, GrammarAST>>();
            }
            string predName =
                SynpredRulePrefix + ( nameToSynpredASTMap.Count + 1 ) + "_" + name;
            blockAST.SetTreeEnclosingRuleNameDeeply( predName );
            nameToSynpredASTMap.Add(new KeyValuePair<string, GrammarAST>(predName, blockAST));
            return predName;
        }
Grammar