// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// static class CountClosureOperator extends QuantifiableOperator {
// 		
// 	public enum BoundsType {
// 		BOUNDED, UNBOUNDED, CONSTANT_REPETITION
// 	}
// 
// 	private final int low;
// 	public int getLow() {
// 		return low;
// 	}
// 		
// 	private final int high;
// 	public int getHigh() {
// 		return high;
// 	}
// 		
// 	private final BoundsType boundsType;
// 	public BoundsType getBoundsType() {
// 		return boundsType;
// 	}
// 		
// 	public CountClosureOperator(String operatorSequence, Quantifier quantifier, int low, int high) {
// 		super(operatorSequence, OperatorType.COUNT, quantifier);
// 		this.low = low;
// 		this.high = high;
// 			
// 		this.boundsType = BoundsType.BOUNDED;
// 	}
// 		
// 	public CountClosureOperator(String operatorSequence, Quantifier quantifier, int low, BoundsType boundsType) {
// 		super(operatorSequence, OperatorType.COUNT, quantifier);
// 		this.low = low;
// 			
// 		switch (boundsType) {
// 		case UNBOUNDED:
// 			high = Integer.MAX_VALUE;
// 			break;
// 		case CONSTANT_REPETITION:
// 			high = low;
// 			break;
// 		default:
// 			throw new IllegalArgumentException("Upper bounds needs to be specified.");
// 		}
// 		this.boundsType = boundsType;
// 	}
// 		
// }
// 
// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// static class RegexOperator implements RegexToken {
// 
// 	protected final String operatorSequence;
// 
// 	public String getOperator() {
// 		return operatorSequence;
// 	}
// 
// 	public RegexOperator(String operatorSequence, OperatorType operatorType) {
// 		this.operatorSequence = operatorSequence;
// 		this.operatorType = operatorType;
// 	}
// 
// 	public boolean getIsQuantifiable() {
// 		return false;
// 	}
// 
// 	public enum OperatorType {
// 		PLUS, STAR, QM, COUNT, OR
// 	}
// 
// 	private final OperatorType operatorType;
// 	public OperatorType getOperatorType() {
// 		return operatorType;
// 	}
// 		
// 	@Override
// 	public TokenType getTokenType() {
// 		return TokenType.REGEX_OPERATOR;
// 	}
// 		
// 	@Override
// 	public String toString() {
// 		return "O( " + operatorSequence + " )";
// 	}
// 
// 	@Override
// 	public String getRepresentation() {
// 		return operatorSequence;
// 	}
// 		
// 	@Override
// 	public boolean equals(Object o) {
// 		if (o == null) {
// 			return false;
// 		}
// 			
// 		if (o == this) {
// 			return true;
// 		}
// 			
// 		if (!(o instanceof RegexOperator)) {
// 			return false;
// 		}
// 			
// 		RegexOperator ro = (RegexOperator) o;
// 		return ro.operatorSequence.equals(operatorSequence);
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return operatorSequence.hashCode();
// 	}
// }
// 
// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// public enum OperatorType {
// 	PLUS, STAR, QM, COUNT, OR
// }
// 
// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// static interface RegexToken {
// 
// 	public enum TokenType {
// 		REGEX_FACTOR, REGEX_OPERATOR
// 	}
// 
// 	public TokenType getTokenType();
// 		
// 	public String getRepresentation();
// 
// }


import preprocessor.ParsingPreprocessor.CountClosureOperator;
import preprocessor.ParsingPreprocessor.RegexOperator;
import preprocessor.ParsingPreprocessor.RegexOperator.OperatorType;
import preprocessor.ParsingPreprocessor.RegexToken;
package preprocessor;


public class CountClosureOperatorExpansion extends OperatorExpansionRule {

