简体   繁体   中英

Abstract Syntax Tree for this case?

I am trying to create an abstract syntax Tree for the following 2 C/C++/Java code pieces:

1) return j++-200*20-++A*7

2) return j++-200*20-A++*7

Can someone please explain their difference when it comes to their AST?

return j++ - 200*20 - ++A*7 and return j++ - 200*20 - A++*7 will have identical ASTs down to the node involving A . The first will have a pre-increment A node, while the second will have a post-increment A node.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM