Draw Julia syntax trees as a graph
Julia
Switch branches/tags
Clone or download
tawheeler Merge pull request #7 from staticfloat/updated_ci_url
Update CI URLs to point to new caching infrastructure
Latest commit 023033e Aug 7, 2018
Permalink
Failed to load latest commit information.
examples Add DAGs (#5) Jan 31, 2017
src Julia 0.7-beta2 fixes (#10) Aug 7, 2018
test Julia 0.7-beta2 fixes (#10) Aug 7, 2018
.codecov.yml TreeView.jl generated files. Jan 26, 2017
.gitignore
.travis.yml Julia 0.7-beta2 fixes (#10) Aug 7, 2018
LICENSE.md TreeView.jl generated files. Jan 26, 2017
README.md Add DAGs (#5) Jan 31, 2017
REQUIRE Julia 0.7-beta2 fixes (#10) Aug 7, 2018
appveyor.yml Update CI URLs to point to new caching infrastructure May 17, 2017
example_tree.png Add files via upload Jan 27, 2017

README.md

TreeView

Build Status codecov.io

This is a small package to visualize a graph corresponding to an abstract syntax tree (AST) of a Julia expression. It uses the TikzGraphs.jl package to do the visualization.

Usage

The package is designed to be used within the IJulia notebook.

The simplest usage is @tree <EXPRESSION>, where <EXPRESSION> represents any Julia expression, for example

@tree x^2 + y^2

which gives the following output:

example_tree

See [this notebook](examples/TreeView usage.ipynb) for usage examples.

Installation prerequisites

You will need to have LaTeX installed on your system, and install the pdf2svg utility; see the TikzGraphs.jl documentation for details.

Author

  • David P. Sanders, Departamento de Física, Facultad de Ciencias, Universidad Nacional Autónoma de México (UNAM)

Acknowledements

Financial support is acknowledged from DGAPA-UNAM PAPIME grants PE-105911 and PE-107114, and DGAPA-UNAM PAPIIT grant IN-117214, and from a CONACYT-Mexico sabbatical fellowship. The author thanks Alan Edelman and the Julia group for hospitality during his sabbatical visit.

In particular, he thanks Jiahao Chen, who, when asked if a package like this existed, replied "why don't you write one?".