// Path: src/org/kefirsf/bb/TextProcessorAdapter.java
// public abstract class TextProcessorAdapter implements TextProcessor {
//     /**
//      * Process the text
//      *
//      * @param source the sourcetext
//      * @return the result of text processing
//      */
//     public String process(String source) {
//         CharSequence result = process((CharSequence) source);
//         if (result instanceof String) {
//             return (String) result;
//         } else {
//             return result.toString();
//         }
//     }
// 
//     /**
//      * Process the text
//      *
//      * @param source the sourcetext
//      * @return the result of text processing
//      */
//     public StringBuilder process(StringBuilder source) {
//         CharSequence result = process((CharSequence) source);
//         if (result instanceof StringBuilder) {
//             return (StringBuilder) result;
//         } else {
//             return new StringBuilder(result);
//         }
//     }
// 
//     /**
//      * Process the text
//      *
//      * @param source the sourcetext
//      * @return the result of text processing
//      */
//     public StringBuffer process(StringBuffer source) {
//         CharSequence result = process((CharSequence) source);
//         if (result instanceof StringBuffer) {
//             return (StringBuffer) result;
//         } else {
//             return new StringBuffer(result);
//         }
//     }
// }
// 
// Path: src/org/kefirsf/bb/TextProcessorNestingException.java
// public class TextProcessorNestingException extends TextProcessorException {
//     public static final String MESSAGE_PATTERN = "Nesting is too big. Nesting limit is {0}.";
// 
//     public TextProcessorNestingException(int limit) {
//         super(MessageFormat.format(MESSAGE_PATTERN, limit));
//     }
// }


import org.kefirsf.bb.TextProcessorAdapter;
import org.kefirsf.bb.TextProcessorNestingException;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
            if(propagateNestingException){
                throw new TextProcessorNestingException(nestingLimit);
            }
        }

        return target;
    }

    /**
     * Set the root scope of text processor.
     *
     * @param scope root code scope
     * @throws IllegalStateException if scope already setted
     */
    public void setScope(ProcScope scope) throws IllegalStateException {
        if (this.scope == null) {
            this.scope = scope;
        } else {
            throw new IllegalStateException("Can't change the root scope.");
        }
    }

    /**
     * Set the prefix for text processor
     *
     * @param prefix template wich uses to create prefix
     * @throws IllegalStateException If prefix already setted
     */
    public void setPrefix(ProcTemplate prefix) throws IllegalStateException {
        if (this.prefix == null) {
// Path: src/org/kefirsf/bb/TextProcessorAdapter.java
// public abstract class TextProcessorAdapter implements TextProcessor {
//     /**
//      * Process the text
//      *
//      * @param source the sourcetext
//      * @return the result of text processing
//      */
//     public String process(String source) {
//         CharSequence result = process((CharSequence) source);
//         if (result instanceof String) {
//             return (String) result;
//         } else {
//             return result.toString();
//         }
//     }
// 
//     /**
//      * Process the text
//      *
//      * @param source the sourcetext
//      * @return the result of text processing
//      */
//     public StringBuilder process(StringBuilder source) {
//         CharSequence result = process((CharSequence) source);
//         if (result instanceof StringBuilder) {
//             return (StringBuilder) result;
//         } else {
//             return new StringBuilder(result);
//         }
//     }
// 
//     /**
//      * Process the text
//      *
//      * @param source the sourcetext
//      * @return the result of text processing
//      */
//     public StringBuffer process(StringBuffer source) {
//         CharSequence result = process((CharSequence) source);
//         if (result instanceof StringBuffer) {
//             return (StringBuffer) result;
//         } else {
//             return new StringBuffer(result);
//         }
//     }
// }
// 
// Path: src/org/kefirsf/bb/TextProcessorNestingException.java
// public class TextProcessorNestingException extends TextProcessorException {
//     public static final String MESSAGE_PATTERN = "Nesting is too big. Nesting limit is {0}.";
// 
//     public TextProcessorNestingException(int limit) {
//         super(MessageFormat.format(MESSAGE_PATTERN, limit));
//     }
// }


// Path: src/org/kefirsf/bb/proc/BBProcessor.java
import org.kefirsf.bb.TextProcessorAdapter;
import org.kefirsf.bb.TextProcessorNestingException;
import java.util.Collections;
import java.util.Map;
import java.util.Set;

            if(propagateNestingException){
                throw new TextProcessorNestingException(nestingLimit);
            }
        }

        return target;
    }

    /**
     * Set the root scope of text processor.
     *
     * @param scope root code scope
     * @throws IllegalStateException if scope already setted
     */
    public void setScope(ProcScope scope) throws IllegalStateException {
        if (this.scope == null) {
            this.scope = scope;
        } else {
            throw new IllegalStateException("Can't change the root scope.");
        }
    }

    /**
     * Set the prefix for text processor
     *
     * @param prefix template wich uses to create prefix
     * @throws IllegalStateException If prefix already setted
     */
    public void setPrefix(ProcTemplate prefix) throws IllegalStateException {
        if (this.prefix == null) {
            this.prefix = prefix;