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, visitTerminalpublic java.lang.String toString()
toString in class java.lang.Objectpublic 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)
DOTBaseListenerenterGraph in interface DOTListenerenterGraph in class DOTBaseListenerctx - the parse treepublic void enterNode_id(DOTParser.Node_idContext ctx)
DOTBaseListenerenterNode_id in interface DOTListenerenterNode_id in class DOTBaseListenerctx - the parse treepublic void enterSubgraph(DOTParser.SubgraphContext ctx)
DOTBaseListenerenterSubgraph in interface DOTListenerenterSubgraph in class DOTBaseListenerctx - the parse treepublic void exitSubgraph(DOTParser.SubgraphContext ctx)
DOTBaseListenerexitSubgraph in interface DOTListenerexitSubgraph in class DOTBaseListenerctx - the parse tree