private int parseEnum(CharSequence string) {
        Matcher enumMatcher = enumPattern.matcher(string);
        if (enumMatcher.find()) {
            enumString = enumMatcher.group(0).trim();
        }
        if (enumString == null) {
            throw new IllegalArgumentException(string + " is not valid syntax");
        }
        enumString = enumString.replaceFirst("\\{\\s*", "");
        enumString = enumString.replaceFirst("\\s*\\}", "");
        String[] result = enumPattern2.split(enumString);
        type.enumArray = new String[result.length];
        for (int i = 0; i < result.length; i++) {
            String s = result[i].trim();
            type.enumArray[i] = s;
            Matcher wordMatcher2 = wordPattern2.matcher(s);
            if (!wordMatcher2.matches()) {
                throw new IllegalArgumentException(s + " is not valid syntax");
            }
        }
        return enumMatcher.end();
    }
Special function that searches through s and returns the index
of the first occurrence of " that is not escaped.
configgen/src/main/java/com/yahoo/config/codegen/DefLine.java