Antique-team / clangml

OCaml bindings for clang
Other
24 stars 6 forks source link

I think it could be nice to be able to dump out the AST in a file for graphviz #45

Closed UnixJunkie closed 8 years ago

UnixJunkie commented 10 years ago

so that the dotty command can create the graph

pippijn commented 10 years ago

You could look into ocamlgraph, see if it's possible (or feasible, because I know it's possible) to make a graph (tree) structure out of the AST. You then get graphviz for free.

Alternatively, you could use a fold visitor. I would still produce a data structure instead of graphviz text directly.

Both approaches may benefit from code generation.

UnixJunkie commented 10 years ago

I used ocamlgraph in the past, it is indeed a nice candidate.

UnixJunkie commented 8 years ago

this is not so much needed anymore