comparison tests/testHtml.ur @ 9:8eaaca74a64c

Import HTML parser
author Adam Chlipala <adam@chlipala.net>
date Wed, 15 Dec 2010 09:27:46 -0500
parents
children
comparison
equal deleted inserted replaced
8:ec4de8f848f8 9:8eaaca74a64c
1 open Parse
2 open Html
3
4 val parser = format (b, i, a)
5
6 fun parse r =
7 case parser r.Source of
8 Failure s => error <xml>Bad HTML: {[s]}</xml>
9 | Success x => return <xml><body>
10 <h1>Here it is:</h1>
11
12 {x}
13 </body></xml>
14
15 fun main () = return <xml><body>
16 <form> <textarea{#Source}/> <submit action={parse}/> </form>
17 </body></xml>