4T      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Helper functions for Parsing. Ivan.Miljenovic@gmail.comA ReadS-like type alias.   For 6-like data structures where the presence of the field / name without a value implies a default value. *Used when quotes are explicitly required; . note that the quotes are not stripped off. 6      !"#$%&   'Definition of the GraphViz attributes. Ivan.Miljenovic@gmail.com Represents '+s that definitely have quotes around them.  !"#$%&'()* Note that , is only valid for Nodes. +,-./0123456789:;<=>?@ABCDENodes and Clusters F Nodes only GNodes and Clusters HNodes and Edges INodes and Edges JNodes and Edges KNodes and Edges LNodes and Edges MNOPQRS,It it assumed that at least one of these is Just{}. TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~GSpecify the root node either as a Node attribute or a Graph attribute. For Graphs only For Nodes only For Nodes only @The number of points in the list must be equivalent to 1 mod 3; " note that this is not checked. +Upper-case first character is major order; / lower-case second character is minor order. -Controls how (and if) edges are represented.  fdp only Sort by cols, sort  by user, number of  rows/cols ,If non-negative, then packs; otherwise doesn't. %The list represent (Separator, Name)  Only when mode=ipsep Only when sfdp is available, Int is non-negative  Either a ( or a .  Only when  mode=ipsep. ,These attributes have been implemented in a  permissive manner: C that is, rather than split them up based on which type of value G they are allowed, they have all been included in the one data type, A with functions to determine if they are indeed valid for what  they're being applied to. To interpret the  Valid for listings:  G Valid for Graphs. C Valid for Clusters. S+ Valid for Sub-Graphs (and also Clusters). N Valid for Nodes. E Valid for Edges. CNote also that the default values are taken from the specification G page listed above, and might not correspond fully with the names of  the permitted values.  Valid for: N; Default: 0.0; Minimum: -MAXFLOAT | -1000  Valid for: N; Default: 0.75; Minimum: 0.01  Valid for: E; Default: 1.0; Minimum: 0(dot) | 1(neato,fdp,sfdp)  Valid for: G; Default: 0.05; Minimum: 0.0; Notes : not dot  Valid for: G; Default: ""  Valid for: N; Notes : write only  Valid for: G; Notes: bitmap output only   Valid for: NEC; Default: ""; Notes: svg, cmap only   Valid for: ENGC; Default: <none>; Notes: svg, map only   Valid for: E; Default: ""; Notes: svg, cmap only   Valid for: E; Default: <none>; Notes: svg, map only   Valid for: E; Default : center  Valid for: E; Default: ""  Valid for: E; Default: true  Valid for: E; Default: ""; Notes: svg, map only  Valid for: G; Default: ""; Notes : svg only  Valid for: ENC  Valid for: G; Default: ""; Notes: fdp, neato only  Valid for: G  Valid for: GCN; Default: 0; Minimum: 0  Valid for: G; Default: "none"; Notes : sfdp only  Valid for: N; Default: 0.0; Minimum : -100.0  Valid for: G  Valid for: N; Default: 4; Minimum: 0  Valid for: ENG; Default: 0; Minimum: 0; Notes : dot only  Valid for: N; Default: ""  Valid for: N; Default : ellipse  Valid for: G; Default: +4; Notes : not dot  Valid for: G; Default: 30; Notes : dot only  Valid for: N; Default): 8(output) | 20(overlap and image maps)   Valid for: E; Default: ""; Notes : dot only ! Valid for: E; Default: ""; Notes : dot only " Valid for: G; Default: 0 # Valid for: GN; Default: ""(graphs) | false(nodes); Notes: circo, twopi only $ Valid for: G; Default: 96.0 | 0.0; Notes: svg, bitmap output only % Valid for: G; Default: 1.0; Minimum: 0.0; Notes : sfdp only & Valid for: G; Default : false; Notes : dot only ' Valid for: N; Default: false ( Valid for: N; Notes : write only ) Valid for: G * Valid for: G; Default: 0.5(dot) | 1.0(twopi); Minimum: 0.02; Notes: twopi, dot only + Valid for: G; Default: TB; Notes : dot only , Valid for: S; Notes : dot only - Valid for: G; Default: 0.0; Minimum: 0.0 . Valid for: G; Default: "normal"; Notes : sfdp only / Valid for: EN 0 Valid for: N; Default : false; Notes: fdp, neato only 1 Valid for: NC; Default&: shape default(nodes) | 1(clusters); Minimum: 0 2 Valid for: CNE; Default: 1.0; Minimum: 0.0 3 Valid for: C; Default: black 4 Valid for: G; Default: BL 5 Valid for: G 6 Valid for: G; Default: 0.0555 (4 points) 7 Valid for: G; Default: node; Notes : not dot 8 Valid for: G; Default : false; Notes : not dot 9 Valid for: G; Default: -4; Minimum : -1.0e10; Notes : prism only : Valid for: G; Default: true; Notes : not dot ; Valid for: G; Default: breadthfirst < Valid for: G; Default: ""; Notes: Landscape if "[lL]*" and rotate not defined = Valid for: N; Default: 0.0; Minimum: 360.0 > Valid for: G; Default: ""; Notes : dot only ? Valid for: G; Notes : dot only @ Valid for: G; Notes : dot only A Valid for: G; Default : false; Notes : not dot B Valid for: GCNE; Default: false C Valid for: G; Default: 0.25; Minimum: 0.02; Notes : dot only D Valid for: G; Default : false; Notes*: neato only; requires the Mosek software E Valid for: G; Default: " shortpath"; Notes : neato only F Valid for: G; Default: "major"; Notes : neato only G Valid for: E; Default: 1; Minimum: 0; Notes : dot only H Valid for: G; Default: 1.0; Minimum: 0.0; Notes : circo only I Valid for: G; Default: 1.0; Notes : dot only J Valid for: G; Default: 100 * #4 nodes(mode == KK) | 200(mode == major) | 600(fdp); Notes: fdp, neato only K Valid for: NG; Default: <device-dependent> L Valid for: E; Default: ""; Notes : dot only M Valid for: EGC; Notes : write only N Valid for: E; Default: ""; Notes : dot only O Valid for: G; Default: 0.0; Notes : neato only P Valid for: G; Default : MAXINT; Minimum: 0.0; Notes : sfdp only Q Valid for: E; Default : 1.0(neato) 0.3(fdp); Notes/: fdp, neato only R Valid for: G; Default: "" S Valid for: G; Default: " :t" T Valid for: G; Default: "" U Valid for: EN; Default: "" V Valid for: G; Default: false W Valid for: E; Default: ""; Notes: svg, cmap only X Valid for: E; Default: <none>; Notes: svg, map only Y Valid for: GCN; Default: "t" (clusters) | "b"(root graphs) | "c" (clusters) Z Valid for: GC; Default: "c" [ Valid for: E; Default: 14.0; Minimum: 1.0 \ Valid for: E; Default: " Times-Roman" ] Valid for: E; Default: black ^ Valid for: E; Default: false _ Valid for: E; Default: 1.0; Minimum: 0.0 ` Valid for: E; Default : -25.0; Minimum : -180.0 a Valid for: E; Default: ""; Notes: svg, map only b Valid for: ENGC; Default: "N" (nodes) Nothing | "" (otherwise) Nothing c Valid for: N; Default: false d Valid for: N; Default: "" e Valid for: GNE; Default: ""; Notes: svg, postscript, map only f Valid for: N; Default: 0.5; Minimum: 0.02 g Valid for: E; Default: ""; Notes: svg, cmap only h Valid for: E; Default: <none>; Notes: svg, map only i Valid for: E; Default : center j Valid for: E; Default: "" k Valid for: E; Default: true l Valid for: E; Default: ""; Notes: svg, map only m Valid for: N; Default: ""; Notes : dot only n Valid for: ENGC; Default: 14.0; Minimum: 1.0 o Valid for: G; Default: system-dependent p Valid for: G; Default: ""; Notes : svg only q Valid for: ENGC; Default: " Times-Roman" r Valid for: ENGC; Default: black s Valid for: N; Default: false t Valid for: NC; Default%: lightgrey(nodes) | black(clusters) u Valid for: G; Default: +3; Notes : not dot v Valid for: G; Default : .0001 * #+ nodes(mode == KK) | .0001(mode == major); Notes : neato only w Valid for: E; Default: ""; Notes: svg, cmap only x Valid for: E; Default: <none>; Notes: svg, map only y Valid for: E; Default: ""; Notes: svg, map only z Valid for: G; Default: 96.0 | 0.0; Notes: svg, bitmap output only { Valid for: N; Default: 0.0; Minimum : -100.0 | Valid for: G; Default : false; Notes : neato only } Valid for: E; Default: forward(directed)/none(undirected) ~ Valid for: G; Default: 2; Minimum: 2; Notes: sfdp, fdp, neato only  Valid for: G; Default: 2; Minimum: 2; Notes: sfdp, fdp, neato only  Valid for: G; Default: 1+(avg. len)*sqrt(|V|); Minimum : epsilon; Notes : neato only  Valid for: E; Default: false  Valid for: E; Default: true; Notes : dot only  Valid for: G; Default: false  Valid for: G; Default : false; Notes : dot only  Valid for: ENG; Default: ""  Valid for: ENCG; Default: ""  Valid for: ENC; Default: black  Valid for: G; Default : local; Notes : dot only  Valid for: G; Default: "UTF-8"  Valid for: G; Default: false  Valid for: GC; Default: <none>  Valid for: G; Notes : write only  Valid for: G; Notes : dot only  Valid for: E; Default : Normal  Valid for: E; Default: 1.0; Minimum: 0.0  Valid for: E; Default : Normal  Valid for: ENGC; Default: <none>; Notes: svg, postscript, map only  Valid for: GC; Default: 0.3; Minimum: 0; Notes: sfdp, fdp only  Valid for: G; Default: 0.99; Minimum: 0.0; Notes : neato only :Determine if this Attribute is valid for use with Graphs. <Determine if this Attribute is valid for use with Clusters. =Determine if this Attribute is valid for use with SubGraphs. 9Determine if this Attribute is valid for use with Nodes. 9Determine if this Attribute is valid for use with Edges.  Fold over s.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!      ~]}|{zyxwvutsrqponmlkjihgfedcba`_^U\[ZYXWVSTORQPMNDLKJIHGFEBC7A@?>=<;:98123456.0/*-,+$)('&% #"! #"!!"#$)('&%%&'()*-,++,-.0//0123456234567 A@?>=<;:9889:;<=>?@ABCCDLKJIHGFEEFGHIJKLMNNORQPPQRSTTU\[ZYXWVVWXYZ[\] }|{zyxwvutsrqponmlkjihgfedcba`_^^_`abcdefghijklmnopqrstuvwxyz{|}~~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!            !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"Definition of the GraphViz types. Ivan.Miljenovic@gmail.com) An edge in .  A node in ) is either a singular node, or a cluster 2 containing nodes (or more clusters) within it. + At the moment, clusters are not parsed. 4The internal representation of a graph in Dot form. )A strict graph disallows multiple edges. Check if all the  Attributes are being used correctly. Return all those  Attribute s which aren't being used properly. )*+5Parse a limited subset of the Dot language to form a  # (that is, the caveats listed in Data.GraphViz.Attributes aside, @ Dot graphs are parsed if they match the layout of DotGraph). ,-. Prefix each ' with a tab character. /01   $Functions to run GraphViz commands. Ivan.Miljenovic@gmail.com53The possible Graphviz outputs, obtained by running  dot -Txxx. C Note that it is not possible to choose between output variants, > and that not all of these may be available on your system. 9This will probably be improved in future. For now, more " information is available from:   (http://graphviz.org/doc/info/output.html !The available Graphviz commands. )The default command for directed graphs. +The default command for undirected graphs. @The appropriate (default) GraphViz command for the given graph. FRun the recommended Graphviz command on this graph, saving the result 3 to the file provided (note: file extensions are not checked).  Returns True if successful, False otherwise. ARun the chosen Graphviz command on this graph, saving the result 3 to the file provided (note: file extensions are not checked).  Returns True if successful, False otherwise. JRun the chosen Graphviz command on this graph, but send the result to the ' given handle rather than to a file.  The result is wrapped in 2 rather than throwing an error. 3 This function is taken from the mohws project, available under a = 3-Clause BSD license. The actual function is taken from:   )http://code.haskell.org/mohws/src/Util.hs > It provides an efficient way of transferring data from one 4  to another. 444'1Definition of the clustering types for GraphViz. Ivan.Miljenovic@gmail.com5$A tree representation of a cluster. 675Define into which cluster a particular node belongs. + Nodes can be nested to arbitrary depth. 8 Create the s for the given graph. 9<Convert a single node cluster into its tree representation. :Two nodes are in the same default" cluster; otherwise check if they  are in the same cluster. ;FSingleton nodes come first, and then ordering based upon the cluster. <Extract the sub-trees. =Combine clusters. >5Convert the cluster representation of the trees into s. " Clusters will be labelled with ?s. @'Start labelling the clusters with this ?. A Convert this 5 into its  representation. 88GraphViz bindings for Haskell. Ivan.Miljenovic@gmail.comB8Determine if the given graph is undirected or directed. Convert a graph to GraphViz's Dot format. Convert a graph to Dot1 format, using the specified clustering function ! to group nodes into clusters. . Clusters can be nested to arbitrary depth. =Run the graph via dot to get positional information and then : combine that information back into the original graph.  Note that this doesn' t support graphs with clusters. Pass the plain graph through . This is an IO action,  however since the state doesn' t change it's safe to use C ) to convert this to a normal function.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ D      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ 8    Td !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                         !"#$%&'()*+,- ./0 123456789:;<#=>?@ ABCgraphviz-2999.1.0.2Data.GraphViz.ParserCombinatorsData.GraphViz.AttributesData.GraphViz.TypesData.GraphViz.Commands Data.GraphVizData.GraphViz.Types.Clustering Parseableparse parseListParse stringBlock quotedString parseAndSpacestringstrings hasStringchar whitespace whitespace'optionalQuotedStringoptionalQuoted quotedParsenewline skipToNewline parseFieldparseBoolField parseFieldDefcommaSep commaSep' QuotedStringQSqStrRatios AutoRatio ExpandRatio CompressRatio FillRatio AspectRatio JustificationJCenterJRightJLeft ScaleTypeFillBoth FillHeight FillWidthNoScale UniformScaleVerticalPlacementVBottomVCenterVTop FocusType NodeFocusXYViewPortVPwValhValzValfocus CompassPointNoCP CenterPoint NorthWestWest SouthWestSouth SouthEastEast NorthEastNorthPortPosPP StyleNameRounded DiagonalsFilled InvisibleBoldSolidDottedDashedStyleStlSTStyleRandomSelf RegularStyle StartTypeST SmoothTypeTriangleSmoothSpringRNG PowerDist GraphDistAvgDistNoSmoothShape ComponentBox3dFolderTabNoteNoShape RectangleMcircleMsquareMdiamondInvhouse Invtrapezium Invtriangle Tripleoctagon Doubleoctagon DoublecircleOctagonSeptagonHexagonPentagonHouse Parallelogram Trapezium DiamondShape PlaintextTriangleEgg PointShapeCircleEllipsePolygonBoxShapeRankDir FromRight FromBottomFromLeftFromTopRankTypeSinkRankMaxRank SourceRankMinRankSameRankRootNodeName NotCentral IsCentralQuadTypeNoQTFastQTNormalQTSplinePageDirLtLbRtRbTrTlBrBlEdgeType CompoundEdgePolyLineNoEdges LineEdges SplineEdgesPos SplinePosPointPosPackMode PackArray PackGraph PackClustPackNodePack PackMarginDontPackDoPack OutputMode EdgesFirst NodesFirst BreadthFirst LayerListLLLayerIDLRNameLRInt AllLayers LayerRangeLRSLRIDOverlap IpsepOverlap VpscOverlapCompressOverlap PrismOverlapScaleXYOverlaps ScaleOverlapsRemoveOverlaps KeepOverlapsPointPointDLabelURLLabelStrLabelDPointPValDVal DEConstraintsHierDEBoolDirTypeNoDirBothBackForward ClusterMode NoClusterGlobalLocalColor ColorNameHSVhue saturationvalueRGBAalphaRGBredgreenblueRect AspectTypeRatioPassCount RatioOnly ArrowTypeVeeHalfOpenOpenOBoxBoxCrowEDiamondODiamondDiamondInvEmptyEmptyTeeNoArrowInvODotODotInvDotDotArrowInvNormalURLUStr urlString AttributeZWidthWeight VoroMarginVertices TrueColorTooltipTarget TailTooltip TailTargetTailPort TailLabelTailClipTailURL StyleSheetStartSplinesSortV SmoothingSkewSizeSides ShowBoxes ShapeFileSep SearchSize SamplePointsSameTailSameHeadRotate ResolutionRepulsiveForce ReMinCrossRegularRectsRatioRanksepRankQuantumQuadTreePin PeripheriesPenWidthPenColorPagePadOverlapScaling OutputOrderOrientationGraph OrientationOrderingNslimit1Nslimit Normalize NoJustifyNodeSepMosekModelModeMinLenMinDistMCLimitMaxIterMarginLTailLPLHead LevelsGapLevelsLenLayoutLayerSepLayersLayer Landscape LabelTooltip LabelTargetLabelLoc LabelJust LabelFontSize LabelFontNameLabelFontColor LabelFloat LabelDistance LabelAngleLabelURL ImageScaleImageIDHeight HeadTooltip HeadTargetHeadPort HeadLabelHeadClipHeadURLGroupFontSizeFontPath FontNamesFontName FontColor FixedSize FillColorESepEpsilon EdgeTooltip EdgeTargetEdgeURLDPI DistortionDirEdgeConstraintsDirDimenDim DefaultDistDecorate Constraint ConcentrateCompoundComment ColorScheme ClusterRankCharsetCenterBgColorBbAspect ArrowTail ArrowSize ArrowHeadKDamping usedByGraphsusedByClustersusedBySubGraphs usedByNodes usedByEdges showColor showWord8Pad parseColor showPoint parsePoint parseLayerSep defLayerSepparseLayerName showSpline parseSplineboolDotEdgeedgeHeadNodeIDedgeTailNodeIDedgeAttributes directedEdgeDotNode DotCluster clusterIDclusterAttributes clusterElemsnodeIDnodeAttributesGraphIDHTMLQStrNumStrDotGraph strictGraph directedGraphgraphIDgraphAttributes graphNodes graphEdges makeStrictsetID isValidGraphinvalidAttributes parseDotGraphGraphvizOutputXlibXdotWbmpVtxVrmlVmlzVmlTkSvgzSvgPs2PsPngPlainExtPlainPicPdfPclMpMifJpgJpegJpeIsmapImap_npImapHpglGtkGifGd2GdFigEps DotOutputDiaCmapx_npCmapxCmapCanonGraphvizCommandFdpCircoTwoPiNeatoDot dirCommand undirCommand commandFor runGraphvizrunGraphvizCommandgraphvizWithHandle NodeClusterCN AttributeEdge AttributeNode graphToDotclusterGraphToDot graphToGraph dotizeGraphword parseSignedparseInt parseFloatnoneOfghc-primGHC.BoolBool $fParseable[] polyparse-1.4 Text.ParserCombinators.Poly.Lazyreparsesatisfyeofnext runParserPParserSuccessFailure CommittedResult Text.ParserCombinators.Poly.Base manyFinallybracket bracketSepsepBy1sepBymany1manyexactlyoptionalindentoneOf adjustErrBaddiscardfailBadapplyoneOf'onFail adjustErrcommit PolyParsebaseGHC.BaseString GHC.TypesDoubleinvalidGraphAttributesdirGraph undirGraphinvalidNodeAttributes nodesToStringaddTabsinvalidEdgeAttributesdirEdge undirEdge Data.MaybeMaybesquirtGHC.IO.Handle.TypesHandle ClusterTreeCTNTclustersToNodes clustToTree sameClust clustOrdergetNodescollapseNClusts treesToNodesInttreesToNodesFrom treeToNodeisUndirGHC.IOunsafePerformIO