[antlr-interest] AntlrWorks export to dot files
Jim Idle
jimi at temporal-wave.com
Thu Jun 4 08:38:31 PDT 2009
Michael Pasdziernik wrote:
> Hi,
> Ok, dot is a simple text file. Replacing "arrowhead = none" with "arrowhead = normal"
> solves the Problem.
> Regards
> Michael
>
You can also steal the formatting used for producing a dot spec of an
AST. This creates coloring and so on that makes the resulting png/other
graphic generally more readable.
See DOTTreeGenerator.java, where you will find:
"digraph {\n\n" +
"\tordering=out;\n" +
"\tranksep=.4;\n" +
"\tbgcolor=\"lightgrey\"; node [shape=box, fixedsize=false,
fontsize=12, fontname=\"Helvetica-bold\", fontcolor=\"blue\"\n" +
"\t\twidth=.25, height=.25, color=\"black\",
fillcolor=\"white\", style=\"filled, solid, bold\"];\n" +
"\tedge [arrowsize=.5, color=\"black\", style=\"bold\"]\n\n" +
" $nodes$\n" +
" $edges$\n" +
"}\n"
Jim
More information about the antlr-interest
mailing list