tho_mica_l wrote: >> What do you mean it mismatches? Also what do you mean by self-checking? >> It passes all the unit tests for me. > > I think he meant that it doesn't throw exceptions on error. This is > the > wrapper I used to make it conform with the provided tests: > > class JSONParser > def initialize > @parser = JsonParser.new > end > > def parse(text) > rv = @parser.parse(text) > if rv > return rv.value > else > raise RuntimeError > end > end > end If you check my version, you'll see that you can raise a meaningful RuntimeError by raising @parser.failure_reason - this produces an error message that says how far the parse progressed, and which tokens might have allowed it to progress further. Clifford Heath.