Package org.rascalmpl.interpreter

Examples of org.rascalmpl.interpreter.TypeReifier


  private TypeReifier tr;

  public IOCompiled(IValueFactory values) {
    super(values);
    this.values = values;
    this.tr = new TypeReifier(values);
  }
View Full Code Here


    this.vf = vf;
   
  }
 
  public IValue typeOf(IValue v, IEvaluatorContext ctx) {
    return ((IConstructor) new TypeReifier(vf).typeToValue(v.getType(), ctx).getValue()).get("symbol");
  }
View Full Code Here

    return vf.bool(x.isEqual(y));
  }
 
  public IValue make(IValue type, IString name, IList args) {
    TypeStore store = new TypeStore();
    org.eclipse.imp.pdb.facts.type.Type t = new TypeReifier(vf).valueToType((IConstructor) type, store);
   
    IValue[] children = new IValue[args.length()];
    org.eclipse.imp.pdb.facts.type.Type[] argsTypes = new org.eclipse.imp.pdb.facts.type.Type[args.length()];

    for (int i = 0; i < args.length(); i++) {
View Full Code Here

    this.values = values;
  }
 
  public IValue readTextATermFile(IValue type, ISourceLocation loc, IEvaluatorContext ctx){
    TypeStore store = new TypeStore();
    Type start = new TypeReifier(ctx.getValueFactory()).valueToType((IConstructor) type, store);
   
    InputStream in = null;
    try{
      in = ctx.getResolverRegistry().getInputStream(loc.getURI());
      return new ATermReader().read(values, store, start, in);
View Full Code Here

 
  public RSFIO(IValueFactory values){
    super();
   
    this.values = values;
    this.tr = new TypeReifier(values);
  }
View Full Code Here

    IMapWriter mr = values.mapWriter();
   
    for (Map.Entry<java.lang.String, Type> entry : table.entrySet()) {
      Type t = entry.getValue();
      mr.put(values.string(entry.getKey()),
             ((IConstructor) new TypeReifier(values).typeToValue(types.relType(t.getFieldType(0), t.getFieldType(1)), ctx).getValue()))
    }
    return mr.done();
  }
View Full Code Here

 
  public IO(IValueFactory values){
    super();
   
    this.values = values;
    this.tr = new TypeReifier(values);
    separator = ',';
    header = true;
    this.pdbReader = new StandardTextReader();
  }
View Full Code Here

  }


  private IValue computeType(ISourceLocation loc, IBool header, IString separator, IString encoding, IEvaluatorContext ctx) {
    IValue csvResult = this.read(null, loc, header, separator, encoding, values.bool(true), ctx);
    return ((IConstructor) new TypeReifier(values).typeToValue(csvResult.getType(), ctx).getValue());
  }
View Full Code Here

TOP

Related Classes of org.rascalmpl.interpreter.TypeReifier

Copyright © 2018 www.massapicom. 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.