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

Information

nameparser-all-def
version1.29
descriptionDefinition of the whole stream parser
authorJoe Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2011-11-29
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

T

() = λP. P ((select) P)

t. (λx. t x) = t

() = λp. p = λx. T

t. T t t

t. t T T

() = λp q. p q p

b f. case b f none = b

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

p. x y. p = (x, y)

x. x = none a. x = some a

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

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