On Sat, Jun 11, 2011 at 10:06 AM, Sean Perry <span dir="ltr">&lt;<a href="mailto:shaleh@speakeasy.net">shaleh@speakeasy.net</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Choices, choices.<br>
<br>
The first one is to use unit tests. Look at the grammar and make sure the obvious stuff fails or succeeds. &quot;a + b&quot;, &quot;a :+ b&quot;, etc. You can do this at the Haskell level with parser objects.<br>
<br>
Next you can write small samples to test things the unit tests did not. Compare the output to known results. There are numerous examples of this in the open source world you can either reuse or crib from.<br></blockquote>
<div> </div><div>Don&#39;t just test the &quot;obvious&quot; things.   If the parse tree is truly a tree, it is an initial algebra and amenable to case analysis as an initial algebra.  In other words, you can do a proof by induction, just by checking all the base cases.</div>
</div>