本文整理汇总了C#中IParseTreeListener类的典型用法代码示例。如果您正苦于以下问题:C# IParseTreeListener类的具体用法?C# IParseTreeListener怎么用?C# IParseTreeListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IParseTreeListener类属于命名空间,在下文中一共展示了IParseTreeListener类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExitRule
protected internal virtual void ExitRule(IParseTreeListener listener, IRuleNode r
)
{
ParserRuleContext ctx = (ParserRuleContext)r.RuleContext;
ctx.ExitRule(listener);
listener.ExitEveryRule(ctx);
}
示例2: Walk
public virtual void Walk(IParseTreeListener listener, IParseTree t)
{
if (t is IErrorNode)
{
listener.VisitErrorNode((IErrorNode)t);
return;
}
else
{
if (t is ITerminalNode)
{
listener.VisitTerminal((ITerminalNode)t);
return;
}
}
IRuleNode r = (IRuleNode)t;
EnterRule(listener, r);
int n = r.ChildCount;
for (int i = 0; i < n; i++)
{
Walk(listener, r.GetChild(i));
}
ExitRule(listener, r);
}
示例3: ExitRule
public override void ExitRule(IParseTreeListener listener) {
IBinShredListener typedListener = listener as IBinShredListener;
if (typedListener != null) typedListener.ExitLookupTableEntryKey(this);
}
示例4: EnterRule
public override void EnterRule(IParseTreeListener listener) {
IBinShredListener typedListener = listener as IBinShredListener;
if (typedListener != null) typedListener.EnterSizeReference(this);
}
示例5: ExitRule
public override void ExitRule(IParseTreeListener listener) {
IVBGrammarListener typedListener = listener as IVBGrammarListener;
if (typedListener != null) typedListener.ExitVsMid(this);
}
示例6: EnterRule
public override void EnterRule(IParseTreeListener listener) {
IVBGrammarListener typedListener = listener as IVBGrammarListener;
if (typedListener != null) typedListener.EnterAmbiguousIdentifier(this);
}