Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full description of Java AST node types #170

Open
egor-bogomolov opened this issue Dec 9, 2019 · 3 comments
Open

Full description of Java AST node types #170

egor-bogomolov opened this issue Dec 9, 2019 · 3 comments

Comments

@egor-bogomolov
Copy link

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.

@jrfaller jrfaller self-assigned this Dec 9, 2019
@jrfaller
Copy link
Member

jrfaller commented Dec 9, 2019

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.

@egor-bogomolov
Copy link
Author

Thank you for your reply! We will try to auto-generate some documentation and post a link here.

@jrfaller
Copy link
Member

Any development on this @egor-bogomolov ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants