Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Deterministic parsers can be restricted to succeed with a single parsing result.
Synopsis
- class Parsing m => DeterministicParsing m where
Documentation
class Parsing m => DeterministicParsing m where Source #
Combinator methods for constructing deterministic parsers, i.e., parsers that can succeed with only a single result.
Nothing
(<<|>) :: m a -> m a -> m a infixl 3 Source #
Left-biased choice: if the left alternative succeeds, the right one is never tried.
takeOptional :: m a -> m (Maybe a) Source #
Like optional
, but never succeeds with Nothing
if the argument parser can succeed.
takeMany :: m a -> m [a] Source #
Like many
, but always consuming the longest matching sequence of input.
takeSome :: m a -> m [a] Source #
Like some
, but always consuming the longest matching sequence of input.
concatAll :: Monoid a => m a -> m a Source #
Like concatMany
, but always consuming the longest matching sequence of input.
skipAll :: m a -> m () Source #
Like skipMany
, but always consuming the longest matching sequence of input.