autoproof-0.0.0.0: Propositional logic library
Copyright(c) Artem Mavrin 2021
LicenseBSD3
Maintainerartemvmavrin@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

AutoProof.Internal.Utils.Parser.Combinator

Description

Defines parser combinators.

Synopsis

Documentation

between :: Parser b -> Parser c -> Parser a -> Parser a Source #

(between open close p) runs open, then p, then close, returning the value parsed by p.

sepBy :: Parser a -> Parser b -> Parser [a] Source #

(sepBy p sep) runs zero or more occurrences of p, separated by sep, returning the list of values parsed by p.

sepBy1 :: Parser a -> Parser b -> Parser [a] Source #

(sepBy1 p sep) runs one or more occurrences of p, separated by sep, returning the list of values parsed by p.

chainl1 :: Parser a -> Parser (a -> a -> a) -> Parser a Source #

(chainl1 p op) runs one or more occurrences of p, separated by op, returning the value obtained by a left-associative application of the functions parsed by op to the values parsed by p.

chainr1 :: Parser a -> Parser (a -> a -> a) -> Parser a Source #

(chainr1 p op) runs one or more occurrences of p, separated by op, returning the value obtained by a right-associative application of the functions parsed by op to the values parsed by p.

notFollowedBy :: Parser a -> Parser () Source #

(notFollowedBy p) succeeds if and only if p fails.

eof :: Parser () Source #

(eof) (end-of-file) only succeeds at the end of input.