public ArrayList parseArguments(){
  String working=" " + _arguments + " ";
  int index=0;
  result=new ArrayList();
  while (index < working.length()) {
    int next=findNextArg(index,working);
    if (next < 0)     break;
    int pos=extractArgName(next,working);
    ArgRange range=extractArgValue(pos + 1,working);
    if (range != null) {
      String argName=working.substring(next,pos);
      String argValue=working.substring(range.startIndex,range.endIndex);
      result.add(argName + "=" + argValue);
      index=range.endIndex + 1;
    }
 else {
      String argName=working.substring(next,pos);
      result.add(argName);
      index=pos + 1;
    }
  }
  return result;
}

public ArrayList parseArguments ( ) { String working = " " + _arguments + " " ; int index = 0 ; result = new ArrayList ( ) ; while ( index < working . length ( ) ) { int next = findNextArg ( index , working ) ; if ( next < 0 ) break ; int pos = extractArgName ( next , working ) ; ArgRange range = extractArgValue ( pos + 1 , working ) ; if ( range != null ) { String argName = working . substring ( next , pos ) ; String argValue = working . substring ( range . startIndex , range . endIndex ) ; result . add ( argName + "=" + argValue ) ; index = range . endIndex + 1 ; } else { String argName = working . substring ( next , pos ) ; result . add ( argName ) ; index = pos + 1 ; } } return result ; }
arguments are identified with - or - - preceding them and separated from the previous argument by one or more spaces . the value of the argument , if present , is separated from the argument name using an equal - sign .
