Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/corsis/XParsec

  • Loading branch information...
commit e315b06454353f8dc40b9f11c4052c1cc977c562 2 parents 86c4153 + 45eb01e
@cetinsert cetinsert authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 README.md
View
10 README.md
@@ -10,6 +10,7 @@
open XParsec
open XParsec.Xml
+[<EntryPoint>]
let main _ =
let test parse = printfn "%A" << reply << parse << E.source
@@ -28,13 +29,13 @@ 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
+ test parser1 root; test parser2 root; test parser3 root; test parser4 d; 0
```
```fsharp
S (["a"; "b"; "c"; "d"], "Arial")
@@ -53,6 +54,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>"
@@ -64,7 +66,7 @@ let main _ =
do e' := int_ </> list
- test e root
+ test e root; 0
```
```fsharp
S (L [I 1; L [I 2]; I 3])
Please sign in to comment.
Something went wrong with that request. Please try again.