本文整理汇总了C#中Antlr3.Tool.GrammarAST.SetTreeEnclosingRuleNameDeeply方法的典型用法代码示例。如果您正苦于以下问题:C# GrammarAST.SetTreeEnclosingRuleNameDeeply方法的具体用法?C# GrammarAST.SetTreeEnclosingRuleNameDeeply怎么用?C# GrammarAST.SetTreeEnclosingRuleNameDeeply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Antlr3.Tool.GrammarAST
的用法示例。
在下文中一共展示了GrammarAST.SetTreeEnclosingRuleNameDeeply方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DefineSyntacticPredicate
/** Define a new predicate and get back its name for use in building
* a semantic predicate reference to the syn pred.
*/
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;
}
示例2: DefineSyntacticPredicate
/** Define a new predicate and get back its name for use in building
* a semantic predicate reference to the syn pred.
*/
public virtual string DefineSyntacticPredicate( GrammarAST blockAST,
string currentRuleName )
{
if ( nameToSynpredASTMap == null )
{
nameToSynpredASTMap = new SortedList<string, GrammarAST>();
}
string predName =
SynpredRulePrefix + ( nameToSynpredASTMap.Count + 1 ) + "_" + name;
blockAST.SetTreeEnclosingRuleNameDeeply( predName );
nameToSynpredASTMap[predName] = blockAST;
return predName;
}