Skip to content
This repository has been archived by the owner on Mar 8, 2020. It is now read-only.

Latest commit

 

History

History
32 lines (21 loc) · 1.16 KB

uast-specification-v2.md

File metadata and controls

32 lines (21 loc) · 1.16 KB

UAST v2

Overview

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:

Visualization

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 github.com/bblfsh/go-client/v4/cmd/bblfsh-cli/...
bblfsh-cli client.go > client.uast.yml

go get github.com/bblfsh/sdk/v3/cmd/bblfsh-sdk/...
bblfsh-sdk ast2gv -o png client.uast.yml
open client.uast.yml.png