parameters: (filename, st)
docstring: collect all class name appear in the file
docstring_summary: collect all class name appear in the file
docstring_tokens: collect all class name appear in the file
function: def collect_class_name(filename, st):
      "collect all class name appear in the file"
  	
      #generate the rep
      if not hasattr(collect_class_name, "rep"):
          repString = cStringIO.StringIO()
          repString.write("(?:\s+|^)class\s+")
          for word in MACROES_WITH_CLASS:
              repString.write(word + "\s+")
          repString.write("(?P<cls_name>\w+)")
  
          collect_class_name.rep = re.compile(repString.getvalue())
          repString.close()
  	
      f = open(os.path.join(COCOS_ROOT, filename))
      try:
          for line in f:
              res = collect_class_name.rep.match(line)
              if res:
                  if type(st) == type(set()):
                      st.add(res.group("cls_name"))
      finally:
          f.close()
function_tokens: def collect_class_name ( filename , st ) : #generate the rep if not hasattr ( collect_class_name , "rep" ) : repString = cStringIO . StringIO ( ) repString . write ( "(?:\s+|^)class\s+" ) for word in MACROES_WITH_CLASS : repString . write ( word + "\s+" ) repString . write ( "(?P<cls_name>\w+)" ) collect_class_name . rep = re . compile ( repString . getvalue ( ) ) repString . close ( ) f = open ( os . path . join ( COCOS_ROOT , filename ) ) try : for line in f : res = collect_class_name . rep . match ( line ) if res : if type ( st ) == type ( set ( ) ) : st . add ( res . group ( "cls_name" ) ) finally : f . close ( )