code: def p_methodDeclaration(p):
      # pylint: disable=line-too-long
        # noqa: E501
      paramlist = []
      quals = []
      if isinstance(p[1], six.string_types):  # no quals
          dt = p[1]
          mname = p[2]
          if p[4] != ')':
              paramlist = p[4]
      else:  # quals present
          quals = p[1]
          dt = p[2]
          mname = p[3]
          if p[5] != ')':
              paramlist = p[5]
      params = OrderedDict([(param.name, param) for param in paramlist])
      quals = OrderedDict([(q.name, q) for q in quals])
      p[0] = CIMMethod(mname, return_type=dt, parameters=params,
                       qualifiers=quals)
docs: methodDeclaration : dataType methodName '(' ')' ';'
                           | dataType methodName '(' parameterList ')' ';'
                           | qualifierList dataType methodName '(' ')' ';'
                           | qualifierList dataType methodName '(' parameterList ')' ';'