This is a command-line program for running the Javaparser
library on a Java source file.
In developing this grammar, it is helpful to compare the syntax trees to those produced by Javaparser
, the most popular Java-parsing library in the Java ecosystem. Unlike the Java language spec, Javaparser
is designed to produce syntax trees that are useful for code analysis.
On macOS, compile the parser with this script:
./bootstrap
Then run it on a java file like this
./run path/to/the/file.java