protected BeardTemplateReferences extract(String tpl) {
        BeardTemplateReferences result = new BeardTemplateReferences () ;


        int len = tpl.length(), i;
        String tag = null;
        char character;

        for (i = 0; i < len; i++) {
            character = tpl.charAt(i);
            if (tag != null) {
                if (character == '%' && tpl.charAt(i + 1) == '>') {
                    this.extractTag(tag, result);
                    tag = null;
                    i++;
                    continue;
                }

                tag += character;

            } else {

                if (character == '<' && tpl.charAt(i + 1) == '%') {
                    tag = "";
                    i++;
                    continue;
                }
            }
        }


        result.refreshSuffixedVariables () ;


        return result;
    }