Skip to content

Diff GumTree's external format (XML) directly. #298

Answered by jrfaller
duesee asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

It depends whether or not a Java implementation of a parser is available. It it is, I use the parser API directly to produce a GumTree AST (example: rhino for JS or jruby for ruby). If it's not, I proceed to parsing using external parser with a system call that are expected to produce a custom XML format on the standard output that will be converted to a GumTree AST. I have several external parsers, normally only one language each (example: parso for Python) at the notable exception of tree-sitter-parser which is a facade to all available tree-sitter parsers.

It is possible to directly load an XML (using TreeIoUtils.fromXml().generateFrom()) but there is no associated command line per…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by duesee
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants