0

I wonder know how to visualize an AST(abstract syntax tree) with less across on edge which connected nodes. Or how to generate a AST graph with less mess or more readable?

By the way, the across happens in a special situation: I have multiple ASTs in one graph and they may share nodes(e.g. a circuit module with input and output pins could be a good example, it has many across as wires, gate as node).

I search about it. But most result I got is about AST definition but little about visualization. I want to know is there any algorithm to optimize node placement in the graph?

  • 2
    Welcome to stackoverflow :). I think you're asking for a recommendation for a tree layout algorithm, which is a quite broad question and underspecified (because who can guess what you're currently using and what specific problems you're currently seeing). Have you tried all the options in graphviz? – Paul Hankin Nov 14 '22 at 08:41

0 Answers0