Permalink
Browse files

adapted to changes and fixed missing entry point

  • Loading branch information...
Cetin Sert
Cetin Sert committed Nov 18, 2012
1 parent e2835f6 commit 38469758d053f9e4a1877770e40ff035bd742d3a
Showing with 8 additions and 2 deletions.
  1. +8 −2 README.md
View
@@ -10,6 +10,7 @@
open XParsec
open XParsec.Xml
+[<EntryPoint>]
let main _ =
let test parse = printfn "%A" << reply << parse << E.source
@@ -28,13 +29,15 @@ let main _ =
let parser2 = (parent => name) </> (!*child >. !@"font")
// graceful non-linear look-ahead (here = down in Xml)
- let parser3 = ahead parser1 .>. (current => name)
+ let parser3 = !!parser1 .>. (current => name)
// brand-new non-linear look-back (here = up in Xml)
let S d,_ = E.source root |> (!*child >. current)
- let parser4 = (ahead <| many (parent => name)) .>. (current => name)
+ let parser4 = !!(many (parent => name)) .>. (current => name)
test parser1 root; test parser2 root; test parser3 root; test parser4 d
+
+ 0
```
```fsharp
S (["a"; "b"; "c"; "d"], "Arial")
@@ -53,6 +56,7 @@ open XParsec.Xml
type Xobj = I of int | L of Xobj list
+[<EntryPoint>]
let main _ =
let root = E.Parse "<list><int v='1'/><list><int v='2'/></list><int v='3'/></list>"
@@ -65,6 +69,8 @@ let main _ =
do e' := int_ </> list
test e root
+
+ 0
```
```fsharp
S (L [I 1; L [I 2]; I 3])

0 comments on commit 3846975

Please sign in to comment.