Package org.rascalmpl.interpreter.asserts

Examples of org.rascalmpl.interpreter.asserts.ImplementationError


      return makeRangeWithDefaultStep(from, getValueFactory().real(1.0));
    }
    if (getType().lub(from.getType()).isNumber()) {
      return makeRangeWithDefaultStep(from, getValueFactory().integer(1));
    }
    throw new ImplementationError("Unknown number type in makeRangeFromNumber");
  }
View Full Code Here


    else if (compare == 0) {
      return new LessThanOrEqualResult(false, true, ctx);
    }

    if (!right.hasOffsetLength()) {
      throw new ImplementationError("assertion failed");
    }

    return new LessThanOrEqualResult(false, false, ctx);
  }
View Full Code Here

      else
        return 1;
    }
   
    if (!right.hasOffsetLength()) {
      throw new ImplementationError("assertion failed");
    }
   
    return -1;
  }
View Full Code Here

  public static IConstructor getStart(IConstructor tree) {
    if (isStartSort(tree)) {
      tree = delabel(tree);
      return (IConstructor) tree.get("start");
    }
    throw new ImplementationError("Symbol does not have a child named start: " + tree);
  }
View Full Code Here

    tree = delabel(tree);
    if (isOpt(tree) || isIterPlus(tree) || isIterStar(tree|| isIterPlusSeps(tree) || isIterStarSeps(tree) || isMeta(tree) || isConditional(tree)) {
      return ((IConstructor) tree.get("symbol"));
    }
   
    throw new ImplementationError("Symbol does not have a child named symbol: " + tree);
  }
View Full Code Here

  public static String getLabel(IConstructor tree) {
    if (isLabel(tree)) {
      return ((IString) tree.get("name")).getValue();
    }
   
    throw new ImplementationError("Symbol does not have a child named \"label\" : " + tree);
  }
View Full Code Here

      }
      else if (SymbolAdapter.isIterPlusSeps(rhs) || SymbolAdapter.isIterStarSeps(rhs)) {
        pat = new ListPattern(ctx, callOrTree, list, SymbolAdapter.getSeparators(rhs).length() + 1);
      }
      else {
        throw new ImplementationError("crooked production: non (cf or lex) list symbol: " + rhs);
      }
      return;
    }
    throw new ImplementationError("should not get here if we don't know that its a proper list");
  }
View Full Code Here

    this.instanceCache = new HashMap<Class<?>, Object>();
    this.fileManagerCache = new ConcurrentHashMap<Class<?>, JavaFileManager>();
    this.config = config;
   
    if (ToolProvider.getSystemJavaCompiler() == null) {
      throw new ImplementationError("Could not find an installed System Java Compiler, please provide a Java Runtime that includes the Java Development Tools (JDK 1.6 or higher).");
    }
  }
View Full Code Here

      Constructor<?> constructor = clazz.getConstructor(IValueFactory.class);
      instance = constructor.newInstance(vf);
      instanceCache.put(clazz, instance);
      return instance;
    } catch (IllegalArgumentException e) {
      throw new ImplementationError(e.getMessage(), e);
    } catch (InstantiationException e) {
      throw new ImplementationError(e.getMessage(), e);
    } catch (IllegalAccessException e) {
      throw new ImplementationError(e.getMessage(), e);
    } catch (InvocationTargetException e) {
      throw new ImplementationError(e.getMessage(), e);
    } catch (SecurityException e) {
      throw new ImplementationError(e.getMessage(), e);
    } catch (NoSuchMethodException e) {
      throw new ImplementationError(e.getMessage(), e);
    }
  }
View Full Code Here

   
    try {
      return findMatch();
    }
    catch (ArrayIndexOutOfBoundsException e) {
      throw new ImplementationError("Unexpected error in mapping to Java regex:" + interpolate(ctx), ctx.getCurrentAST().getLocation());
    }
  }
View Full Code Here

TOP

Related Classes of org.rascalmpl.interpreter.asserts.ImplementationError

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.