#NEWLINE# def run( lines ) : #NEWLINE# #INDENT# global num_rules #NEWLINE# global digrams #NEWLINE# first_rule = Rule ( num_rules ) #NEWLINE# num_rules += 1 #NEWLINE# digrams = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for line in lines : #NEWLINE# #INDENT# for c in line : #NEWLINE# #INDENT# first_rule . last ( ) . insert_after ( Terminal ( c ) ) #NEWLINE# first_rule . last ( ) . p . check ( ) #NEWLINE# #UNINDENT# #UNINDENT# return first_rule . get_rules ( )