Symbol table and the identifier

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Symbol table and the identifier

virote328
in chapter 11 after 11.5 perspective

it mentions that the symbol table will add additional information to the identifier.
What confuses me is that there seems to be redundant information or maybe it isn't redundant?  I'm not really sure what the difference is suppose to be

===begin book snippet
1)  The identifier category (var, argument, static, field, class, subroutine)

2) whether the identifier is presently being defined (e.g., the identifier stands for a variable declared in a var statement) or used (e.g., the identifier stands for a variable in an expression);

3) whether the identifier represents a variable of one of the four kinds (var, argument, static, field), and the running index assigned to the identifier by the symbol table

===end book snippet

The first bullet says to make it in the right category and so far that makes sense.
but in the third bullet, it repeats four of the categories listed above and I'm not sure
what to do about it.  It is trying to be redundant or is there a really difference between
the "var, argument, static, field " in the first bullet and the third bullet?  I'm confused...

For those people that have finished this part of the book can you explain what the above mentioned snippit actually means?  
Reply | Threaded
Open this post in threaded view
|

Re: Symbol table and the identifier

cadet1620
Administrator
I read the third bullet as "if the identifier represents a variable of one of the four kinds (var, argument, static, field), output the running index...."

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Symbol table and the identifier

virote328
such a simple answer to my big question.

Thank you.  I believe I understand now.  Thank you