From: Matt Jessick Date: 2011-12-11T00:59:40+09:00 Subject: Re: Treetop - parsing to nil result Clifford Heath wrote in post #982088: > It's important to develop these grammars incrementally. > Clifford Heath, Treetop maintainer. Thanks for the debugging hints - just the suggestions I was looking for. My first Treetop attempt was parsing "W083.29.44.999". Unfortuantely, the first rule I had whipped out in my excitement at getting started was: rule digit [1-9] end Luckily, following Clifford's advice, my first Test::Unit test was that ancient rule all the way down in the grammar file: def test__digit__0_parses result = @parser.parse("0", :root=> "digit", :consume_all_input => true) assert_not_nil(result) end Oh well, on to the less lucky bugs! :) -- Posted via http://www.ruby-forum.com/.