+ public boolean isTransparent() { return false; }
+ public boolean isHidden() { return false; }
+ public GraphViz.Node toGraphViz(GraphViz gv) {
+ if (gv.hasNode(this)) return gv.createNode(this);
+ GraphViz.Node n = gv.createNode(this);
+ n.label = StringUtil.escapify(headToString()==null?"":headToString(), "\r\n");
+ n.directed = true;
+ n.comment = reduction==null?null:reduction+"";
+ edges(n);
+ return n;
+ }
+ boolean edges = false;
+ public void edges(GraphViz.Node n) {
+ if (edges) return;
+ edges = true;
+ for(int i=0; i<tokens.length; i++) {
+ if (i==tokens.length-1 && unwrap && !tokens[i].ambiguous()) {
+ tokens[i].edges(n);
+ } else {
+ n.edge(tokens[i], labels==null?null:labels[i]);
+ }
+ }
+ }
+