/*
 * GlobalDefs.java
 *
 * Created on 27 de Junho de 2005, 17:36
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package net.sourceforge.czt.typecheck.circus.util;

import net.sourceforge.czt.z.ast.DeclName;
import net.sourceforge.czt.z.ast.RefName;

/**
 *
 * @author Manuela
 */
public class GlobalDefs
  extends net.sourceforge.czt.typecheck.z.util.GlobalDefs
{
  public static final KindOfProcess NORMAL = KindOfProcess.NORMAL;
  public static final KindOfProcess PARAM = KindOfProcess.PARAM;
  public static final KindOfProcess INDEX = KindOfProcess.INDEX;
  public static final KindOfProcess GEN = KindOfProcess.GEN;
  
  public static final boolean compareDeclName(DeclName dn1, DeclName dn2, boolean justNames) {
      boolean result = false;      
      if (justNames) {         
        if(dn1.getWord().equals(dn2.getWord())) {
          result = true;
        }
      }
      else {
        if(dn1.equals(dn2)) {
          result = true;
        }
      }
      return result;
  }
  
  public static final boolean compareRefName(RefName rn1, RefName rn2, boolean justNames) {
      boolean result = false;      
      if (justNames) {         
        if(rn1.getWord().equals(rn2.getWord())) {
          result = true;
        }
      }
      else {
        if(rn1.equals(rn2)) {
          result = true;
        }
      }
      return result;
  }
  
}
