Radi
Radi

Reputation: 6584

using graphviz with qt

i have a compiler project and i want to print the ast after the compile complete

so can i print this ast to qt (on c++) panel using graphviz ?

note : i dont know if there is a binding between qt or c++ and graphviz , so if it doesnt work please help me to find the alternative .

thanks .

Upvotes: 0

Views: 2428

Answers (1)

grapho
grapho

Reputation: 26

i did this once. gcc has a flag to generate a .dot file of the AST. this file can then be displayed by graphviz. but be warned the AST is huge and is of limited use for all but the smallest functions.

see:

http://digitocero.com/en/blog/exporting-and-visualizing-gccs-abstract-syntax-tree-ast

Upvotes: 1

Related Questions