Abstract Syntax Tree for this case?

北城以北 提交于 2019-12-13 08:09:38

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/40700677/abstract-syntax-tree-for-this-case

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!