karma
karma

Reputation: 137

Is there a way to see the result(output) of lexical and syntax analysis of a java program compilation process?

Want to know if there is a way to see the output of java lexical and analysis phase while compiling a java program. We can see the byte code(Virtual machine code) using javap. Is there a way to see the output of Lexical and Analysis Phase? Thanks in advance!

Upvotes: 2

Views: 307

Answers (1)

chengpohi
chengpohi

Reputation: 14217

If you want to analysis the abstract syntax tree of the java source file. There are some samples:

You can debug the first example and you will find the source java file will be loaded into a Trees object.

Upvotes: 1

Related Questions