Package parser-all-def: Definition of the whole stream parser

Information

nameparser-all-def
version1.85
descriptionDefinition of the whole stream parser
authorJoe Leslie-Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2014-06-12
requiresbool
option
pair
parser-comb
parser-stream
showData.Bool
Data.Option
Data.Pair
Parser
Parser.Stream

Files

Defined Constant

Theorems

p. parseStream p eof = eof

p. parseStream p error = error

p a s.
    parseStream p (cons a s) =
    case destParser p a s of
      none error
    | some (b, s') cons b (parseStream p s')

External Type Operators

External Constants

Assumptions

() = λp. p ((select) p)

t. (λx. t x) = t

() = λp. p = λx.

t. t t

t. t

() = λp q. p q p

b f. case b f none = b

p x. p x p ((select) p)

x. a b. x = (a, b)

x. x = none a. x = some a

() = λp q. (λf. f p q) = λf. f

e b f. case e b f eof = b

e b f. case e b f error = e

() = λp. q. (x. p x q) q

b f a. case b f (some a) = f a

() = λp q. r. (p r) (q r) r

s s'. isSuffix s s' s = s' isProperSuffix s s'

f. fn. a b. fn (a, b) = f a b

r. (x. y. r x y) f. x. r x (f x)

s a s'. isProperSuffix s (cons a s') s = s' isProperSuffix s s'

x. x = error x = eof a0 a1. x = cons a0 a1

e b f a s. case e b f (cons a s) = f a s

p q. (x. p x q x) (x. p x) x. q x

p a s b s'. destParser p a s = some (b, s') isSuffix s' s

a0 a1 a0' a1'. cons a0 a1 = cons a0' a1' a0 = a0' a1 = a1'

h.
    (f g s. (s'. isProperSuffix s' s f s' = g s') h f s = h g s)
    f. s. f s = h f s