annotate tests/testHtml.ur @ 10:763eb2f2aa5a

Record.mem
author Adam Chlipala <adam@chlipala.net>
date Thu, 03 Feb 2011 09:31:32 -0500
parents 8eaaca74a64c
children
rev   line source
adam@9 1 open Parse
adam@9 2 open Html
adam@9 3
adam@9 4 val parser = format (b, i, a)
adam@9 5
adam@9 6 fun parse r =
adam@9 7 case parser r.Source of
adam@9 8 Failure s => error <xml>Bad HTML: {[s]}</xml>
adam@9 9 | Success x => return <xml><body>
adam@9 10 <h1>Here it is:</h1>
adam@9 11
adam@9 12 {x}
adam@9 13 </body></xml>
adam@9 14
adam@9 15 fun main () = return <xml><body>
adam@9 16 <form> <textarea{#Source}/> <submit action={parse}/> </form>
adam@9 17 </body></xml>