public class NodeAndSubgraphParser extends DOTBaseListener
BaseListener for the first iteration of parsing DOT files. This listener parses all nodes and subgraphs from the DOT graph.
Modifier and Type | Class and Description |
---|---|
class |
NodeAndSubgraphParser.Node
For each node in the input file, an object of type Node is created and stored in the nodes map.
|
Constructor and Description |
---|
NodeAndSubgraphParser() |
Modifier and Type | Method and Description |
---|---|
void |
enterGraph(DOTParser.GraphContext ctx)
Enter a parse tree produced by
DOTParser.graph() . |
void |
enterNode_id(DOTParser.Node_idContext ctx)
Enter a parse tree produced by
DOTParser.node_id() . |
void |
enterSubgraph(DOTParser.SubgraphContext ctx)
Enter a parse tree produced by
DOTParser.subgraph() . |
void |
exitSubgraph(DOTParser.SubgraphContext ctx)
Exit a parse tree produced by
DOTParser.subgraph() . |
java.util.Map<NodeAndSubgraphParser.Node,java.util.Set<NodeAndSubgraphParser.Node>> |
getEdges() |
java.util.Map<java.lang.String,NodeAndSubgraphParser.Node> |
getNodes() |
java.util.Map<java.lang.String,graphloaders.antlrDotParser.NodeAndSubgraphParser.SubGraph> |
getSubGraphs() |
boolean |
isDirected() |
void |
setEdges(java.util.Map<NodeAndSubgraphParser.Node,java.util.Set<NodeAndSubgraphParser.Node>> edges) |
java.lang.String |
toString() |
enterA_list, enterAttr_list, enterAttr_stmt, enterEdge_stmt, enterEdgeop, enterEdgeRHS, enterEveryRule, enterId, enterNode_stmt, enterPort, enterStmt_list, enterStmt, exitA_list, exitAttr_list, exitAttr_stmt, exitEdge_stmt, exitEdgeop, exitEdgeRHS, exitEveryRule, exitGraph, exitId, exitNode_id, exitNode_stmt, exitPort, exitStmt_list, exitStmt, visitErrorNode, visitTerminal
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Map<java.lang.String,NodeAndSubgraphParser.Node> getNodes()
public java.util.Map<NodeAndSubgraphParser.Node,java.util.Set<NodeAndSubgraphParser.Node>> getEdges()
public void setEdges(java.util.Map<NodeAndSubgraphParser.Node,java.util.Set<NodeAndSubgraphParser.Node>> edges)
public java.util.Map<java.lang.String,graphloaders.antlrDotParser.NodeAndSubgraphParser.SubGraph> getSubGraphs()
public boolean isDirected()
public void enterGraph(DOTParser.GraphContext ctx)
DOTBaseListener
enterGraph
in interface DOTListener
enterGraph
in class DOTBaseListener
ctx
- the parse treepublic void enterNode_id(DOTParser.Node_idContext ctx)
DOTBaseListener
enterNode_id
in interface DOTListener
enterNode_id
in class DOTBaseListener
ctx
- the parse treepublic void enterSubgraph(DOTParser.SubgraphContext ctx)
DOTBaseListener
enterSubgraph
in interface DOTListener
enterSubgraph
in class DOTBaseListener
ctx
- the parse treepublic void exitSubgraph(DOTParser.SubgraphContext ctx)
DOTBaseListener
exitSubgraph
in interface DOTListener
exitSubgraph
in class DOTBaseListener
ctx
- the parse tree