Examples of comparable()


Examples of org.eclipse.imp.pdb.facts.type.Type.comparable()

              if (!varType.comparable(listSubjectType)) {    
                hasNext = false;
                return;
              }
            } else {
              if(!(varType instanceof NonTerminalType) && !(varType.comparable(staticListSubjectElementType))) {
                hasNext = false;
                return;
              }
            }
          }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.comparable()

            Type varType = varRes.getType();
            if (isAnyListType(varType)){ 
              /*
               * A variable declared in the current scope.
               */
              if(varType.comparable(listSubjectType)){    
                isListVar[i] = true;
                isBindingVar[i] = varRes.getValue() == null;
                nListVar++;                
              } else {
                hasNext = false;
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.comparable()

            } else {
              if(varType instanceof NonTerminalType){
                // suppress comparable test for Nonterminal types
                // TODO: this should be done better
              } else
                if(!varType.comparable(staticListSubjectElementType)){
                  hasNext = false;
                  return;
                }
            }
          }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.comparable()

        }
        Type childType = child.getType(env, null);

        // TODO: pattern matching should be specialized such that matching appl(prod...)'s does not
        // need to use list matching on the fixed arity children of the application of a production
        if(!(childType instanceof NonTerminalType) && !childType.comparable(staticListSubjectElementType)){
          hasNext = false;
          return;
        }
        java.util.List<IVarPattern> childVars = child.getVariables();
        if(!childVars.isEmpty()){
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.comparable()

      Type resFieldType[] = new Type[relArity - nSubs];
      for (int i = 0; i < relArity; i++) {
        Type relFieldType = getType().getFieldType(i);
        if (i < nSubs) {
          if (subscriptType[i].isSet() &&
              relFieldType.comparable(subscriptType[i].getElementType())){
            subscriptIsSet[i] = true;
          }
          else if (subscripts[i] == null || relFieldType.comparable(subscriptType[i])){
            subscriptIsSet[i] = false;
          }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.comparable()

        if (i < nSubs) {
          if (subscriptType[i].isSet() &&
              relFieldType.comparable(subscriptType[i].getElementType())){
            subscriptIsSet[i] = true;
          }
          else if (subscripts[i] == null || relFieldType.comparable(subscriptType[i])){
            subscriptIsSet[i] = false;
          }
          else {
            throw new UnexpectedType(relFieldType, subscriptType[i], ctx.getCurrentAST());
          }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.comparable()

      Type resFieldType[] = new Type[relArity - nSubs];
      for (int i = 0; i < relArity; i++) {
        Type relFieldType = getType().getFieldType(i);
        if (i < nSubs) {
          if (subscriptType[i].isSet() &&
              relFieldType.comparable(subscriptType[i].getElementType())){
            subscriptIsSet[i] = true;
          }
          else if (subscripts[i] == null || relFieldType.comparable(subscriptType[i])){
            subscriptIsSet[i] = false;
          }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.comparable()

        if (i < nSubs) {
          if (subscriptType[i].isSet() &&
              relFieldType.comparable(subscriptType[i].getElementType())){
            subscriptIsSet[i] = true;
          }
          else if (subscripts[i] == null || relFieldType.comparable(subscriptType[i])){
            subscriptIsSet[i] = false;
          }
          else {
            throw new UnexpectedType(relFieldType, subscriptType[i], ctx.getCurrentAST());
          }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.comparable()

      if(shallow){
        Type lub = TypeFactory.getInstance().voidType();
        int nElems = subjectType.getArity();
        for(int i = 0; i < nElems; i++)
          lub = lub.lub(subjectType.getFieldType(i));
        if(!lub.comparable(patType))
          throw new UnexpectedType(patType, subjectType, ctx.getCurrentAST())
        return new TupleElementIterator((ITuple)subjectValue);
      }
      return new DescendantReader(subjectValue, false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.