AST Exploring Tool

ExtendJ Explorer is an interactive tool for exploring the ASTs built by ExtendJ.

The tool shows a graphical view of the parsed AST alongside the Java source code, and it even lets you inspect attributes for particular nodes in the AST!

The AST can be filtered based on a flexible filter rule language.

Here is a screenshot of the application in use:

ExtendJ Explorer Screenshot

The latest version of ExtendJ Explorer can be downloaded here:

Usage

A source file can be loaded or typed by hand in a text editor inside the visualizer. Rebuilding the AST will update the tree view.

A filter can be typed in the filter editor. The filter language should be fairly intuitive. It consists of three different kinds of rules:

  • include - includes matched nodes in the filtered tree
  • exclude - filters out the matched nodes, and their subtrees
  • set - only used to change properties for matched node

Each rule has a path pattern consisting of the type names for nodes on the path from the tree root, or wildcard expressions.

Each rule can also provide a matching condition based on node attributes, and add style and attribute info for the matched nodes.

Requirements

The tool requires Java 8 update 40 or later to run.

On Ubuntu, the openjfx package is required when using OpenJDK. The package may be installed by running this command in a terminal:

sudo apt-get install openjfx

DrAST - A visualizer for any JastAdd project

ExtendJ Explorer is based on a project called DrAST, which can be used with any JastAdd compiler, not just ExtendJ. DrAST was the Master's Thesis project of Joel Lindholm and Johan Thorsberg.