/**
 * Simple identifiers for a tokenizer.
 *
 * @author Samuel A. Rebelsky
 * @version 0.1 of July 2002
 */
public class PascalIdentifier
  extends NamedToken
{
  // +--------------+-------------------------------------------------------
  // | Constructors |
  // +--------------+

  public PascalIdentifier(String idval) {
    super(idval,PascalTokens.PIDENTIFIER);
  } // PascalIdentifier(String)


  // +-----------+----------------------------------------------------------
  // | Observers |
  // +-----------+

  /**
   * Convert the token to a string (e.g., for printing).
   */
  public String toString() {
    return "ID[" + super.toString() + "]";
  } // toString

  /**
   * Determine if this identifier equals another identifier.
   */
  public boolean equals(PascalIdentifier other) {
    return this == other || this.name.equals(other.name);
  } // equals(Identifier)

} // class PascalIdentifier

