Examples of IConstructor


Examples of org.eclipse.imp.pdb.facts.IConstructor

      super(values);
    }
   
    @Override
    public INode node(String name, IValue... children) {
      IConstructor res = specializeType(name, children);
     
      return res != null ? res: values.node(name, children);
    }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor

    }
   
    @Override
    public INode node(String name, Map<String, IValue> annotations,
        IValue... children) throws FactTypeUseException {
      IConstructor res = specializeType(name, children);
     
      return res != null ? res: values.node(name, annotations, children);
    }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor

    }
   
    @Override
    public INode node(String name, IValue[] children,
        Map<String, IValue> keyArgValues) throws FactTypeUseException {
      IConstructor res = specializeType(name, children);
     
      return res != null ? res: values.node(name, children, keyArgValues);
    }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor

    StringBuilder b = new StringBuilder();
   
    if (symbols.length() > 0) {
      b.append(toString((IConstructor) symbols.get(0), false));
      for (int i = 1; i < symbols.length(); i++) {
        IConstructor sym = (IConstructor) symbols.get(i);
        if (!withLayout && isLayouts(sym)) {
          continue;
        }
        b.append(sep);
        b.append(toString(sym, withLayout));
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor

  private void initListPatternDelegate(List<IMatchingResult> list) {
    Type type = getType(null, null);
   
    if (type instanceof NonTerminalType) {
      IConstructor rhs = ((NonTerminalType) type).getSymbol();

       if (SymbolAdapter.isIterPlus(rhs) || SymbolAdapter.isIterStar(rhs)) {
        pat = new ListPattern(ctx, callOrTree, list, 1);
      }
      else if (SymbolAdapter.isIterPlusSeps(rhs) || SymbolAdapter.isIterStarSeps(rhs)) {
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor

    super.initMatch(subject);
    if (!subject.getType().isSubtypeOf(Factory.Tree)) {
      hasNext = false;
      return;
    }
    IConstructor tree = (IConstructor) subject.getValue();
   
    if (tree.getConstructorType() != Factory.Tree_Appl) {
      hasNext = false;
      return;
    }
    pat.initMatch(ResultFactory.makeResult(Factory.Args, TreeAdapter.getArgs(tree), ctx));
    hasNext = true;
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor

    return type.isList()|| isConcreteListType(type);
  }

  public static boolean isConcreteListType(Type type){
    if (type instanceof NonTerminalType) {
      IConstructor sym = ((NonTerminalType)type).getSymbol();
      return SymbolAdapter.isAnyList(sym);
    }
    return false;
  }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor

    content.append(e.getLocation());
    content.append(':');
    content.append(' ');
    content.append(e.getMessage());
    content.append('\t');
    IConstructor tree = e.getTree();
    if (tree != null) {
      content.append("diagnose using: ");
      content.append(getValueString(e.getTree()));
    }
    content.append('\n');
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor

    return new StandardTextReader().read(ValueFactoryFactory.getValueFactory(), Factory.uptr, Factory.Tree, new StringReader(expectedInput));
  }

  public static void main(String[] args){
    CharRange cr = new CharRange();
    IConstructor result = cr.executeParser();
    System.out.println(result);
   
    System.out.println("S([a-z](a)) <- good");
  }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.IConstructor

    return new StandardTextReader().read(ValueFactoryFactory.getValueFactory(), Factory.uptr, Factory.Tree, new StringReader(expectedInput));
  }

  public static void main(String[] args){
    UselessSelfLoop usl = new UselessSelfLoop();
    IConstructor result = usl.executeParser();
    System.out.println(result);
   
    System.out.println("[S([A([B(cycle(A,2)),B(a)]),A(a)]),S([B([A(cycle(B,2)),A(a)]),B(a)])] <- good");
  }
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.