Contents    Page-10    Prev    Next    Page+10    Index   

Tree of Symbol Tables[adapted from slide by John Werth.]

The nested procedures of the previous figure can be thought of as a tree. Each procedure can access its symbols and the symbols of its ancestors. A symbol at a lower level shadows any symbols with the same name at higher levels, e.g. in method overriding in OOP.

Our symbol table will have only two levels: