//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ // PLEASE DO NOT EDIT WITHOUT THE EXPLICIT CONSENT OF THE AUTHOR! \\ //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ namespace Ilog.Language.Parsing { /** * This is the type of elements pushed on the dynamic parser's trail * stack for undoing reductions and semantic actions effects when * backtracking over dynamic operators tokens. It consists of a pair * , where the handle is the sequence of parser stack * elements corresponding to the RHS of the rule, which was popped off * the parser stack upon reduction using the rule. * * @see DynamicParser * * @version Last modified on Sun May 29 09:26:28 2005 by hak * @author Hassan Aït-Kaci * @copyright © 2000 ILOG, S.A. */ internal class TrailEntry : Util.TimeStamped { /** * Constructs a trail entry with the specified handle and rule. */ internal TrailEntry (StackElement[] handle, Rule rule) { this.handle = handle; this.rule = rule; } /** * This is the sequence of parser stack elements popped by the * reduction using this entry's rule. */ private StackElement[] handle; internal StackElement[] Handle { get { return handle; } } /** * The reduction rule. */ private Rule rule; internal Rule @Rule { get { return rule; } set { rule = value; } } /** * The time stamp of this entry. It corresponds to that of the * choice point that is in effect at this entry's creation. */ private long stamp; public long TimeStamp { get { return stamp; } set { stamp = value; } } /** * Returns a string description for this trail entry. */ public override string ToString () { string s = "(stamp:"+stamp+") " + rule.ToString(); for (int i=0; i