#NEWLINE# def _process_namespace( self , token , content ) : #NEWLINE# #INDENT# if ( u ( content ) == u ( 'import' ) ) : #NEWLINE# #INDENT# self . state = 'import' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . state == 'import' ) : #NEWLINE# #INDENT# keywords = [ u ( 'package' ) , u ( 'namespace' ) , u ( 'static' ) ] #NEWLINE# if ( u ( content ) in keywords ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . buffer = u ( '{0}{1}' ) . format ( self . buffer , u ( content ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . state == 'import-finished' ) : #NEWLINE# #INDENT# content = content . split ( u ( '.' ) ) #NEWLINE# if ( len ( content ) == 1 ) : #NEWLINE# #INDENT# self . append ( content [ 0 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( content ) > 1 ) : #NEWLINE# #INDENT# if ( len ( content [ 0 ] ) == 3 ) : #NEWLINE# #INDENT# content = content [ 1 : ] #NEWLINE# #UNINDENT# if ( content [ ( - 1 ) ] == u ( '*' ) ) : #NEWLINE# #INDENT# content = content [ : ( len ( content ) - 1 ) ] #NEWLINE# #UNINDENT# if ( len ( keywords ) == 1 ) : #NEWLINE# #INDENT# self . append ( content [ 0 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( content ) > 1 ) : #NEWLINE# #INDENT# self . append ( u ( '.' ) . join ( content [ : 2 ] ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# self . state = None