next node: ParserLMap,
prev node: ParserL,
up to node: Subsystem Parser Light


ParserLCompose

Signature of ParserLCompose

List of Import References :
See BOOL
See Char
See DENOTATION
See Nat
See Option
See ParserL
See Seq
See String
See Void

SIGNATURE ParserLCompose[data1, data2]

$Date: 2010-09-30 18:24:17 +0200 (Do, 30. Sep 2010) $ ($Revision: 616 $)

Parameter

SORT data1 data2

Imports

IMPORT ParserL[data1] ONLY parser
       ParserL[data2] ONLY parser
       Option[data1] ONLY option
       ParserL[void] ONLY parser
       Void ONLY void

Monadic functions

in P1 & fP2 fP2 is called if P1 succeeds. If P1 fails, the result is failure

FUN & : parser[data1] ** (data1 -> parser[data2]) -> parser[data2]

in P1 ; fP2 fP2 is always called and determines the result.

FUN ; : parser[data1] ** (option[data1] -> parser[data2]) -> parser[data2]

variants call a parser[void] before calling the second real parser

in P1 & (SEP, fP2) fP2 is called if P1 and SEP both succeed. If P1 fails or SEP fails, the result is failure

FUN & : parser[data1] ** parser[void] ** 
        (data1 -> parser[data2]) -> parser[data2]

in P1 ; (SEP, fP2) fP2 is called if P1 fails, or P1 and SEP both succeed. If P1 succeeds and SEP fails, the result is failure

FUN ; : parser[data1] ** parser[void] ** 
        (option[data1] -> parser[data2]) -> parser[data2]


next node: ParserLMap,
prev node: ParserL,
up to node: Subsystem Parser Light