SymbolSortExpression.java

// FILE. . . . . /home/hak/hlt/src/hlt/osfv1/base/SymbolSortExpression.java
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . Hak-Laptop
// STARTED ON. . Mon Sep 02 09:16:49 2013



Author:  Hassan Aït-Kaci
Copyright:  © by the author
Version:  Last modified on Sun Sep 15 12:21:58 2013 by hak



package hlt.osf.base;

import hlt.osf.exec.Context;



This is the class of atomic OSF expressions consisting of one sort symbol name (a String).


public class SymbolSortExpression extends SortExpression
  {
    

Constructs a symbol sort expression with the given name.


    public SymbolSortExpression (String name)
    {
      _name = name.intern();
    }

    

Constructs a symbol sort expression with the given name and sets its execution context to the given context.


    public SymbolSortExpression (String name, Context context)
    {
      this(name);
      _context = context;
    }

    /* ************************************************************************ */

    private String _name;

    public String name ()
    {
      return _name;
    }

    public Sort sort ()
    {
      return _context.getSort(_name);
    }

    public byte type ()
    {
      return _context.SYM();
    }

    public String displayForm ()
    {
      return _name;
    }

    public boolean equals (Object other)
    {
      if (!(other instanceof SymbolSortExpression))
	return false;

      return _name == ((SymbolSortExpression)other).name();
    }
  }


This file was generated on Thu Oct 03 16:37:26 CEST 2013 from file SymbolSortExpression.java
by the hlt.language.tools.Hilite Java tool written by Hassan Aït-Kaci