in activemq-protobuf/src/main/java/org/apache/activemq/protobuf/compiler/TextFormat.java [229:245]
public String consumeIdentifier() throws ParseException {
for (int i = 0; i < currentToken.length(); i++) {
char c = currentToken.charAt(i);
if (('a' <= c && c <= 'z') ||
('A' <= c && c <= 'Z') ||
('0' <= c && c <= '9') ||
(c == '_') || (c == '.')) {
// OK
} else {
throw parseException("Expected identifier.");
}
}
String result = currentToken;
nextToken();
return result;
}