	@Override
	protected void expandOperator(StringBuilder resultBuilder, RegexToken factor, RegexToken operator) {
		CountClosureOperator cco = (CountClosureOperator) operator;
		switch (cco.getBoundsType()) {
		case BOUNDED:
			expandBounded(resultBuilder, factor, cco);
			break;
// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// static class CountClosureOperator extends QuantifiableOperator {
// 		
// 	public enum BoundsType {
// 		BOUNDED, UNBOUNDED, CONSTANT_REPETITION
// 	}
// 
// 	private final int low;
// 	public int getLow() {
// 		return low;
// 	}
// 		
// 	private final int high;
// 	public int getHigh() {
// 		return high;
// 	}
// 		
// 	private final BoundsType boundsType;
// 	public BoundsType getBoundsType() {
// 		return boundsType;
// 	}
// 		
// 	public CountClosureOperator(String operatorSequence, Quantifier quantifier, int low, int high) {
// 		super(operatorSequence, OperatorType.COUNT, quantifier);
// 		this.low = low;
// 		this.high = high;
// 			
// 		this.boundsType = BoundsType.BOUNDED;
// 	}
// 		
// 	public CountClosureOperator(String operatorSequence, Quantifier quantifier, int low, BoundsType boundsType) {
// 		super(operatorSequence, OperatorType.COUNT, quantifier);
// 		this.low = low;
// 			
// 		switch (boundsType) {
// 		case UNBOUNDED:
// 			high = Integer.MAX_VALUE;
// 			break;
// 		case CONSTANT_REPETITION:
// 			high = low;
// 			break;
// 		default:
// 			throw new IllegalArgumentException("Upper bounds needs to be specified.");
// 		}
// 		this.boundsType = boundsType;
// 	}
// 		
// }
// 
// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// static class RegexOperator implements RegexToken {
// 
// 	protected final String operatorSequence;
// 
// 	public String getOperator() {
// 		return operatorSequence;
// 	}
// 
// 	public RegexOperator(String operatorSequence, OperatorType operatorType) {
// 		this.operatorSequence = operatorSequence;
// 		this.operatorType = operatorType;
// 	}
// 
// 	public boolean getIsQuantifiable() {
// 		return false;
// 	}
// 
// 	public enum OperatorType {
// 		PLUS, STAR, QM, COUNT, OR
// 	}
// 
// 	private final OperatorType operatorType;
// 	public OperatorType getOperatorType() {
// 		return operatorType;
// 	}
// 		
// 	@Override
// 	public TokenType getTokenType() {
// 		return TokenType.REGEX_OPERATOR;
// 	}
// 		
// 	@Override
// 	public String toString() {
// 		return "O( " + operatorSequence + " )";
// 	}
// 
// 	@Override
// 	public String getRepresentation() {
// 		return operatorSequence;
// 	}
// 		
// 	@Override
// 	public boolean equals(Object o) {
// 		if (o == null) {
// 			return false;
// 		}
// 			
// 		if (o == this) {
// 			return true;
// 		}
// 			
// 		if (!(o instanceof RegexOperator)) {
// 			return false;
// 		}
// 			
// 		RegexOperator ro = (RegexOperator) o;
// 		return ro.operatorSequence.equals(operatorSequence);
// 	}
// 
// 	@Override
// 	public int hashCode() {
// 		return operatorSequence.hashCode();
// 	}
// }
// 
// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// public enum OperatorType {
// 	PLUS, STAR, QM, COUNT, OR
// }
// 
// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// static interface RegexToken {
// 
// 	public enum TokenType {
// 		REGEX_FACTOR, REGEX_OPERATOR
// 	}
// 
// 	public TokenType getTokenType();
// 		
// 	public String getRepresentation();
// 
// }


// Path: src/main/java/preprocessor/CountClosureOperatorExpansion.java
import preprocessor.ParsingPreprocessor.CountClosureOperator;
import preprocessor.ParsingPreprocessor.RegexOperator;
import preprocessor.ParsingPreprocessor.RegexOperator.OperatorType;
import preprocessor.ParsingPreprocessor.RegexToken;

package preprocessor;


public class CountClosureOperatorExpansion extends OperatorExpansionRule {

	@Override
	protected void expandOperator(StringBuilder resultBuilder, RegexToken factor, RegexToken operator) {
		CountClosureOperator cco = (CountClosureOperator) operator;
		switch (cco.getBoundsType()) {
		case BOUNDED:
			expandBounded(resultBuilder, factor, cco);
			break;
		case UNBOUNDED: