dmd AST class hierarchy as dot file

Guillaume Chatelet via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 20 11:24:33 PDT 2015


On Sunday, 20 September 2015 at 17:26:22 UTC, Andrei Alexandrescu 
wrote:
> On 09/20/2015 05:26 AM, Guillaume Chatelet wrote:
>> Not sure if it can be useful to someone else but I extracted 
>> the dmd's
>> class hierarchy as a DOT file:
> [snip]
>
> That's great. I haven't used dot in a long time, any particular 
> flags to invoke it etc?

dot -Tpng dlang_ast.dot > dlang_ast.png
dot -Tsvg dlang_ast.dot > dlang_ast.svg // great because `find` 
works in a browser

> It would be great to include the grammar graph build as an 
> optional target in the dlang.org makefile so we can publish the 
> resulting .gif on the site. Guillaume, could you put a PR 
> together?

As David mentioned I'm not sure it will be that useful. Probably 
only to people working directly in dmd.

Interestingly enough, with ddmd I'm almost sure it can now be 
automatically generated at compile time by class introspection :)


More information about the Digitalmars-d mailing list