return negative ? matchN(input, mymatch) : matchP(input, mymatch);
REMatch tryMatch; boolean tryOnly; if (addition == null) { tryMatch = mymatch; tryOnly = false; } else { tryMatch = (REMatch) mymatch.clone(); tryOnly = true; } boolean b = negative ? matchN(input, tryMatch, tryOnly) : matchP(input, tryMatch, tryOnly); if (addition == null) return b;  Stack stack = new Stack(); stack.push(new Boolean(b)); for (int i=0; i < addition.size(); i++) { Object obj = addition.elementAt(i); if (obj instanceof REToken) { b = ((REToken)obj).match(input, (REMatch)mymatch.clone()); stack.push(new Boolean(b)); } else if (obj instanceof Boolean) { stack.push(obj); } else if (obj.equals("|")) { b = ((Boolean)stack.pop()).booleanValue(); b = ((Boolean)stack.pop()).booleanValue() || b; stack.push(new Boolean(b)); } else if (obj.equals("&")) { b = ((Boolean)stack.pop()).booleanValue(); b = ((Boolean)stack.pop()).booleanValue() && b; stack.push(new Boolean(b)); } else { throw new RuntimeException("Invalid object found"); } } b = ((Boolean)stack.pop()).booleanValue(); if (b) { ++mymatch.index; return next(input, mymatch); } return false;
    boolean match(CharIndexed input, REMatch mymatch) {      return negative ? matchN(input, mymatch) : matchP(input, mymatch);    }