#NEWLINE# def test_parens( self ) : #NEWLINE# #INDENT# grammar = Grammar ( 'sequence = "chitty" (" " "bang")+' ) #NEWLINE# assert_raises ( ParseError , grammar . parse , 'chitty bangbang' ) #NEWLINE# s = 'chitty bang bang' #NEWLINE# eq_ ( str ( grammar . parse ( s ) ) , '<Node called "sequence" matching "chitty bang bang">\n    <Node matching "chitty">\n    <Node matching " bang bang">\n        <Node matching " bang">\n            <Node matching " ">\n            <Node matching "bang">\n        <Node matching " bang">\n            <Node matching " ">\n            <Node matching "bang">' )