全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Symbol table?

Definition 4.3 University Computer Science — Year 3 · 第 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.
在原文中阅读 →