public virtual void TraceIn(string ruleName, int ruleIndex, object inputSymbol) { if (TraceDestination == null) { return; } TraceDestination.Write("enter " + ruleName + " " + inputSymbol); if (state.backtracking > 0) { TraceDestination.Write(" backtracking=" + state.backtracking); } TraceDestination.WriteLine(); }
public virtual void TraceOut(string ruleName, int ruleIndex, object inputSymbol) { if (TraceDestination == null) { return; } TraceDestination.Write("exit " + ruleName + " " + inputSymbol); if (state.backtracking > 0) { TraceDestination.Write(" backtracking=" + state.backtracking); if (state.failed) { TraceDestination.Write(" failed"); } else { TraceDestination.Write(" succeeded"); } } TraceDestination.WriteLine(); }