<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#copied {background-color:#ccccff;}
tr.alt #copied {background-color:#bbbbf7;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="5">Commit in <b><tt>metaas/trunk/src</tt></b></td></tr>
<tr><td><tt>main/java/uk/co/badgersinfoil/metaas/impl/antlr/<a href="#file1"><span id="removed">ASTDot.java</span></a></tt> </td><td></td><td></td><td align="right" id="removed">-166</td><td nowrap="nowrap">360 removed</td></tr>
<tr class="alt"><td><tt>test/java/uk/co/badgersinfoil/metaas/impl/antlr/<a href="#file2"><span id="copied">ASTDot.java</span></a></tt> </td><td colspan="3" align="center"><small id="info">[copied]</small></td><td nowrap="nowrap" align="center">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/antlr/ASTDot.java:360 -> 361</td></tr>
<tr><td></td><td></td><td></td><td align="right" id="removed">-166</td><td></td></tr>
</table>
<small id="info">1 removed + 1 copied, total 2 files</small><br />
<pre class="comment">
move AST visualisation util from the main codebase to the unit test folder
since it's only used when diagnosing test failures
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="removed">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/antlr</span><br />
<div class="fileheader" id="removed"><big><b>ASTDot.java</b></big> <small id="info">removed after 360</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/antlr/ASTDot.java        2007-01-20 17:35:32 UTC (rev 360)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/antlr/ASTDot.java        2007-01-20 17:44:02 UTC (rev 361)
@@ -1,166 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (c) 2006 David Holroyd
- */
-
-package uk.co.badgersinfoil.metaas.impl.antlr;
-
-import java.io.PrintWriter;
-import java.io.Writer;
-import java.util.IdentityHashMap;
-import java.util.Map;
-import org.antlr.runtime.Token;
-import org.asdt.core.internal.antlr.AS3Parser;
-
-
-/**
- * A little hack to create a 'dot' file representing the structure of the
- * given LinkedListTree, suitable to visualisation using the graphviz.org
- * 'dot' tool.
- */
-public class ASTDot {
-        private PrintWriter out;
-        private Map doneTokens = new IdentityHashMap();
-
-        public ASTDot(Writer writer) {
-                out = new PrintWriter(writer);
-        }
-
-        public void dotify(LinkedListTree ast) {
-                println("digraph ast_diagram {");
-                println(" node [fontsize=12];");
-                nodeSubGraph(ast);
-                tokenSubGraph(ast);
-                startStopTokenEdges(ast);
-                println("}");
-        }
-
-        private void nodeSubGraph(LinkedListTree ast) {
-                println(" subgraph tree {");
-                treeNodes(ast);
-                println(" }");
-        }
-
-        private void treeNodes(LinkedListTree ast) {
-                println(" "+nodeName(ast)+" [label="+label(ast)+",shape=invhouse];");
-                for (int i=0; i<ast.getChildCount(); i++) {
-                        LinkedListTree child = (LinkedListTree)ast.getChild(i);
-                        println(" "+nodeName(ast)+" -> "+nodeName(child)+" [weight=10,style=bold];");
-                        treeNodes(child);
-                }
-        }
-
-        private String label(LinkedListTree ast) {
-                return label(AS3Parser.tokenNames[ast.getType()]);
-        }
-
-        private String nodeName(LinkedListTree ast) {
-                return "ast_0x"+Integer.toHexString(System.identityHashCode(ast));
-        }
-
-
-        private void tokenSubGraph(LinkedListTree ast) {
-                println(" subgraph cluster_tokens {");
-                println(" rankdir=LR;");
-                tokenNodes(ast);
-                println(" }");
-        }
-
-        private void tokenNodes(LinkedListTree ast) {
-                for (LinkedListToken tok = ast.getStartToken(); tok!=null; tok=tok.getNext()) {
-                        tokenNode(tok);
-                }
-                for (int i=0; i<ast.getChildCount(); i++) {
-                        LinkedListTree child = (LinkedListTree)ast.getChild(i);
-                        tokenNodes(child);
-                }
-        }
-
-        private int runSeq = 0;
-
-        private void tokenNode(LinkedListToken tok) {
-                if (doneTokens.containsKey(tok)) {
-                        return;
-                }
-                Integer runId = new Integer(runSeq++);
-                out.print(" tok_"+runId+" [label=\"");
-                for (; tok!=null; tok=tok.getNext()) {
-                        out.print("<"+fieldName(tok)+"> "+label(tok));
-                        doneTokens.put(tok, runId);
-                        if (tok.getNext() != null) {
-                                out.print("|");
-                        }
-                }
-                out.println("\",shape=record];");
-        }
-
-        private String label(LinkedListToken tok) {
-                if (tok.getType() == Token.EOF) {
-                        return "EOF";
-                }
-                String txt = tok.getText();
-                if (txt.length() > 10) {
-                        txt = txt.substring(0, 7) + "...";
-                }
-                return "\\\""+txt.replaceAll("\\|", "\\\\|")
-                 .replaceAll("\"", "\\\\\"")
-                 .replaceAll("\\{", "\\\\{")
-                 .replaceAll("\\}", "\\\\}")
-                 .replaceAll("<", "\\\\<")
-                 .replaceAll(">", "\\\\>")
-                 .replaceAll("\n", "\\\\\\\\n")
-                 .replaceAll("\t", "\\\\\\\\t")+"\\\"";
-        }
-
-        private String nodeName(LinkedListToken tok) {
-                return "tok_"+doneTokens.get(tok)+":"+fieldName(tok);
-        }
-
-        private String fieldName(LinkedListToken tok) {
-                return "f"+Integer.toHexString(System.identityHashCode(tok));
-        }
-
-        private void startStopTokenEdges(LinkedListTree ast) {
-                if (ast.getStartToken() != null) {
-                        println(" "+nodeName(ast)+" -> "+nodeName(ast.getStartToken())+" [minlen=2,color=green,tailport=w];");
-                }
-                if (ast.getStopToken() != null) {
-                        println(" "+nodeName(ast)+" -> "+nodeName(ast.getStopToken())+" [minlen=2,color=red,tailport=e];");
-                }
-                for (int i=0; i<ast.getChildCount(); i++) {
-                        LinkedListTree child = (LinkedListTree)ast.getChild(i);
-                        startStopTokenEdges(child);
-                }
-        }
-
-        private String label(String str) {
-                if (str.length() > 15) {
-                        str = str.substring(0, 15);
-                }
-                StringBuffer res = new StringBuffer("\"");
-                for (int i=0; i<str.length(); i++) {
-                        char c = str.charAt(i);
-                        switch (c) {
-                         case '\n':
-                                res.append("\\\\n");
-                                break;
-                         case '\r':
-                                res.append("\\\\r");
-                                break;
-                         case '\t':
-                                res.append("\\\\t");
-                                break;
-                         case '"':
-                                res.append("\\\\\\\"");
-                                break;
-                         default:
-                                res.append(c);
-                        }
-                }
-                res.append("\"");
-                return res.toString();
-        }
-
-        private void println(String txt) {
-                out.println(txt);
-        }
-}
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="copied">metaas/trunk/src/test/java/uk/co/badgersinfoil/metaas/impl/antlr</span><br />
<div class="fileheader" id="copied"><big><b>ASTDot.java</b></big> <small id="info">copied from metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/antlr/ASTDot.java:360</small></div>
<pre class="diff"><small id="info">
Copied from metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/antlr/ASTDot.java:252
</small></pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.12</small></center>
</body></html>