boolean (RegExpBranch branch) { final RegExpAtom[] atoms = branch.getAtoms(); for (RegExpAtom atom : atoms) { if (!(atom instanceof RegExpChar) || ((RegExpChar)atom).getValue() == -1) { return false; } else if (((RegExpChar)atom).getType() != RegExpChar.Type.CHAR) { // this could probably allow more, such as escape sequences return false; } } return true; }