code: private VarNamePattern getValidVarNamePattern( String varNamePattern) throws IllegalArgumentException
      {
      VarNamePattern pattern = new VarNamePattern( varNamePattern);
      if( !pattern.isValid())
        {
        throw new IllegalArgumentException( "\"" + pattern + "\" is not a valid variable name pattern");
        }
  
      return pattern;
      }
docs: Throws an exception if the given variable name pattern is not valid. Otherwise, returns
  the corresponding {@link VarNamePattern} object.