| Portability | non-portable (TypeSynonymInstances, FlexibleInstances) |
|---|---|
| Stability | unstable |
| Maintainer | Marco Túlio Pimenta Gontijo <marcotmarcot@gmail.com> |
| Safe Haskell | None |
Test.Chuchu.Parser
Description
This modules provides some utility parsers for creating step rules.
- data ChuchuParser a
- number :: ChuchuParser Double
- int :: ChuchuParser Integer
- text :: ChuchuParser Text
- wildcard :: Text -> ChuchuParser Text
- email :: ChuchuParser Text
- try :: ChuchuParser a -> ChuchuParser a
Documentation
data ChuchuParser a Source
newtype for Parsec's Parser used on this library. The
main reason for not using Parser directly is to be able to
define the IsString instance.
Instances
number :: ChuchuParser DoubleSource
Parses a floating point number, with the same syntax as accepted by Haskell.
int :: ChuchuParser IntegerSource
Parses an integer.
text :: ChuchuParser TextSource
Parses a quoted string, with the same syntax as accepted by Haskell.
wildcard :: Text -> ChuchuParser TextSource
Parses anything until the string passed as parameter, and also the string.
email :: ChuchuParser TextSource
Parses a simplified e-mail address and return everything that was parsed as
a simple Text. This is a very simplified parser for e-mail, which does
not follow RFC5322. Basically, it parses TEXT@TEXT, where TEXT is
alphaNum <|> oneOf "!#$%&'*+-/=?^_`{|}~.".
try :: ChuchuParser a -> ChuchuParser aSource
Same as Parsec's try but for ChuchuParser.