in GraphLayout/tools/Dot2Graph/Dot.cs [217:369]
protected override void DoAction(int action)
{
switch (action)
{
case 3: // graphType -> DIGRAPH
{ strict = false; this.graph.Directed = true; }
break;
case 4: // graphType -> GRAPH
{ strict = false; this.graph.Directed = false; }
break;
case 5: // graphType -> ID, DIGRAPH
{ strict = ValueStack[ValueStack.Depth - 2].sVal != null && "strict" == ValueStack[ValueStack.Depth - 2].sVal.ToLower(); this.graph.Directed = true; }
break;
case 6: // graphType -> ID, GRAPH
{ strict = ValueStack[ValueStack.Depth - 2].sVal != null && "strict" == ValueStack[ValueStack.Depth - 2].sVal.ToLower(); this.graph.Directed = false; }
break;
case 7: // graphName -> ID
{ this.graph.Attr.Id = ValueStack[ValueStack.Depth - 1].sVal; }
break;
case 8: // graphName -> /* empty */
{ }
break;
case 9: // stmt_list -> /* empty */
{ CurrentSemanticValue.sList = new Cell<string>(); }
break;
case 10: // stmt_list -> stmt, stmt_list
{ CurrentSemanticValue.sList = Append(ValueStack[ValueStack.Depth - 2].sList, ValueStack[ValueStack.Depth - 1].sList); }
break;
case 11: // stmt_list -> stmt, ';', stmt_list
{ CurrentSemanticValue.sList = Append(ValueStack[ValueStack.Depth - 3].sList, ValueStack[ValueStack.Depth - 1].sList); }
break;
case 12: // stmt -> ID, '=', ID
{ MkEqStmt(ValueStack[ValueStack.Depth - 3].sVal, ValueStack[ValueStack.Depth - 1].sVal); CurrentSemanticValue.sList = new Cell<string>(); }
break;
case 13: // stmt -> node_stmt
{ CurrentSemanticValue.sList = ValueStack[ValueStack.Depth - 1].sList; }
break;
case 14: // stmt -> edge_stmt
{ CurrentSemanticValue.sList = ValueStack[ValueStack.Depth - 1].sList; }
break;
case 15: // stmt -> attr_stmt
{ CurrentSemanticValue.sList = new Cell<string>(); }
break;
case 16: // stmt -> subgraph
{ CurrentSemanticValue.sList = ValueStack[ValueStack.Depth - 1].sList; }
break;
case 17: // node_stmt -> node_id, opt_attr_list
{ CurrentSemanticValue.sList = MkNodeStmt(ValueStack[ValueStack.Depth - 2].sVal, ValueStack[ValueStack.Depth - 1].aVal); }
break;
case 18: // edge_stmt -> endpoint, edgeRHS, opt_attr_list
{ CurrentSemanticValue.sList = MkEdgeStmt(ValueStack[ValueStack.Depth - 3].sList, ValueStack[ValueStack.Depth - 2].sLists, ValueStack[ValueStack.Depth - 1].aVal); }
break;
case 19: // endpoint -> node_id
{ CurrentSemanticValue.sList = MkSingleton(ValueStack[ValueStack.Depth - 1].sVal); }
break;
case 20: // endpoint -> subgraph
{ CurrentSemanticValue.sList = ValueStack[ValueStack.Depth - 1].sList; }
break;
case 21: // edgeRHS -> ARROW, endpoint
{ CurrentSemanticValue.sLists = MkSingleton(ValueStack[ValueStack.Depth - 1].sList); }
break;
case 22: // edgeRHS -> edgeRHS, ARROW, endpoint
{ CurrentSemanticValue = ValueStack[ValueStack.Depth - 3]; CurrentSemanticValue.sList = new Cell<string>(CurrentSemanticValue.sList, null, ValueStack[ValueStack.Depth - 1].sList); }
break;
case 23: // subgraph -> '{', stmt_list, '}'
{ CurrentSemanticValue.sList = ValueStack[ValueStack.Depth - 2].sList; }
break;
case 24: // subgraph -> SUBGRAPH, '{', stmt_list, '}'
{ CurrentSemanticValue.sList = ValueStack[ValueStack.Depth - 2].sList; }
break;
case 25: // Anon@1 -> /* empty */
{ CreateNewCurrentSubgraph(ValueStack[ValueStack.Depth - 1].sVal); }
break;
case 26: // subgraph -> SUBGRAPH, id, Anon@1, '{', stmt_list, '}'
{
CurrentSemanticValue.sList = new Cell<string>();
PopCurrentSubgraph();
}
break;
case 27: // subgraph -> SUBGRAPH
{ CurrentSemanticValue.sList = new Cell<string>(); }
break;
case 28: // attr_stmt -> GRAPH, attr_list
{ MkGraphAttrStmt(ValueStack[ValueStack.Depth - 1].aVal); }
break;
case 29: // attr_stmt -> NODE, attr_list
{ MkNodeAttrStmt(ValueStack[ValueStack.Depth - 1].aVal); }
break;
case 30: // attr_stmt -> EDGE, attr_list
{ MkEdgeAttrStmt(ValueStack[ValueStack.Depth - 1].aVal); }
break;
case 31: // opt_attr_list -> /* empty */
{ CurrentSemanticValue.aVal = new ArrayList(); }
break;
case 32: // opt_attr_list -> attr_list
{ CurrentSemanticValue = ValueStack[ValueStack.Depth - 1]; }
break;
case 33: // attr_list -> '[', ']'
{ CurrentSemanticValue.aVal = new ArrayList(); }
break;
case 34: // attr_list -> '[', a_list, ']'
{ CurrentSemanticValue = ValueStack[ValueStack.Depth - 2]; }
break;
case 35: // a_list -> avPair
{ CurrentSemanticValue.aVal = new ArrayList(); CurrentSemanticValue.aVal.Add(ValueStack[ValueStack.Depth - 1].avPair); }
break;
case 36: // a_list -> avPair, a_list
{ ValueStack[ValueStack.Depth - 1].aVal.Add(ValueStack[ValueStack.Depth - 2].avPair); CurrentSemanticValue = ValueStack[ValueStack.Depth - 1]; }
break;
case 37: // a_list -> avPair, ',', a_list
{ ValueStack[ValueStack.Depth - 1].aVal.Add(ValueStack[ValueStack.Depth - 3].avPair); CurrentSemanticValue = ValueStack[ValueStack.Depth - 1]; }
break;
case 38: // avPair -> id, '=', id
{ CurrentSemanticValue.avPair = MkAvPair(ValueStack[ValueStack.Depth - 3].sVal, ValueStack[ValueStack.Depth - 1].sVal); }
break;
case 39: // avPair -> id
{ CurrentSemanticValue.avPair = MkAvPair(ValueStack[ValueStack.Depth - 1].sVal, ""); }
break;
case 40: // node_id -> id, opt_port
{ CurrentSemanticValue.sVal = ValueStack[ValueStack.Depth - 2].sVal; /* ignore port */ }
break;
case 41: // opt_port -> /* empty */
{ }
break;
case 42: // opt_port -> port
{ }
break;
case 43: // port -> port_location
{ }
break;
case 44: // port -> port_angle
{ }
break;
case 45: // port -> port_angle, port_location
{ }
break;
case 46: // port -> port_location, port_angle
{ }
break;
case 47: // port_location -> ':', id
{ }
break;
case 48: // port_location -> ':', '(', id, ',', id, ')'
{ }
break;
case 49: // id -> ID
{ CurrentSemanticValue.sVal = ValueStack[ValueStack.Depth - 1].sVal; }
break;
case 50: // port_angle -> '@', id
{ CurrentSemanticValue.sVal = ValueStack[ValueStack.Depth - 1].sVal; }
break;
}
}