Looks at line 'i' to see if the line matches a module member def.
557272
def _match_member(self, i, column):
        """"""
        self.col_match = self.RE_MEMBERS.match(self._source[i])
        if self.col_match is not None:
            if column < self._source[i].index(":"):
                self.el_call = "name"
            else:
                self.el_call = "assign"
            
            return True
        else:
            return False
494441
def is_module(obj):
    
    return True if obj and isinstance(obj, ModuleType) or inspect.isclass(obj) else False
1065792
def scan_line(self, line, regex):
        """"""
        return bool(re.search(regex, line, flags=re.IGNORECASE))
528946
def _find_module_ptr(self, module_ptr):
        
        ptr = cast(module_ptr, c_void_p).value
        for module in self._modules:
            if cast(module._ptr, c_void_p).value == ptr:
                return module
        return None
121338
def _number_of_line(member_tuple):
    """"""
    member = member_tuple[1]
    try:
        return member.__code__.co_firstlineno
    except AttributeError:
        pass
    try:
        return inspect.findsource(member)[1]
    except BaseException:
        pass
    for value in vars(member).values():
        try:
            return value.__code__.co_firstlineno
        except AttributeError:
            pass
    return 0
259629
def isin(elems, line):
    
    found = False
    for e in elems:
        if e in line.lower():
            found = True
            break
    return found
702751
def got_a(self, _type):
        
        if _type not in self.modules:
            raise ValueError("No such module, %s" % _type)
        return (_type in self.insts_implementing and
                self.insts_implementing[_type])
1302541
def module_matching(self, name):
        ''''''
        import fnmatch
        ret = []
        for mname in self.mpstate.public_modules.keys():
            if fnmatch.fnmatch(mname, name):
                ret.append(self.mpstate.public_modules[mname])
        return ret
169958
def parse(self, module):
        """"""
        #Because of embedded types, we have to examine the entire module for
        #executable definitions.
        self.parse_block(module.refstring, module, module, 0)

        #Now we can set the value of module.contains as the text after the start of
        #the *first* non-embedded executable.
        min_start = len(module.refstring)
        for x in module.executables:
            if module.executables[x].start < min_start:
                min_start = module.executables[x].start

        module.contains = module.refstring[min_start::]
66563
def _is_module_included(self, module):
        
        if module in self.exclude_modules:
            return False

        if self.include_modules is None:
            return True

        return module in self.include_modules
862920
def parse_line(line)
      ruby_match = line.match(RUBY_FORMAT)

      if ruby_match
        _, file, number, method = ruby_match.to_a
        file.sub!(/\.class$/, '.rb')
        module_name = nil
      else
        java_match = line.match(JAVA_FORMAT)
        _, module_name, method, file, number = java_match.to_a
      end

      [file, number, method, module_name]
    end
586114
def _deep_match(self, line, column):
        """"""
        #Now we just try each of the possibilities for the current line
        if self._match_member(line, column):
            self.el_section = "vars"
            self.el_type = ValueElement
            self.el_name = self.col_match.group("names")
            return
             
        if isinstance(self.element, Executable) or isinstance(self.element, Module):
            #We are inside of a subroutine or function definition
            #It is either params, vars or body. We already tested for variable
            #declarations in the match_member test. Check now to see if we are
            #on the line that defines the function
            self._match_exec(line)
            if self.col_match:
                self.el_section = "params"
                self.el_call = "assign"
                return

            #This regex incorrectly grabbing things like 'if' is functions because
            #they do actually like like functions... We need to filter the list 
            #with special keywords before we claim victory. TODO
            self.col_match = self.RE_DEPEND.match(self._source[line])
            if self.col_match:
                self.el_section = "body"
                self.el_name = self.col_match.group("exec")
                if self.col_match.group("sub") and "call" in self.col_match.group("sub"):
                    self.el_call = "sub"
                    self.el_type = Subroutine
                else:
                    self.el_call = "fun"
                    self.el_type = Function

                return
        #If we are inside a type, we either got the member variable declaration
        #already, or it is a pointer to a method inside of the module. Add the
        #test for that later. TODO
#        if isinstance(self.element, CustomType):
            
        self.el_section = "body"
        self.el_type = None
        #We just need to figure out what kind of a call is being made
        #at this column position, the only thing left is
        if " = " in self._source[line]:
            eqi = self._source[line].index("=")
            if column < eqi:
                self.el_call = "name"
            else:
                self.el_call = "assign"
            self.el_name = self._source[line].split("=")[0].strip()
        elif re.match("\s*call\s+", self._source[line]):
            self.el_call = "sub"
            self.el_name = self._source[line].split("call ")[1]
        else:
            #The only thing left (and the hardest to nail down) is
            #the arithmetic catch all type.
            self.el_call = "arith"
            self.el_name = "[arith]"
640585
def cell_has_code(lines):
    """"""
    for i, line in enumerate(lines):
        stripped_line = line.strip()
        if stripped_line.startswith('#'):
            continue

        # Two consecutive blank lines?
        if not stripped_line:
            if i > 0 and not lines[i - 1].strip():
                return False
            continue

        return True

    return False
46873
def match(self, context, line):
		""""""
		stripped = line.stripped
		return stripped.startswith('#') and not stripped.startswith('#{')
166027
def is_defined(self, objtxt, force_import=False):
        """"""
        return self.interpreter.is_defined(objtxt, force_import)
486215
def is_submodule(self, name):
        
        return self.name != name and name.startswith(self.name)
1345887
def _match_type(self, i):
        """"""
        self.col_match = self.RE_TYPE.match(self._source[i])
        if self.col_match is not None:
            self.section = "types"
            self.el_type = CustomType
            self.el_name = self.col_match.group("name")
           
            return True
        else:
            return False