Abstract
This paper presents an unusual programming language, textttklx, illustrating the type of compiler construction projects the author uses successfully to accompany a mostly traditional lecture on compilers.The target processor of textttklx is the PostScript interpreter, and the paper argues that this is a very good choice. A PostScript interpreter simulates an elegant stack machine with built-in graphic capabilities. It is the perfect target for languages like textttklx, making them easy to implement and fun to use. The exact definition of the source language is an integral part of the student project.The use of non standard languages and a non standard target fosters student creativity in language design and implementation. It invites "out of the box" thinking, and prepares the knowledge transfer from the rich tradition of compiler construction to new and forthcoming areas of computer science.
- Adobe Systems Inc. PostScript language reference manual (2nd ed.). Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1990. Google ScholarDigital Library
- A. V. Aho, R. Sethi, and J. D. Ullman. Compilers: principles, techniques, and tools. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1986. Google ScholarDigital Library
- S. Debray. Making compiler design relevant for students who will (most likely) never design a compiler. In SIGCSE '02: Proceedings of the 33rd SIGCSE technical symposium on Computer science education, pages 341--345, 2002. Google ScholarDigital Library
- W. Kandinsky. Punkt und Linie zu Fläche: Beitrag zur Analyse der malerischen Elemente. A. Langen, München, 1926.Google Scholar
- klx example code. http://www.cs.fhm.edu/~ruckert/compiler/klx/ex3/.Google Scholar
- klx project description. http://www.cs.fhm.edu/~ruckert/compiler/klx/.Google Scholar
- R. Lang. Ghostscript's home page. http://www.cs.wisc.edu/~ghost/, 2004.Google Scholar
- M. Lesk and E. Schmidt. Lex---a lexical analyzer. Technical Report 39, Bell Laboratories, Murray Hill, NJ 07974, 1975.Google Scholar
- M. Ruckert. Compiler construction lab on video (in german). Available on request from the author.Google Scholar
- SAX homepage. http://www.saxproject.org/.Google Scholar
- S. C. Johnson. Yacc: Yet another compiler compiler. Computing Science Technical Report 32, Bell Laboratories, Murray Hill, NJ 07974, 1975.Google Scholar
- R. W. Sebesta. Concepts of Programming Languages. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2001. Google ScholarDigital Library
- M. Werner. A parser project in a programming languages course. J. Comput. Small Coll., 18(5):184--192, 2003. Google ScholarDigital Library
- XML homepage. http://www.xml.org/.Google Scholar
- L. Xu and F. G. Martin. Chirp on crickets: Teaching compilers using an embedded robot controller. In SIGCSE '06: Proceedings of the 37th SIGCSE technical symposium on Computer science education, pages 82--86, 2006. Google ScholarDigital Library
Index Terms
- Teaching compiler construction and language design: making the case for unusual compiler projects with postscript as the target language
Recommendations
Teaching compiler construction and language design: making the case for unusual compiler projects with postscript as the target language
SIGCSE '07: Proceedings of the 38th SIGCSE technical symposium on Computer science educationThis paper presents an unusual programming language, textttklx, illustrating the type of compiler construction projects the author uses successfully to accompany a mostly traditional lecture on compilers.The target processor of textttklx is the ...
Teaching compiler construction using a domain specific language
Building a compiler for a domain specific language (a language designed for a specific problem domain) can engage students more than traditional compiler course projects. Most students feel that compiler courses are irrelevant because they are not ...
Teaching compiler construction using a domain specific language
SIGCSE '05: Proceedings of the 36th SIGCSE technical symposium on Computer science educationBuilding a compiler for a domain specific language (a language designed for a specific problem domain) can engage students more than traditional compiler course projects. Most students feel that compiler courses are irrelevant because they are not ...
Comments