//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
// PLEASE DO NOT EDIT WITHOUT THE EXPLICIT CONSENT OF THE AUTHOR! \\
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
namespace Ilog.Language.Parsing
{
/**
* This implements the type of objects pushed on the parser's stack.
* It is simply a pair consisting of a state and a token node. For
* dynamic parsing, a time stamp is also provided.
*
* @version Last modified on Sun May 29 09:27:45 2005 by hak
* @author Hassan Aït-Kaci
* @copyright © 2000 ILOG, S.A.
*/
public class StackElement : Util.TimeStamped
{
/**
* Constructs a parser stack element with the specified parser
* state and parse node.
*/
public StackElement (State state, ParseNode node)
{
this.state = state;
this.node = node;
}
/**
* This stack element's state.
*/
private State state;
internal State @State
{
get { return state; }
set { state = value; }
}
/**
* This stack element's parse node.
*/
private ParseNode node;
internal ParseNode Node
{
get { return node; }
set { node = value; }
}
/**
* This stack element's time stamp.
*/
private long stamp;
public long TimeStamp
{
get { return stamp; }
set { stamp = value; }
}
/**
* Returns a string description of this parse stack element.
*/
public override string ToString ()
{
return "stamp: " + stamp + ", " +
"state: " + state + ", " +
"node: " + node;
}
}
}