#NEWLINE# @ staticmethod #NEWLINE# def parse( s ) : #NEWLINE# #INDENT# pieces = s . split ( '*' ) #NEWLINE# if ( len ( pieces ) > 1 ) : #NEWLINE# #INDENT# return NombankChainTreePointer ( [ NombankTreePointer . parse ( elt ) for elt in pieces ] ) #NEWLINE# #UNINDENT# pieces = s . split ( ',' ) #NEWLINE# if ( len ( pieces ) > 1 ) : #NEWLINE# #INDENT# return NombankSplitTreePointer ( [ NombankTreePointer . parse ( elt ) for elt in pieces ] ) #NEWLINE# #UNINDENT# pieces = s . split ( ':' ) #NEWLINE# if ( len ( elt ) != 2 ) : #NEWLINE# #INDENT# raise ValueError ( ( 'bad nombank pointer %r' % s ) ) #NEWLINE# #UNINDENT# return NombankTreePointer ( int ( pieces [ 0 ] ) , int ( pieces [ 1 ] ) )