private static void validateReservedWords(String name) {
        String cleanName = (name.endsWith("[]") || name.endsWith("{}")) ?  name.substring(0, name.length()-2) : name;

        if (ReservedWords.isReservedWord(cleanName)) {
           throw new IllegalArgumentException(cleanName + " is a reserved word in " +
                   ReservedWords.getLanguageForReservedWord(cleanName));
        }
        if (ReservedWords.capitalizedPattern.matcher(cleanName).matches()) {
            throw new IllegalArgumentException("'" + cleanName + "' cannot start with an uppercase letter");
        }
        if (ReservedWords.internalPrefixPattern.matcher(cleanName).matches()) {
            throw new IllegalArgumentException("'" + cleanName + "' cannot start with '" + ReservedWords.INTERNAL_PREFIX + "'");
        }
    }
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