// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// public enum BoundsType {
// 	BOUNDED, UNBOUNDED, CONSTANT_REPETITION
// }
// 
// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// public enum EscapeType {
// 	CHARACTER, OCTAL, UNICODE, HEX, VERBATIM, CHARACTER_PROPERTY
// }


import java.util.LinkedList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import preprocessor.ParsingPreprocessor.CountClosureOperator.BoundsType;
import preprocessor.ParsingPreprocessor.EscapeFactor.EscapeType;

				operatorSymbol = countedClosureBuilder.toString();
				Pattern boundedPattern = Pattern.compile("\\{(\\d+),(\\d+)\\}");
				Pattern unboundedPattern = Pattern.compile("\\{(\\d+),\\}");
				Pattern constantRepititionPattern = Pattern.compile("\\{(\\d+)\\}");
				
				Matcher boundedMatcher = boundedPattern.matcher(operatorSymbol);
				Matcher unboundedMatcher = unboundedPattern.matcher(operatorSymbol);
				Matcher constantRepititionMatcher = constantRepititionPattern.matcher(operatorSymbol);
				int low, high;
				if (boundedMatcher.find()) {
					String lowStr = boundedMatcher.group(1);
					low = Integer.parseInt(lowStr);
					String highStr = boundedMatcher.group(2);
					high = Integer.parseInt(highStr);
					
					if (high < low || low < 0 || high > MAX_REPETITION) {
						throw new PatternSyntaxException("Illegal repetition range", regex, i);
					}
					
					operatorToken = new CountClosureOperator(operatorSymbol, quantifier, low, high);
					tokenStream.add(operatorToken);
					
				} else if (unboundedMatcher.find()) {
					String lowStr = unboundedMatcher.group(1);
					low = Integer.parseInt(lowStr);					
					
					if (low < 0 || low > MAX_REPETITION) {
						throw new PatternSyntaxException("Illegal repetition range", regex, i);
					}
// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// public enum BoundsType {
// 	BOUNDED, UNBOUNDED, CONSTANT_REPETITION
// }
// 
// Path: src/main/java/preprocessor/ParsingPreprocessor.java
// public enum EscapeType {
// 	CHARACTER, OCTAL, UNICODE, HEX, VERBATIM, CHARACTER_PROPERTY
// }


// Path: src/main/java/preprocessor/ParsingPreprocessor.java
import java.util.LinkedList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import preprocessor.ParsingPreprocessor.CountClosureOperator.BoundsType;
import preprocessor.ParsingPreprocessor.EscapeFactor.EscapeType;


				operatorSymbol = countedClosureBuilder.toString();
				Pattern boundedPattern = Pattern.compile("\\{(\\d+),(\\d+)\\}");
				Pattern unboundedPattern = Pattern.compile("\\{(\\d+),\\}");
				Pattern constantRepititionPattern = Pattern.compile("\\{(\\d+)\\}");
				
				Matcher boundedMatcher = boundedPattern.matcher(operatorSymbol);
				Matcher unboundedMatcher = unboundedPattern.matcher(operatorSymbol);
				Matcher constantRepititionMatcher = constantRepititionPattern.matcher(operatorSymbol);
				int low, high;
				if (boundedMatcher.find()) {
					String lowStr = boundedMatcher.group(1);
					low = Integer.parseInt(lowStr);
					String highStr = boundedMatcher.group(2);
					high = Integer.parseInt(highStr);
					
					if (high < low || low < 0 || high > MAX_REPETITION) {
						throw new PatternSyntaxException("Illegal repetition range", regex, i);
					}
					
					operatorToken = new CountClosureOperator(operatorSymbol, quantifier, low, high);
					tokenStream.add(operatorToken);
					
				} else if (unboundedMatcher.find()) {
					String lowStr = unboundedMatcher.group(1);
					low = Integer.parseInt(lowStr);					
					
					if (low < 0 || low > MAX_REPETITION) {
						throw new PatternSyntaxException("Illegal repetition range", regex, i);
					}
					operatorToken = new CountClosureOperator(operatorSymbol, quantifier, low, BoundsType.UNBOUNDED);