Equations
- Lean.Xml.Parser.endl = SeqRight.seqRight (HOrElse.hOrElse (Lean.Parsec.skipString "\x0d\n") fun x => HOrElse.hOrElse (Lean.Parsec.skipChar (Char.ofNat 13)) fun x => Lean.Parsec.skipChar (Char.ofNat 10)) fun x => pure (Char.ofNat 10)
Equations
- Lean.Xml.Parser.quote p = HOrElse.hOrElse (SeqLeft.seqLeft (SeqRight.seqRight (Lean.Parsec.skipChar (Char.ofNat 39)) fun x => p) fun x => Lean.Parsec.skipChar (Char.ofNat 39)) fun x => SeqLeft.seqLeft (SeqRight.seqRight (Lean.Parsec.skipChar (Char.ofNat 34)) fun x => p) fun x => Lean.Parsec.skipChar (Char.ofNat 34)
Equations
- Lean.Xml.Parser.Char = HOrElse.hOrElse (Lean.Parsec.attempt do let c ← Lean.Parsec.anyChar let cNat ← pure (Char.toNat c) if 32 ≤ cNat ∧ cNat ≤ 55295 ∨ 57344 ≤ cNat ∧ cNat ≤ 65533 ∨ 65536 ≤ cNat ∧ cNat ≤ 1114111 then pure c else Lean.Parsec.fail "expected xml char") fun x => HOrElse.hOrElse (Lean.Parsec.pchar (Char.ofNat 9)) fun x => Lean.Xml.Parser.endl
Equations
- Lean.Xml.Parser.S = Lean.Parsec.many1Chars (HOrElse.hOrElse (Lean.Parsec.pchar (Char.ofNat 32)) fun x => HOrElse.hOrElse Lean.Xml.Parser.endl fun x => Lean.Parsec.pchar (Char.ofNat 9))
Equations
- Lean.Xml.Parser.Eq = SeqLeft.seqLeft (SeqRight.seqRight (optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 61)) fun x => optional Lean.Xml.Parser.S
Equations
- Lean.Xml.Parser.NameStartChar = Lean.Parsec.attempt do let c ← Lean.Parsec.anyChar if Char.ofNat 65 ≤ c ∧ c ≤ Char.ofNat 90 ∨ Char.ofNat 97 ≤ c ∧ c ≤ Char.ofNat 122 then pure c else if c = Char.ofNat 58 ∨ c = Char.ofNat 95 then pure c else let cNum := Char.toNat c; if Array.any Lean.Xml.Parser.nameStartCharRanges (fun x => match x with | (lo, hi) => decide (lo ≤ cNum ∧ cNum ≤ hi)) 0 (Array.size Lean.Xml.Parser.nameStartCharRanges) = true then pure c else Lean.Parsec.fail "expected a name character"
Equations
- Lean.Xml.Parser.NameChar = HOrElse.hOrElse Lean.Xml.Parser.NameStartChar fun x => HOrElse.hOrElse Lean.Parsec.digit fun x => HOrElse.hOrElse (Lean.Parsec.pchar (Char.ofNat 45)) fun x => HOrElse.hOrElse (Lean.Parsec.pchar (Char.ofNat 46)) fun x => HOrElse.hOrElse (Lean.Parsec.pchar (Char.ofNat 183)) fun x => Lean.Parsec.satisfy fun c => decide (Char.ofNat 768 ≤ c ∧ c ≤ Char.ofNat 879 ∨ Char.ofNat 8255 ≤ c ∧ c ≤ Char.ofNat 8256)
Equations
Equations
Equations
- Lean.Xml.Parser.EncName = do let x ← Lean.Parsec.asciiLetter Lean.Parsec.manyCharsCore (HOrElse.hOrElse Lean.Parsec.asciiLetter fun x => HOrElse.hOrElse Lean.Parsec.digit fun x => HOrElse.hOrElse (Lean.Parsec.pchar (Char.ofNat 45)) fun x => HOrElse.hOrElse (Lean.Parsec.pchar (Char.ofNat 95)) fun x => Lean.Parsec.pchar (Char.ofNat 46)) (Char.toString x)
Equations
Equations
- Lean.Xml.Parser.SDDecl = SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight Lean.Xml.Parser.S fun x => Lean.Parsec.skipString "standalone") fun x => Lean.Xml.Parser.Eq) fun x => Lean.Xml.Parser.quote (HOrElse.hOrElse (Lean.Parsec.pstring "yes") fun x => Lean.Parsec.pstring "no")
Equations
Equations
- Lean.Xml.Parser.Comment = let notDash := Char.toString <$> Lean.Parsec.satisfy fun c => decide (c ≠ Char.ofNat 45); SeqLeft.seqLeft (SeqRight.seqRight (Lean.Parsec.skipString ""
Equations
- Lean.Xml.Parser.PITarget = SeqLeft.seqLeft (SeqLeft.seqLeft (SeqLeft.seqLeft Lean.Xml.Parser.Name fun x => HOrElse.hOrElse (Lean.Parsec.skipChar (Char.ofNat 88)) fun x => Lean.Parsec.skipChar (Char.ofNat 120)) fun x => HOrElse.hOrElse (Lean.Parsec.skipChar (Char.ofNat 77)) fun x => Lean.Parsec.skipChar (Char.ofNat 109)) fun x => HOrElse.hOrElse (Lean.Parsec.skipChar (Char.ofNat 76)) fun x => Lean.Parsec.skipChar (Char.ofNat 108)
Equations
- Lean.Xml.Parser.PI = do SeqLeft.seqLeft (SeqLeft.seqLeft (Lean.Parsec.skipString "") fun x => Lean.Xml.Parser.PITarget) fun x => optional (SeqRight.seqRight Lean.Xml.Parser.S fun x => Lean.Parsec.manyChars (SeqRight.seqRight (Lean.Parsec.notFollowedBy (Lean.Parsec.skipString "?>")) fun x => Lean.Xml.Parser.Char)) Lean.Parsec.skipString "?>"
Equations
- Lean.Xml.Parser.Misc = HOrElse.hOrElse (SeqRight.seqRight Lean.Xml.Parser.Comment fun x => pure ()) fun x => HOrElse.hOrElse Lean.Xml.Parser.PI fun x => SeqRight.seqRight Lean.Xml.Parser.S fun x => pure ()
Equations
- Lean.Xml.Parser.SystemLiteral = HOrElse.hOrElse (SeqLeft.seqLeft (SeqRight.seqRight (Lean.Parsec.pchar (Char.ofNat 34)) fun x => Lean.Parsec.manyChars (Lean.Parsec.satisfy fun c => decide (c ≠ Char.ofNat 34))) fun x => Lean.Parsec.pchar (Char.ofNat 34)) fun x => SeqLeft.seqLeft (SeqRight.seqRight (Lean.Parsec.pchar (Char.ofNat 39)) fun x => Lean.Parsec.manyChars (Lean.Parsec.satisfy fun c => decide (c ≠ Char.ofNat 39))) fun x => pure (Char.ofNat 39)
Equations
- Lean.Xml.Parser.PubidChar = HOrElse.hOrElse Lean.Parsec.asciiLetter fun x => HOrElse.hOrElse Lean.Parsec.digit fun x => HOrElse.hOrElse Lean.Xml.Parser.endl fun x => Lean.Parsec.attempt do let c ← Lean.Parsec.anyChar if String.contains "-'()+,./:=?;!*#@$_%" c = true then pure c else Lean.Parsec.fail "PublidChar expected"
Equations
- Lean.Xml.Parser.PubidLiteral = HOrElse.hOrElse (SeqLeft.seqLeft (SeqRight.seqRight (Lean.Parsec.pchar (Char.ofNat 34)) fun x => Lean.Parsec.manyChars Lean.Xml.Parser.PubidChar) fun x => Lean.Parsec.pchar (Char.ofNat 34)) fun x => SeqLeft.seqLeft (SeqRight.seqRight (Lean.Parsec.pchar (Char.ofNat 39)) fun x => Lean.Parsec.manyChars (Lean.Parsec.attempt do let c ← Lean.Xml.Parser.PubidChar if c = Char.ofNat 39 then Lean.Parsec.fail "'\\'' not expected" else pure c)) fun x => Lean.Parsec.pchar (Char.ofNat 39)
Equations
- Lean.Xml.Parser.ExternalID = HOrElse.hOrElse (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (Lean.Parsec.skipString "SYSTEM") fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.SystemLiteral) fun x => pure ()) fun x => SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (Lean.Parsec.skipString "PUBLIC") fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.PubidLiteral) fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.SystemLiteral) fun x => pure ()
Equations
- Lean.Xml.Parser.Mixed = HOrElse.hOrElse (do Lean.Parsec.skipChar (Char.ofNat 40) SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipString "#PCDATA") fun x => Lean.Parsec.many (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 124)) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.Name)) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipString ")*") fun x => SeqLeft.seqLeft (SeqLeft.seqLeft (SeqRight.seqRight (SeqRight.seqRight (Lean.Parsec.skipChar (Char.ofNat 40)) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipString "#PCDATA") fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 41)
Equations
- Lean.Xml.Parser.children = SeqLeft.seqLeft (HOrElse.hOrElse Lean.Xml.Parser.choice fun x => Lean.Xml.Parser.seq) fun x => optional (HOrElse.hOrElse (Lean.Parsec.skipChar (Char.ofNat 63)) fun x => HOrElse.hOrElse (Lean.Parsec.skipChar (Char.ofNat 42)) fun x => Lean.Parsec.skipChar (Char.ofNat 43))
Equations
- Lean.Xml.Parser.contentspec = HOrElse.hOrElse (Lean.Parsec.skipString "EMPTY") fun x => HOrElse.hOrElse (Lean.Parsec.skipString "ANY") fun x => HOrElse.hOrElse Lean.Xml.Parser.Mixed fun x => Lean.Xml.Parser.children
Equations
- Lean.Xml.Parser.elementDecl = do Lean.Parsec.skipString " SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight Lean.Xml.Parser.S fun x => Lean.Xml.Parser.Name) fun x => Lean.Xml.Parser.contentspec) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 62)
Equations
Equations
- Lean.Xml.Parser.TokenizedType = HOrElse.hOrElse (Lean.Parsec.skipString "ID") fun x => HOrElse.hOrElse (Lean.Parsec.skipString "IDREF") fun x => HOrElse.hOrElse (Lean.Parsec.skipString "IDREFS") fun x => HOrElse.hOrElse (Lean.Parsec.skipString "ENTITY") fun x => HOrElse.hOrElse (Lean.Parsec.skipString "ENTITIES") fun x => HOrElse.hOrElse (Lean.Parsec.skipString "NMTOKEN") fun x => Lean.Parsec.skipString "NMTOKENS"
Equations
- Lean.Xml.Parser.NotationType = do Lean.Parsec.skipString "NOTATION" SeqLeft.seqLeft (SeqRight.seqRight Lean.Xml.Parser.S fun x => Lean.Parsec.skipChar (Char.ofNat 40)) fun x => optional Lean.Xml.Parser.S SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight Lean.Xml.Parser.Name fun x => Lean.Parsec.many (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 124)) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.Name)) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 41)
Equations
- Lean.Xml.Parser.Enumeration = do Lean.Parsec.skipChar (Char.ofNat 40) SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (optional Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.Nmtoken) fun x => Lean.Parsec.many (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 124)) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.Nmtoken)) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 41)
Equations
- Lean.Xml.Parser.predefinedEntityToChar x = match x with | "lt" => some (Char.ofNat 60) | "gt" => some (Char.ofNat 62) | "amp" => some (Char.ofNat 38) | "apos" => some (Char.ofNat 39) | "quot" => some (Char.ofNat 34) | x => none
Equations
@[inline]
Equations
- Lean.Xml.Parser.hexDigitToNat c = if Char.ofNat 48 ≤ c ∧ c ≤ Char.ofNat 57 then Char.toNat c - Char.toNat (Char.ofNat 48) else if Char.ofNat 97 ≤ c ∧ c ≤ Char.ofNat 102 then Char.toNat c - Char.toNat (Char.ofNat 97) + 10 else Char.toNat c - Char.toNat (Char.ofNat 65) + 10
Equations
- Lean.Xml.Parser.digitsToNat base digits = Array.foldl (fun r d => r * base + d) 0 digits 0 (Array.size digits)
Equations
- Lean.Xml.Parser.CharRef = do Lean.Parsec.skipString "" let charCode ← HOrElse.hOrElse (Lean.Xml.Parser.digitsToNat 10 <$> Lean.Parsec.many1 (Lean.Xml.Parser.hexDigitToNat <$> Lean.Parsec.digit)) fun x => SeqRight.seqRight (Lean.Parsec.skipChar (Char.ofNat 120)) fun x => Lean.Xml.Parser.digitsToNat 16 <$> Lean.Parsec.many1 (Lean.Xml.Parser.hexDigitToNat <$> Lean.Parsec.hexDigit) Lean.Parsec.skipChar (Char.ofNat 59) pure (Char.ofNat charCode)
Equations
Equations
- Lean.Xml.Parser.AttValue = do let chars ← HOrElse.hOrElse (do Lean.Parsec.skipChar (Char.ofNat 34) SeqLeft.seqLeft (Lean.Parsec.many (HOrElse.hOrElse (some <$> Lean.Parsec.satisfy fun c => decide (c ≠ Char.ofNat 60 ∧ c ≠ Char.ofNat 38 ∧ c ≠ Char.ofNat 34)) fun x => Lean.Xml.Parser.Reference)) fun x => Lean.Parsec.skipChar (Char.ofNat 34)) fun x => do Lean.Parsec.skipChar (Char.ofNat 39) SeqLeft.seqLeft (Lean.Parsec.many (HOrElse.hOrElse (some <$> Lean.Parsec.satisfy fun c => decide (c ≠ Char.ofNat 60 ∧ c ≠ Char.ofNat 38 ∧ c ≠ Char.ofNat 39)) fun x => Lean.Xml.Parser.Reference)) fun x => Lean.Parsec.skipChar (Char.ofNat 39) pure (Array.foldl (fun s c => match c with | some c => String.push s c | x => s) "" chars 0 (Array.size chars))
Equations
- Lean.Xml.Parser.DefaultDecl = HOrElse.hOrElse (Lean.Parsec.skipString "#REQUIRED") fun x => HOrElse.hOrElse (Lean.Parsec.skipString "#IMPLIED") fun x => SeqRight.seqRight (SeqRight.seqRight (optional (SeqLeft.seqLeft (Lean.Parsec.skipString "#FIXED") fun x => Lean.Xml.Parser.S)) fun x => Lean.Xml.Parser.AttValue) fun x => pure ()
Equations
- Lean.Xml.Parser.AttDef = SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight Lean.Xml.Parser.S fun x => Lean.Xml.Parser.Name) fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.AttType) fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.DefaultDecl
Equations
- Lean.Xml.Parser.AttlistDecl = SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (Lean.Parsec.skipString ") fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.Name) fun x => Lean.Parsec.many Lean.Xml.Parser.AttDef) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 62)
Equations
- Lean.Xml.Parser.PEReference = SeqRight.seqRight (SeqRight.seqRight (Lean.Parsec.skipChar (Char.ofNat 37)) fun x => Lean.Xml.Parser.Name) fun x => Lean.Parsec.skipChar (Char.ofNat 59)
Equations
- Lean.Xml.Parser.EntityValue = do let chars ← HOrElse.hOrElse (do Lean.Parsec.skipChar (Char.ofNat 34) SeqLeft.seqLeft (Lean.Parsec.many (HOrElse.hOrElse (some <$> Lean.Parsec.satisfy fun c => decide (c ≠ Char.ofNat 37 ∧ c ≠ Char.ofNat 38 ∧ c ≠ Char.ofNat 34)) fun x => HOrElse.hOrElse (SeqRight.seqRight Lean.Xml.Parser.PEReference fun x => pure none) fun x => Lean.Xml.Parser.Reference)) fun x => Lean.Parsec.skipChar (Char.ofNat 34)) fun x => do Lean.Parsec.skipChar (Char.ofNat 39) SeqLeft.seqLeft (Lean.Parsec.many (HOrElse.hOrElse (some <$> Lean.Parsec.satisfy fun c => decide (c ≠ Char.ofNat 37 ∧ c ≠ Char.ofNat 38 ∧ c ≠ Char.ofNat 39)) fun x => HOrElse.hOrElse (SeqRight.seqRight Lean.Xml.Parser.PEReference fun x => pure none) fun x => Lean.Xml.Parser.Reference)) fun x => Lean.Parsec.skipChar (Char.ofNat 39) pure (Array.foldl (fun s c => match c with | some c => String.push s c | x => s) "" chars 0 (Array.size chars))
Equations
- Lean.Xml.Parser.NDataDecl = SeqLeft.seqLeft (SeqLeft.seqLeft (SeqRight.seqRight Lean.Xml.Parser.S fun x => Lean.Parsec.skipString "NDATA") fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.Name
Equations
Equations
- Lean.Xml.Parser.GEDecl = SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (Lean.Parsec.skipString ") fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.Name) fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.EntityDef) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 62)
Equations
Equations
- Lean.Xml.Parser.PEDecl = SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (Lean.Parsec.skipString ") fun x => Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 37)) fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.Name) fun x => Lean.Xml.Parser.PEDef) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 62)
Equations
- Lean.Xml.Parser.PublicID = SeqLeft.seqLeft (SeqLeft.seqLeft (Lean.Parsec.skipString "PUBLIC") fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.PubidLiteral
Equations
- Lean.Xml.Parser.NotationDecl = SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (Lean.Parsec.skipString ") fun x => Lean.Xml.Parser.S) fun x => Lean.Xml.Parser.Name) fun x => HOrElse.hOrElse Lean.Xml.Parser.ExternalID fun x => Lean.Xml.Parser.PublicID) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 62)
Equations
- Lean.Xml.Parser.markupDecl = HOrElse.hOrElse Lean.Xml.Parser.elementDecl fun x => HOrElse.hOrElse Lean.Xml.Parser.AttlistDecl fun x => HOrElse.hOrElse Lean.Xml.Parser.EntityDecl fun x => HOrElse.hOrElse Lean.Xml.Parser.NotationDecl fun x => HOrElse.hOrElse Lean.Xml.Parser.PI fun x => SeqRight.seqRight Lean.Xml.Parser.Comment fun x => pure ()
Equations
Equations
Equations
- Lean.Xml.Parser.doctypedecl = do Lean.Parsec.skipString " SeqLeft.seqLeft (SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight Lean.Xml.Parser.S fun x => Lean.Xml.Parser.Name) fun x => optional (SeqRight.seqRight Lean.Xml.Parser.S fun x => Lean.Xml.Parser.ExternalID)) fun x => pure ()) fun x => optional Lean.Xml.Parser.S SeqRight.seqRight (optional (SeqLeft.seqLeft (SeqLeft.seqLeft (SeqRight.seqRight (Lean.Parsec.skipChar (Char.ofNat 91)) fun x => Lean.Xml.Parser.intSubset) fun x => Lean.Parsec.skipChar (Char.ofNat 93)) fun x => optional Lean.Xml.Parser.S)) fun x => Lean.Parsec.skipChar (Char.ofNat 62)
Equations
- Lean.Xml.Parser.prolog = SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (optional Lean.Xml.Parser.XMLdecl) fun x => Lean.Parsec.many Lean.Xml.Parser.Misc) fun x => optional (SeqLeft.seqLeft Lean.Xml.Parser.doctypedecl fun x => Lean.Parsec.many Lean.Xml.Parser.Misc)) fun x => pure ()
Equations
- Lean.Xml.Parser.Attribute = do let name ← Lean.Xml.Parser.Name Lean.Xml.Parser.Eq let value ← Lean.Xml.Parser.AttValue pure (name, value)
Equations
- Lean.Xml.Parser.elementPrefix = do Lean.Parsec.skipChar (Char.ofNat 60) let name ← Lean.Xml.Parser.Name let attributes ← Lean.Parsec.many (SeqRight.seqRight Lean.Xml.Parser.S fun x => Lean.Xml.Parser.Attribute) SeqRight.seqRight (optional Lean.Xml.Parser.S) fun x => pure () pure (Lean.Xml.Element.Element name (Std.RBMap.fromList (Array.toList attributes) compare))
Equations
- Lean.Xml.Parser.EmptyElemTag elem = SeqRight.seqRight (Lean.Parsec.skipString "/>") fun x => pure (elem #[])
Equations
- Lean.Xml.Parser.STag elem = SeqRight.seqRight (Lean.Parsec.skipChar (Char.ofNat 62)) fun x => pure elem
Equations
- Lean.Xml.Parser.ETag = SeqRight.seqRight (SeqRight.seqRight (SeqRight.seqRight (Lean.Parsec.skipString "") fun x => Lean.Xml.Parser.Name) fun x => optional Lean.Xml.Parser.S) fun x => Lean.Parsec.skipChar (Char.ofNat 62)
Equations
Equations
Equations
Equations
Equations
- Lean.Xml.Parser.CharData = SeqRight.seqRight (Lean.Parsec.notFollowedBy (Lean.Parsec.skipString "]]>")) fun x => Lean.Parsec.manyChars (Lean.Parsec.satisfy fun c => decide (c ≠ Char.ofNat 60 ∧ c ≠ Char.ofNat 38))
Equations
Equations
- Lean.Xml.parse s = match Lean.Xml.Parser.document (String.mkIterator s) with | Lean.Parsec.ParseResult.success x res => Except.ok res | Lean.Parsec.ParseResult.error it err => Except.error (toString "offset " ++ toString (Nat.repr it.i) ++ toString ": " ++ toString err ++ toString "\n" ++ toString (String.Iterator.extract (String.Iterator.prevn it 10) it) ++ toString "")