parsek-1.0.3.0: Parallel Parsing Processes

Safe HaskellSafe
LanguageHaskell2010

Text.ParserCombinators.Class

Synopsis

Documentation

class (Monad p, Alternative p) => IsParser p where Source #

Parser class

Associated Types

type SymbolOf p Source #

Methods

satisfy Source #

Arguments

:: (SymbolOf p -> Bool) 
-> p (SymbolOf p)

accept a symbol satisfying a given predicate

look Source #

Arguments

:: p [SymbolOf p]

access the stream of symbols from the current point

label Source #

Arguments

:: String 
-> p a 
-> p a

label the parser

(<<|>) infixr 3 Source #

Arguments

:: p a 
-> p a 
-> p a

Left-biased choice.

Instances
IsParser Parser Source # 
Instance details

Defined in Text.ParserCombinators.Parsek.Position

Associated Types

type SymbolOf Parser :: Type Source #

IsParser (Parser s) Source # 
Instance details

Defined in Text.ParserCombinators.Parsek

Associated Types

type SymbolOf (Parser s) :: Type Source #

Methods

satisfy :: (SymbolOf (Parser s) -> Bool) -> Parser s (SymbolOf (Parser s)) Source #

look :: Parser s [SymbolOf (Parser s)] Source #

label :: String -> Parser s a -> Parser s a Source #

(<<|>) :: Parser s a -> Parser s a -> Parser s a Source #

(<?>) :: IsParser p => p a -> String -> p a infix 2 Source #

Label a parser

char :: (IsParser p, Eq (SymbolOf p), Show (SymbolOf p)) => SymbolOf p -> p (SymbolOf p) Source #

noneOf :: (IsParser p, SymbolOf p ~# Char) => [Char] -> p Char Source #

oneOf :: (IsParser p, SymbolOf p ~# Char) => [Char] -> p Char Source #

spaces :: (IsParser p, SymbolOf p ~# Char) => p () Source #

space :: (IsParser p, SymbolOf p ~# Char) => p Char Source #

tab :: (IsParser p, Eq (SymbolOf p), Show (SymbolOf p), SymbolOf p ~# Char) => p Char Source #

upper :: (IsParser p, SymbolOf p ~# Char) => p Char Source #

lower :: (IsParser p, SymbolOf p ~# Char) => p Char Source #

digit :: (IsParser p, SymbolOf p ~# Char) => p Char Source #

choice :: Alternative f => [f a] -> f a Source #

option :: Alternative f => a -> f a -> f a Source #

between :: Applicative m => m x -> m y -> m a -> m a Source #

manyGreedy :: IsParser m => m a -> m [a] Source #

Greedy repetition: match as many occurences as possible of the argument.

skipMany1 :: Alternative f => f a -> f () Source #

skipMany :: Alternative f => f a -> f () Source #

sepBy :: Alternative f => f a1 -> f a2 -> f [a1] Source #

sepBy1 :: Alternative f => f a1 -> f a2 -> f [a1] Source #

count :: Applicative m => Int -> m a -> m [a] Source #

chainr :: (Alternative f, Monad f) => f a -> f (a -> a -> a) -> a -> f a Source #

chainl :: (Alternative f, Monad f) => f a -> f (a -> a -> a) -> a -> f a Source #

chainr1 :: (Monad f, Alternative f) => f t -> f (t -> t -> t) -> f t Source #

chainl1 :: (Alternative m, Monad m) => m b -> m (b -> b -> b) -> m b Source #

munch :: IsParser m => (SymbolOf m -> Bool) -> m [SymbolOf m] Source #

munch1 :: IsParser m => (SymbolOf m -> Bool) -> m [SymbolOf m] Source #

endOfFile :: IsParser p => p () Source #