private AST parseSubExpr(AST left, byte minPriority) throws ParserException {
        AST current = left;
        if(left==null){
            Token tok = getUnaryOp(lookForward());
            if(tok!=null){
                nextToken();
                AST rightExpr = parseSubExpr(parseSimpleExpr(), UNARY_PRIORITY);
                current = new UnaryOpAST(tok.getVal(), rightExpr);
            }
        }
        while (true) {
            Token tok = getBinOP(lookForward());
            if (tok != null && priorities.get(tok.getVal()).getA() > minPriority) {
                nextToken();
            } else {
                break;
            }
            AST right = parseSubExpr(parseSimpleExpr(), priorities.get(tok.getVal()).getB());
            current = new BinOP(tok.getVal(), current, right);
        }
        return current;
    }