Package org.eclipse.imp.pdb.facts

Examples of org.eclipse.imp.pdb.facts.IListWriter.done()


        }
        e = a.toString();
      }
      r.append(values.string(e));
    }
    return r.done();
  }

  public IValue getFileContent(IString g) {
    java.lang.String s = File.separator
        + this.getClass().getCanonicalName().replaceAll("\\.",
View Full Code Here


    for (Object e: l) {
      stack.push(e);
      w.append(read(elementType(type)));
      stack.pop();
    }
    return w.done();
  }

  @SuppressWarnings("deprecation")
  @Override
  public IValue visitMap(Type type) throws IOException {
View Full Code Here

        for (IValue e : o) {
          elements.add(e.accept(this));
        }
        IListWriter writer = vf.listWriter(calcLub(elements));
        writer.appendAll(elements);
        return writer.done();
      }

      @Override
      public IValue visitRelation(ISet o) throws RuntimeException {
        List<IValue> elements = new ArrayList<IValue>(o.size());
View Full Code Here

        for (IValue e : o) {
          elements.add(e.accept(this));
        }
        ISetWriter writer = vf.relationWriter(calcLub(elements));
        writer.insertAll(elements);
        return writer.done();
      }

      @Override
      public IValue visitListRelation(IList o) throws RuntimeException {
        List<IValue> elements = new ArrayList<IValue>(o.length());
View Full Code Here

        for (IValue e : o) {
          elements.add(e.accept(this));
        }
        IListWriter writer = vf.listRelationWriter(calcLub(elements));
        writer.appendAll(elements);
        return writer.done();
      }

      @Override
      public IValue visitSet(ISet o) throws RuntimeException {
        List<IValue> elements = new ArrayList<IValue>(o.size());
View Full Code Here

            for (Type f : type.getFieldTypes()) {
              w.append(f.accept(this));
            }
          }
       
          return vf.constructor(Factory.Symbol_ListRel, w.done());
        }
        return vf.constructor(Factory.Symbol_List, type.getElementType().accept(this));
      }

      @Override
View Full Code Here

        for (IValue e : o) {
          elements.add(e.accept(this));
        }
        ISetWriter writer = vf.setWriter(calcLub(elements));
        writer.insertAll(elements);
        return writer.done();
      }
      @Override
      public IValue visitTuple(ITuple o) throws RuntimeException {
        IValue[] elements = new IValue[o.arity()];
        Type[] types = new Type[o.arity()];
View Full Code Here

          newEntries.put(ent.getKey().accept(this), ent.getValue().accept(this));
        }

        IMapWriter writer = vf.mapWriter(calcLub(newEntries.keySet()), calcLub(newEntries.values()));
        writer.putAll(newEntries);
        return writer.done();
      }

      @Override
      public IValue visitConstructor(IConstructor o)
          throws RuntimeException {
View Full Code Here

          for (Type t : params) {
            w.append(t.accept(this));
          }
        }
       
        return vf.constructor(Factory.Symbol_Alias, vf.string(type.getName()), w.done(), type.getAliased().accept(this));
      }

      @Override
      public IValue visitSet(Type type) {
        if(type.isRelation()) {
View Full Code Here

            for (Type f : type.getFieldTypes()) {
              w.append(f.accept(this));
            }
          }
       
          return vf.constructor(Factory.Symbol_Rel, w.done());
        }
        return vf.constructor(Factory.Symbol_Set, type.getElementType().accept(this));
      }

      @Override
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.