A Generic Tool for Teaching Compilers

Riad Jabri

Abstract


In this paper, we propose a two-fold generic tool for compiler construction. First, it facilitates teaching compilers. Second, it constitutes a new approach for compiler construction. In addition, it enables a smooth transition from theory to practice and introduces a unified approach for the implementation of the different compiler phases. Such unification is achieved based on the representation of the compiler phases as a generic domain that is then mapped into a generic automaton. The generic automaton simulates the behavior of finite and shift-reduce automata, annotated by respective translation schemes. Thus, the tool acts as a scanner, a parser or as syntax directed translator. Without loss of generality, the proposed tool is used within a compiler-teaching framework. Comparisons with similar and well-known approaches have shown that our approach is pedagogical, conceptually simpler, requires less student efforts and more relevant to core curriculum.


Full Text: PDF DOI: 10.5539/cis.v6n2p134

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.

Computer and Information Science   ISSN 1913-8989 (Print)   ISSN 1913-8997 (Online)
Copyright © Canadian Center of Science and Education

To make sure that you can receive messages from us, please add the 'ccsenet.org' domain to your e-mail 'safe list'. If you do not receive e-mail in your 'inbox', check your 'bulk mail' or 'junk mail' folders.