FullQuery parseFulQuery() throws QueryException {
        if (index == lexems.length) {
            return null;
        }
        ArrayList<SubQuery> list = new ArrayList<>();
        list.add(readSubQuery());
        boolean and = false;
        boolean or = false;
        while (index < lexems.length) {
            String op = lexems[index];
            if (op.equalsIgnoreCase("and")) {
                and = true;
            } else if (op.equalsIgnoreCase("or")) {
                or = true;
            } else {
                throw new QueryException("'and'/'or' expected, but '" + op + "' found");
            }
            ++index;
            if (and && or) {
                throw new QueryException("'and' & 'or' operations are not supported together");
            }
            list.add(readSubQuery());
        }
        return new FullQuery(list, and);
    }