SymbolSortExpression.java

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



Copyright:  © by the author
Author:  Hassan Aït-Kaci
Version:  Last modified on Thu Mar 10 19:51:25 2016 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 Mon Sep 09 09:18:00 PDT 2019 from file SymbolSortExpression.java
by the hlt.language.tools.Hilite Java tool written by Hassan Aït-Kaci