gumtree
gumtree copied to clipboard
Full description of Java AST node types
Is there a full documentation of node types in the AST generated by Java parser in GumTree?
For my work, I want to specify different behavior depending on node types and I want to do so outside of java/kotlin code. The information I'm looking for is, for each node type, the number of children and their descriptions (e.g., I assume that the node describing if statement has children corresponding to condition statement, block of the true branch and something for else branch).
If there are any documents describing parser's grammar, that would be awesome.
Hi Egor,
This information is usually available on the underlying parser documentation (e.g. JDT for Java code). In some cases we perform some tiny tree rewriting, but most of the time, the structure of GumTree's AST is the same as the parser's one.
However the documentation is not always very easy to understand (for instance for JDT it is a JavaDoc thefore the hierarchy is not explicit). It would be very neat to have it for GumTree, but it would require a lot a documentation effort unfortunately.
Thank you for your reply! We will try to auto-generate some documentation and post a link here.
Any development on this @egor-bogomolov ?