UAST Specification


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 three separate specifications:


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