Mercurial > meta
annotate tests/testHtml.ur @ 26:c1da0e3749b3
Sql.listify
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 13 May 2012 14:13:18 -0400 |
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> |