[Imps] Test cases for parsing spec
Sam Ruby
rubys at intertwingly.net
Thu Dec 7 04:09:37 PST 2006
James Graham wrote:
> FWIW, I've started writing tokenizer testcases that are simply one-line
> eval-able python expressions of the form:
> [input, expected output, description]
> e.g. ["<h a='b'>", [["StartTag", "h", {'a':'b'}]], "Start Tag w/attribute"]
s/{'a':'b'}/{"a":"b"}/ and you have http://www.json.org/
> This form is clearly suboptimal (it's verbose, has lots of line noise,
> requires everything to be on a single line) but hopefully, since it can
> be parsed easily, we will be able to convert it to a better format in
> the future.
+1. The format is fungible. What we need is the data.
- Sam Ruby
More information about the Implementors
mailing list