skip to main content
10.1145/971300.971347acmconferencesArticle/Chapter ViewAbstractPublication PagessigcseConference Proceedingsconference-collections
Article

Attribute based compiler implemented using visitor pattern

Published:01 March 2004Publication History

ABSTRACT

In our compiler course for undergraduate students, we use a class of attribute grammars to specify type information, target code, and other properties calculated for the source program. In the design of the compiler, a modification of the visitor design pattern allows us to transparently compute the attributes. Within our framework, implementation is straightforward; the emphasis of the course shifts to theory and specification. In several offerings of the course, students have implemented parts of a highly modular compiler for a small, statically typed object oriented language.

References

  1. Aho, Alfred V., R Sethi, J. D. Ullman. Compilers : principles, techniques, and tools, Addison-Wesley, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Baldwin, Doug. A compiler for teaching about compilers, Proceedings of the 34th SIGCSE Technical Symposium on Computer Science Education, 2003. pp. 220--223. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Gamma, Erich {et al}. Design patterns: elements of reusable object-oriented software. Reading, Mass. Addison-Wesley, c1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Knuth D.E.: Examples of Formal Semantics: Symposium on Semantics of Algorithmic Languages, E. Engeler (ed.), Lecture Notes in Mathematics, Springer-Verlag, 1971, 212--235.Google ScholarGoogle Scholar
  5. Neff, N. "OO Design in Compiling an OO Language", Proceedings of the 30th SIGCSE Technical Symposium on Computer Science Education, Mar. 1999. pp. 326--330. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Attribute based compiler implemented using visitor pattern

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in
              • Published in

                cover image ACM Conferences
                SIGCSE '04: Proceedings of the 35th SIGCSE technical symposium on Computer science education
                March 2004
                544 pages
                ISBN:1581137982
                DOI:10.1145/971300

                Copyright © 2004 ACM

                Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 1 March 2004

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • Article

                Acceptance Rates

                Overall Acceptance Rate1,595of4,542submissions,35%

                Upcoming Conference

                SIGCSE Virtual 2024
                SIGCSE Virtual 2024: ACM Virtual Global Computing Education Conference
                November 30 - December 1, 2024
                Virtual Event , USA

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader