views:

24

answers:

2

My context is MSVC 6.

Starting with a successfully compiled program, with browse information built, I can go into a existing function and hover over a variable, and the IDE will show me the data type, and variable name. One could well imagine that the information is coming from the browse file.

In practice, If I create a new variable.

int z;

and hover over the z, the IDE will show me the data type and variable name. I have not compiled the program yet, hence the browse file has not been updated. This seems to say, that there is a portion of the IDE, which watches as you type, and stays aware of the datatypes and functions as you enter them. For all I know, it may compile them internally as well.

I have also noticed, that syntax errors can effectively disable this functionality.

I haven't seen this discussed anywhere. Is there a term for this sort of functionality?

+1  A: 

In compilers, its usually called a symbol table.

I'm not sure that there's a term common to all integrated development environments.

Gilbert Le Blanc
+1  A: 

It's probably the lexical analysis and syntactic analysis at work and building up it's own symbol table. It's part of the parsing phase of most compilers. That would explain why the functionality breaks when you see syntax errors. The parsing needs to occur successfully to have a reliable symbol table.

SB
Ya. It's the IDE's symbol table. Owned by the IDE instead of the compiler, with no suggestion that they are shared at all, as one can always compile at the command line. Thank you.
EvilTeach