Abstract
The central task of symbol table administration is identification of all identifiers used in the source program under consideration of visibility rules varying between the different programming languages. Usually this problem is handled by a hash search of the identifier and an additional decision about the visibility of this identifier in the current program region (“scoping problem”). The most used solution for the scoping problem is scope-dependent switching of hash links in such a way that only such identifiers indeed visible in this region are reachable by the hashing process.
The new approach handles the scoping problem by visibility sets defined for every program region, and additionally by overload resolution tables for multiple used identifier names. The result is constant decision time for the scoping problem (at latest) after the first access to an identifier in a program region. The algorithm is very simple so that the access time is not only (nearly) constant but also very small. The approach permits an efficient solution of all the scoping problems of contemporary programming languages such as MODULA-2, C, or Fortran90.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
P. Fritzson: Incremental Symbol Processing. Research Report LiTH-IDA-R-88-09, Linköping University, Sweden, 1988
L.B. Geissmann: Separate Compilation in Modula-2 and the Structure of the Modula-2 Compiler on the Personal Computer Lilith. ETH Zürich, Diss. ETH No. 7286, 1983
S.L. Graham, W.N. Joy, O. Roubine: Hashed Symbol Tables for Languages with Explicit Scope Control. SIGPLAN Notices 14 (Aug. 1979), 50–57
R.T. House: Alternative Scope Rules for Block-Structured Languages. The Computer Journal 29 (1986) 3, 253–260
U. Kastens, W.M. Waite: An Abstract Data Type for Name Analysis. Research Report CU-CS-460-90, University of Colorado at Boulder, March, 1990
Masato Takeichi: Name Identification for Languages with Explicit Scope Control. Journal of Information Processing 5 (1982) 1, 45–49
W.M. Waite, G. Goos: Compiler Construction. Springer Verlag, New York, 1984
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Aβmann, W. (1992). Another solution of scoping problems in symbol tables. In: Kastens, U., Pfahler, P. (eds) Compiler Construction. CC 1992. Lecture Notes in Computer Science, vol 641. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55984-1_8
Download citation
DOI: https://doi.org/10.1007/3-540-55984-1_8
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55984-9
Online ISBN: 978-3-540-47335-0
eBook Packages: Springer Book Archive