graphviz-2999.6.0.0: GraphViz bindings for Haskell.




This module defines simple helper functions for use with Text.ParserCombinators.Poly.Lazy.

Note that the ParseDot 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 Data.GraphViz.Types.DotGraph, you should use Data.GraphViz.Types.parseDotGraph rather than its ParseDot instance.


Re-exporting pertinent parts of Polyparse.

The ParseDot class.

type Parse a = Parser Char aSource

A ReadS-like type alias.

Convenience parsing combinators.

quotedString :: Parse StringSource

Used when quotes are explicitly required;

parseStrictFloat :: RealFrac a => Parse aSource

Parse a floating point number that actually contains decimals.

noneOf :: Eq a => [a] -> Parser a aSource

newline' :: Parse ()Source

Consume all whitespace and newlines until a line with non-whitespace is reached. The whitespace on that line is not consumed.

skipToNewline :: Parse StringSource

Parses and returns all characters up till the end of the line, then skips to the beginning of the next line.

parseFieldDef :: ParseDot a => a -> String -> Parse aSource

For Bool-like data structures where the presence of the field name without a value implies a default value.

commaSep' :: Parse a -> Parse b -> Parse (a, b)Source


preprocess :: String -> StringSource

Remove unparseable features of Dot, such as comments and multi-line strings (which are converted to single-line strings).