#NEWLINE# def apply( self , chart , grammar , edge ) : #NEWLINE# #INDENT# if edge . is_incomplete ( ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# for prod in grammar . productions ( rhs = edge . lhs ( ) ) : #NEWLINE# #INDENT# new_edge = TreeEdge . from_production ( prod , edge . start ( ) ) #NEWLINE# if chart . insert ( new_edge , ( ) ) : #NEWLINE# #INDENT# ( yield new_edge )