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

Information

nameparser-all-def
version1.43
descriptionDefinition of the whole stream parser
authorJoe Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2012-03-08
requiresbool
pair
option
parser-stream
parser-comb
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 (stream a s) =
    case destParser p a s of
      none error
    | some (b, s') stream b (parseStream p s')

Input Type Operators

Input 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)

xy. x y. xy = (x, y)

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'

PAIR'. fn. a0 a1. fn (a0, a1) = PAIR' a0 a1

p. (x. y. p x y) y. x. p x (y x)

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

x. x = error x = eof a0 a1. x = stream a0 a1

e b f a s. case e b f (stream 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'. stream a0 a1 = stream 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