Abstract
This paper defines an abstract data type on which a solution to the name analysis subproblem of a compiler can be based. (Name analysis uses the scope rules of a language to associate uses of identifiers with their definitions.) We give a state model for the ADT, and show how to implement that model efficiently. The implementation is independent of any particular name analysis, so it is possible to create a library module that can be used in any compiler. Such a library module has been incorporated into the Eli compiler construction system.
Similar content being viewed by others
References
Pascal Computer Programming Language. ANSI/IEEE 770 X3.97-1983, American National Standards Institute, New York, NY, (1983)
Graham, S.L., Joy, W.N., Roubine, O.: Hashed symbol tables for languages with explicit scope control, SIGPLAN Notices14(8), 50–57 (1979)
Gray, R.W., Heuring, V.P., Krane, S.P., Sloane, A.M., Waite, W.M.: Eli: A complete, flexible compiler construction system. SEG 89-1-1, Dpt. of Electrical and Computer Engineering, Univ. of Colorado, Boulder, CO (1989). (To appear in Commun. ACM)
Guttag, J.V., Horning, J.J.: The algebraic specification of abstract data types. Acta Inf.10, 27–52 (1978)
Kastens, U.: Ordered attribute grammars. Acta Inf.13 (3), 229–256 (1980)
Kastens, U.: LIGA: A language independent generator for attribute evaluators. Bericht der Reihe Informatik63, Universität-GH Paderborn, Paderborn, FRG 1989
Kastens, U., Hutt, B., Zimmermann, E.: GAG: A practical compiler generator (Lect. Notes Comput. Sci., vol. 141). Berlin Heidelberg New York: Springer 1982
Revised report on the algorithmic language ALGOL 60. Commun. ACM6 (1), 1–17 (1963)
Reiss, S.P.: Generation of compiler symbol processing mechanisms from specifications. Trans. Prog. Lang. Systems5 (2), 127–163 (1983)
Sale, A.H.J.: A note on scope, one-pass compilers, and Pascal. Pascal News15, 62–63 (1979)
Schmidt, D.A.: Denotational semantics. Newton, MA: Allyn and Bacon 1986
Wirth, N.: Programming in Modula-2. 3rd. edn. (Texts Monogr. Comput. Sci.). Berlin Heidelberg New York: Springer 1985
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Kastens, U., Waite, W.M. An abstract data type for name analysis. Acta Informatica 28, 539–558 (1991). https://doi.org/10.1007/BF01463944
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF01463944