A Universal Abstract Syntax Tree (UAST) is a normalized form of Abstract Syntax Tree (AST). By definition, the UAST representation does not depend on the language of the parser for source files.

UAST is defined by two separate specifications:

  • Node representation - defines a common transport format for the UAST.

  • Semantic UAST - defines UAST node types that are independent of the programming language.


Visualizing the structure of the UAST is very simple: YAML output of bblfsh-cli can be read by the bblfhs-sdk ast2gv command that outputs UAST representation using GraphVis.

PNG and SVG output is supported for convenience but requires a graphviz binary to be installed on your system.

go get
bblfsh-cli client.go > client.uast.yml

go get
bblfsh-sdk ast2gv -o png client.uast.yml
open client.uast.yml.png

results matching ""

    No results matching ""