// FILE. . . . . /home/hak/hlt/src/hlt/osfv3/base/OsfExpression.java
// EDIT BY . . . Hassan Ait-Kaci
// ON MACHINE. . Hak-Laptop
// STARTED ON. . Mon Sep 02 09:15:53 2013

/**
 * @version     Last modified on Wed May 01 06:22:26 2019 by hak
 * @author      <a href="mailto:hak@acm.org">Hassan A&iuml;t-Kaci</a>
 * @copyright   &copy; <a href="http://www.hassan-ait-kaci.net/">by the author</a>
 */

package hlt.osf.base;

import hlt.osf.exec.Context;
import hlt.osf.exec.Contextable;

/**
 * This is the mother class of all OSF expressions to be interpreted in
 * a given context of a sort ordering. It is instantiated by specific
 * classes corresponding to specific expressions.
 */
abstract public class OsfExpression implements Contextable
  {
    /**
     * This is evaluation context of the expression.
     */
    protected Context _context;

    /**
     * Return this expression evaluation context.
     */
    public Context context ()
    {
      return _context;
    }
 
    /**
     * Sets this expression evaluation context to the one specified.
     */
    public OsfExpression setContext (Context context)
    {
      _context = context;
      return this;
    }
    
    /**
     * Returns the string form of this OSF expression according the
     * display manager of its context.
     */
    public abstract String displayForm ();

  }
