Package abstrasy.interpreter

Examples of abstrasy.interpreter.InterpreterException


        return replaceCSeq(replaceCSeq(replaceCSeq(s, "&", "&amp;"), "<", "&lt;"), ">", "&gt;");
    }

    public final static int computeAbsoluteIndex(int maxlen, int index, int seglen) throws InterpreterException {
        if(seglen<=0)
            throw new InterpreterException(StdErrors.extend(StdErrors.Out_of_range, "length:" + seglen+" <= 0"));
        if (index < 0) {
            if ((maxlen + index) < 0)
                throw new InterpreterException(StdErrors.extend(StdErrors.Out_of_range, "index:" + index+"["+(maxlen+index)+"]"));
            if ((maxlen + index + seglen) > maxlen)
                throw new InterpreterException(StdErrors.extend(StdErrors.Out_of_range, "index:" + index+"["+(maxlen+index)+"]" + " + length:" +seglen+" > " +maxlen ));
            return maxlen + index;
        }
        else if (index+seglen > maxlen)
            throw new InterpreterException(StdErrors.extend(StdErrors.Out_of_range, "index:" + index + " + length:" +seglen+" > " +maxlen));
        return index;
    }
View Full Code Here


        return Node.equalsNodes(bodyPx,pattern.bodyPx);
    }
   
    public void requirePrimaryType(Node node) throws InterpreterException {
            if (node==null)
                throw new InterpreterException(StdErrors.extend(StdErrors.Object_required, "void pattern"));
            node.requireNodeType(primaryType);
    }
View Full Code Here

     * @return old
     * @throws InterpreterException
     */
    public static final Node swap(Node node) throws InterpreterException {
        if (node == null)
            throw new InterpreterException(StdErrors.Internal_error);
        Interpreter interpreter = Interpreter.mySelf();
        Node pred = interpreter.getIface();
        interpreter.setIface(node);
        return pred;
    }
View Full Code Here

    public static final Node get() throws InterpreterException {
        Node res = Interpreter.mySelf().getIface();
        if (res != null)
            return res.requireReadLockAccess();
        else
            throw new InterpreterException(StdErrors.Symbol_not_defined);
    }
View Full Code Here

            //System.out.println(value);
        }
        catch (Exception e) {
            if(Interpreter.isDebugMode())
                e.printStackTrace();
            throw new InterpreterException(StdErrors.createTrace(node, e));
        }
        hash=value.hashCode();
    }
View Full Code Here

            interpreter.compile();
        }
        catch (Exception e) {
            if(Interpreter.isDebugMode())
                e.printStackTrace();
            throw new InterpreterException(StdErrors.createTrace(interpreter, e));
        }
        return interpreter.getNode();
        /*switch(type){
            case Node.TYPE_NUMBER:
                return new Node(((Double)value).doubleValue()).letQuoted((qtype & Node.VTYPE_QTYPES)!=0);
View Full Code Here

        secretKey = new SecretKeySpec(keyData, "Blowfish");
    }

    public void setKeySize(int keySize) throws InterpreterException {
        if (keySize > 448 && keySize < 32)
            throw new InterpreterException(StdErrors.extend(StdErrors.Out_of_range, "key size(" + keySize + ") not in [32..448]"));
        this.keySize = keySize;
        this.secretKey = null;
    }
View Full Code Here

        return Node.createExternal(efile);   
    }
   
    public Node external_mutator_exec(Node startAt) throws Exception {
        if (inUse)
            throw new InterpreterException(StdErrors.extend(StdErrors.Already_used, "ShellProcess is already runing"));
       
        startAt.isGoodArgsLength(true, 2);
        SELF.require_SELF_mutable();
        command = startAt.getSubNode(1, Node.TYPE_STRING).getString();
        inUse=true;
View Full Code Here

        return null;
    }

    public Node external_get_command(Node startAt) throws Exception {
        if (!inUse) {
            throw new InterpreterException(StdErrors.extend(StdErrors.Already_used, "ShellProcess is not runing"));
        }
        startAt.isGoodArgsLength(true, 1);
        return new Node(command);
    }
View Full Code Here

        return new Node(command);
    }

    public Node external_get_stdout(Node startAt) throws Exception {
        if (!inUse) {
            throw new InterpreterException(StdErrors.extend(StdErrors.Already_used, "ShellProcess is not runing"));
        }
        startAt.isGoodArgsLength(true, 1);
        return stdout;
    }
View Full Code Here

TOP

Related Classes of abstrasy.interpreter.InterpreterException

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.