License | GPL-3 |
---|---|
Maintainer | Marcelo Garlet Millani <marcelogmillani@gmail.com> |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Parsing function and abstract syntax tree for the DOT language.
The parser is implemented using happy
, and so is fairly fast.
Synopsis
- parse :: [Char] -> Either String (Bool, GraphType, Maybe Name, [Statement])
- data GraphType
- data Name
- data Statement
- = EdgeStatement [Subgraph] [(Name, Name)]
- | NodeStatement Name (Maybe Port) [(Name, Name)]
- | SubgraphStatement Subgraph
- | AttributeStatement (Name, Name)
- | EdgeAttribute [(Name, Name)]
- | NodeAttribute [(Name, Name)]
- | GraphAttribute [(Name, Name)]
- data Subgraph
- data Port = Port (Maybe Name) (Maybe Compass)
- data Compass
Documentation
parse :: [Char] -> Either String (Bool, GraphType, Maybe Name, [Statement]) Source #
Parse a graph written in the DOT language.
EdgeStatement [Subgraph] [(Name, Name)] | |
NodeStatement Name (Maybe Port) [(Name, Name)] | |
SubgraphStatement Subgraph | |
AttributeStatement (Name, Name) | |
EdgeAttribute [(Name, Name)] | |
NodeAttribute [(Name, Name)] | |
GraphAttribute [(Name, Name)] |