[antlr-interest] template dependency graphs (DOT/graphviz)

Terence Parr parrt at cs.usfca.edu
Sat Dec 24 15:56:43 PST 2005


Howdy,

In order to make it easier for people to build code generators for  
ANTLR v3, I've added a feature to StringTemplate so it knows how to  
give you a DOT diagram showing all the enclosing template  
relationships (with or w/o the attribute list).  I've enclosed the  
graph for the lexer of simplec.g from the example-v3 group.   
(naturally, the graph is a ST so you can set node style attributes  
like width, fontsize, etc...  the joy of ST). :)

This will be generally useful for people building complicated output  
structures with StringTemplate.

For v3 target builders: I've commented out the code in  
CodeGenerator.java that dumps this stuff.  It's line 389 as of when I  
am submitting this and the updated ST.  You don't need to sync new ST  
unless you want to uncomment.

DOT/graphviz kicks butt!

Ter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: STgraph.pdf
Type: application/pdf
Size: 18757 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20051224/92462da0/STgraph.pdf
-------------- next part --------------



More information about the antlr-interest mailing list