code: public static int validateArgumentName(String name) {
          if(!PatternProps.isIdentifier(name)) {
              return ARG_NAME_NOT_VALID;
          }
          return parseArgNumber(name, 0, name.length());
      }
docs: Validates and parses an argument name or argument number string.
  An argument name must be a "pattern identifier", that is, it must contain
  no Unicode Pattern_Syntax or Pattern_White_Space characters.
  If it only contains ASCII digits, then it must be a small integer with no leading zero.
  @param name Input string.
  @return &gt;=0 if the name is a valid number,
  ARG_NAME_NOT_NUMBER (-1) if it is a "pattern identifier" but not all ASCII digits,
  ARG_NAME_NOT_VALID (-2) if it is neither.