+ this.matcher = matcher;
+ this.tokenizer = tokenizer;
+ }
+
+ public boolean isGroup(String group){
+ if (terminator == null){
+ return group == null;
+ }
+
+ if (terminator.group == null){
+ return group == null;
+ }
+
+ return terminator.group.equals(group);
+ }
+
+ public String[] getRegExpGroups(){
+ String[] result = new String[matcher.groupCount()];
+
+ for (int i = 0; i< result.length; i++){
+ result[i] = matcher.group(i+1);
+ }
+
+ return result;