#NEWLINE# def test_trailing_semicolon( self ) : #NEWLINE# #INDENT# "\n        Test that semicolons at the end of a tgrep2 search string won't\n        cause a parse failure.\n        " #NEWLINE# tree = ParentedTree . fromstring ( '(S (NP (DT the) (JJ big) (NN dog)) (VP bit) (NP (DT a) (NN cat)))' ) #NEWLINE# self . assertEqual ( list ( tgrep . tgrep_positions ( 'NN' , [ self ] ) ) , [ [ ( 0 , 2 ) , ( 2 , 1 ) ] ] ) #NEWLINE# self . assertEqual ( list ( tgrep . tgrep_positions ( 'NN;' , [ tree ] ) ) , [ [ ( 0 , 2 ) , ( 2 , 1 ) ] ] ) #NEWLINE# self . assertEqual ( list ( tgrep . tgrep_positions ( 'NN;;' , [ tree ] ) ) , [ [ ( 0 , 2 ) , ( 2 , 1 ) ] ] )