]> Git — Sourcephile - haskell/symantic-parser.git/blob - parsers/Parsers/Utils/Attoparsec/Text.hs
add benchmarks
[haskell/symantic-parser.git] / parsers / Parsers / Utils / Attoparsec / Text.hs
1 module Parsers.Utils.Attoparsec.Text
2 ( module Parsers.Utils.Attoparsec.Text
3 , module Data.Attoparsec.Text
4 ) where
5
6 import Data.Attoparsec.Combinator
7 import Data.Attoparsec.Text
8 import Data.Char (Char)
9 import Data.Function ((.))
10 import Data.Text (Text)
11 import qualified Data.Attoparsec.Text as AP.Text
12
13 token :: Text -> AP.Text.Parser Text
14 token = try . AP.Text.string
15
16 oneOf :: [Char] -> AP.Text.Parser Char
17 oneOf = AP.Text.satisfy . AP.Text.inClass
18
19 noneOf :: [Char] -> AP.Text.Parser Char
20 noneOf = AP.Text.satisfy . AP.Text.notInClass