Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

constructing a parse tree/ AST from java byte code [closed]

are there any ways or libraries available that can be used to build a parse tree from java byte code? My actual goal is to create an AST. I know there are libraries available for building AST from source codes, just want to know ways to build the AST from byte code only.

like image 972
P basak Avatar asked Aug 29 '26 09:08

P basak


1 Answers

You no longer have a syntax tree once it's compiled down to bytecode. If you're trying to build a Java syntax tree out of bytecode, then you're really trying to write a decompiler.

(Bytecode itself isn't so much a tree as just a sequence of instructions; it's not really tree-shaped in the way that you'd expect an AST to be.)

like image 56
Louis Wasserman Avatar answered Aug 31 '26 23:08

Louis Wasserman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!