Alle boeken

Professioneel

Apps Over Coach Inloggen Begin met lezen

Computer Science · Begrippenlijst

Wat is Symbol table?

Definition 4.3 University Computer Science — Year 3 · Hoofdstuk 4 — Abstract Syntax and Semantic Analysis

A symbol table maps the names visible at a point of the program to their declarations. For block structure it supports four operations: open a scope, close it (forgetting what it declared), declare a name in the innermost scope, and look a name up, finding the innermost declaration.

The symbol table of main at three points, top of the stack up; x:15 is the x declared on line 15. At line 18 the lookup of x finds the inner one, declared on line 17; at line 20 the inner block has been popped and the outer x is visible again.
The symbol table of main at three points, top of the stack up; x:15 is the x declared on line 15. At line 18 the lookup of x finds the inner one, declared on line 17; at line 20 the inner block has been popped and the outer x is visible again.
Lees in het hoofdstuk →