Abstract
This paper presents what aims to be an example of good design principles applied to compiler construction. To be more specific, it presents an interpreter of a very simple object oriented language, called SmallScript, that has been designed to be taught in a Compiler University course. Our aim is not to develop a new, revolutionary language, neither to show a spectacular advance in some research field of compiler construction. Instead, as university teachers, we aim to offer both students and teachers an example of how a modern interpreter can be designed, focusing on object orientation and using modern tools like JavaCC and JJTrree.
- Java Compiler Compiler™ (JavaCC). www.webgain. com/products/java_ccGoogle Scholar
- ANTLR. www. antlr.orgGoogle Scholar
- A. V. Aho, R. Sethi, J. D. Ullman. Compilers: Principles, Techniques and Tools. Addison-Wesley, 1986. Google ScholarDigital Library
- A. I Holub. Compiler Design in C. Prentice Hall, 1990. Google ScholarDigital Library
- E. Gamma et al. Design Patterns. Elements of Reusable Object-Oriented Software. Prentice Hall, 1990. Google ScholarDigital Library
- M. Grand. Patterns in Java: a catalog of reusable design patterns illustrated with UML. John Wiley & Sons, 1999 (Volume 1) and 2000 (Volume 2). Google ScholarDigital Library
- M. Fowler. Refactoring: Improving the Design of Existing Code. Addison-Wesley Longman, 1999. Google ScholarDigital Library
- J. Langr. Essential Java Style: Patterns for Implementation. Prentice Hall PTR, 2000. Google ScholarDigital Library
- J. Gosling et al. The Java Language Specification. Second Edition. Addison-Wesley, 2000. Google ScholarDigital Library
Index Terms
- Good design principles in a compiler university course
Recommendations
A compiler for teaching about compilers
SIGCSE '03: Proceedings of the 34th SIGCSE technical symposium on Computer science educationProjects in which students write a small compiler are common in compiler design courses, but even a small compiler can be daunting to students with no prior compiler-writing experience. When I recently taught compiler design, I developed a very small ...
A compiler for teaching about compilers
Projects in which students write a small compiler are common in compiler design courses, but even a small compiler can be daunting to students with no prior compiler-writing experience. When I recently taught compiler design, I developed a very small ...
Language design and implementation using ruby and the interpreter pattern
SIGCSE 08In this paper, the S-expression Interpreter Framework (SIF) is presented as a tool for teaching language design and implementation. The SIF is based on the interpreter design pattern and is written in the Ruby programming language. Its core is quite ...
Comments