How IDE “learns” my code with logic and structure?

Once I use an IDE to compile my C++ code, this IDE seems know everything of my code: I could find the most original definition of any element in my code, no matter how deep it is from usage to definition.

the IDE seems know: 1.my code logic 2.my code structure

How IDE could do this?

Answers


For example, it scans files to find all symbols declarations, their membership in scopes, other symbols (classes, structs and so on). Then if it find a reference to the symbol, it already knows, where it is declared. Internally, IDE uses graph models to represent the tree of dependencies and calls. If you're interested in this topic, I recommend you to read this book: http://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools


Need Your Help

jQuery ajax request cancelled slows the current request

jquery ajax optimization

I'm currently using a tool to retrieve addresses in a database on the jQuery event keypress.

Accessing Sharepoint 2007 via Adobe Air App using Javascript

javascript html sharepoint air

I need to Check out, Edit, and Check in documents on a Sharepoint 2007 server. The documents are XML format. I want to do this in an Adobe Air application which is all HTML and Javascript. I have t...