alex
Safe HaskellSafe-Inferred
LanguageHaskell2010

ParseMonad

Synopsis

Documentation

type AlexInput = (AlexPosn, Char, [Byte], String) Source #

data AlexPosn Source #

Constructors

AlexPn !Int !Int !Int 

Instances

Instances details
Show AlexPosn Source # 
Instance details

Defined in ParseMonad

Eq AlexPosn Source # 
Instance details

Defined in ParseMonad

Ord AlexPosn Source # 
Instance details

Defined in ParseMonad

data Warning Source #

Constructors

WarnNullableRExp 

Fields

warnIfNullable Source #

Arguments

:: RExp

Regular expression.

-> AlexPosn

Position associated to regular expression.

-> P () 

Add a warning if given regular expression is nullable unless the user wrote the regex Eps.

data P a Source #

Instances

Instances details
Applicative P Source # 
Instance details

Defined in ParseMonad

Methods

pure :: a -> P a #

(<*>) :: P (a -> b) -> P a -> P b #

liftA2 :: (a -> b -> c) -> P a -> P b -> P c #

(*>) :: P a -> P b -> P b #

(<*) :: P a -> P b -> P a #

Functor P Source # 
Instance details

Defined in ParseMonad

Methods

fmap :: (a -> b) -> P a -> P b #

(<$) :: a -> P b -> P a #

Monad P Source # 
Instance details

Defined in ParseMonad

Methods

(>>=) :: P a -> (a -> P b) -> P b #

(>>) :: P a -> P b -> P b #

return :: a -> P a #

runP Source #

Arguments

:: String

Input string.

-> (Map String CharSet, Map String RExp)

Character set and regex definitions.

-> P a

Parsing computation.

-> Either ParseError ([Warning], a)

List of warnings in first-to-last order, result.

Run the parser on given input.

newRMac :: String -> RExp -> P () Source #