//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ // PLEASE DO NOT EDIT WITHOUT THE EXPLICIT CONSENT OF THE AUTHOR! \\ //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ using Ilog.Language.Util; namespace Ilog.Language.Parsing { /** * This class is a representation of a grammar symbol at parse time, * whether terminal or nonterminal. * * @see Terminal * @see NonTerminal * * @version Last modified on Wed May 25 15:49:36 2005 by hak * @author Hassan Aït-Kaci * @copyright © 2000 ILOG, S.A. */ public class Symbol : ArrayIndexed, Named { /** * Constructs a parser symbol with the specified name indexed * in the specified array. */ internal Symbol (string name, Symbol[] symbols) : base(symbols) { this.name = string.Intern(name); } /** * Constructs a parser symbol with the specified name indexed * in the specified array at the specified index. */ internal Symbol (string name, Symbol[] symbols, int index) : base(symbols,index) { this.name = string.Intern(name); } /** * The name of the parser symbol. */ protected string name; public string Name { get { return name; } } /** * Returns a string representation for this parser symbol. */ public override string ToString () { return name; } } }