Maintainer | [email protected] |
---|
Data.GraphViz.ParserCombinators
Description
This module defines simple helper functions for use with Text.ParserCombinators.Poly.Lazy.
Note that the Parseable
instances for Bool
, etc. match those
specified for use with GraphViz (e.g. non-zero integers are
equivalent to True
).
You should not be using this module; rather, it is here for
informative/documentative reasons. If you want to parse a
, you should use
Data.GraphViz.Types.DotGraph
rather than its Data.GraphViz.Types.parseDotGraph
Parseable
instance.
- module Text.ParserCombinators.Poly.Lazy
- type Parse a = Parser Char a
- class Parseable a where
- stringBlock :: Parse String
- quotedString :: Parse String
- parseAndSpace :: Parse a -> Parse a
- string :: String -> Parse String
- strings :: [String] -> Parse String
- hasString :: String -> Parse Bool
- char :: Char -> Parse Char
- whitespace :: Parse String
- whitespace' :: Parse String
- optionalQuotedString :: String -> Parse String
- optionalQuoted :: Parse a -> Parse a
- quotedParse :: Parse a -> Parse a
- newline :: Parse String
- skipToNewline :: Parse ()
- parseField :: Parseable a => String -> Parse a
- parseBoolField :: String -> Parse Bool
- parseFieldDef :: Parseable a => a -> String -> Parse a
- commaSep :: (Parseable a, Parseable b) => Parse (a, b)
- commaSep' :: Parse a -> Parse b -> Parse (a, b)
Documentation
Instances
parseAndSpace :: Parse a -> Parse aSource
optionalQuoted :: Parse a -> Parse aSource
quotedParse :: Parse a -> Parse aSource
parseField :: Parseable a => String -> Parse aSource
parseBoolField :: String -> Parse BoolSource