#NEWLINE# def _tgrep_rel_disjunction_action( _s , _l , tokens ) : #NEWLINE# #INDENT# '\n    Builds a lambda function representing a predicate on a tree node\n    from the disjunction of several other such lambda functions.\n    ' #NEWLINE# tokens = [ x for x in tokens if ( x != '|' ) ] #NEWLINE# if ( len ( tokens ) == 1 ) : #NEWLINE# #INDENT# return tokens [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( tokens ) == 2 ) : #NEWLINE# #INDENT# return ( lambda a , b : ( lambda n , m = None , l = None : ( a ( n , m , l ) or b ( n , m , l ) ) ) ) ( tokens [ 0 ] , tokens [ 1 ] )