parameters: ( self, filename )
docstring: parse a C source file, and add its blocks to the processor's list
docstring_summary: parse a C source file, and add its blocks to the processor's list
docstring_tokens: parse a C source file and add its blocks to the processor s list
function: def  parse_file( self, filename ):
          """parse a C source file, and add its blocks to the processor's list"""
          self.reset()
  
          self.filename = filename
  
          fileinput.close()
          self.format = None
          self.lineno = 0
          self.lines  = []
  
          for line in fileinput.input( filename ):
              # strip trailing newlines, important on Windows machines!
              if line[-1] == '\012':
                  line = line[0:-1]
  
              if self.format == None:
                  self.process_normal_line( line )
              else:
                  if self.format.end.match( line ):
                      # that's a normal block end, add it to 'lines' and
                      # create a new block
                      self.lines.append( line )
                      self.add_block_lines()
                  elif self.format.column.match( line ):
                      # that's a normal column line, add it to 'lines'
                      self.lines.append( line )
                  else:
                      # humm.. this is an unexpected block end,
                      # create a new block, but don't process the line
                      self.add_block_lines()
  
                      # we need to process the line again
                      self.process_normal_line( line )
  
          # record the last lines
          self.add_block_lines()
function_tokens: def parse_file ( self , filename ) : self . reset ( ) self . filename = filename fileinput . close ( ) self . format = None self . lineno = 0 self . lines = [ ] for line in fileinput . input ( filename ) : # strip trailing newlines, important on Windows machines! if line [ - 1 ] == '\012' : line = line [ 0 : - 1 ] if self . format == None : self . process_normal_line ( line ) else : if self . format . end . match ( line ) : # that's a normal block end, add it to 'lines' and # create a new block self . lines . append ( line ) self . add_block_lines ( ) elif self . format . column . match ( line ) : # that's a normal column line, add it to 'lines' self . lines . append ( line ) else : # humm.. this is an unexpected block end, # create a new block, but don't process the line self . add_block_lines ( ) # we need to process the line again self . process_normal_line ( line ) # record the last lines self . add_block_lines ( )