Implementing Java Compilers Using ReRAGs

Anders Nilsson, Anders Ive, Torbjörn Ekman, Görel Hedin

Research output: Contribution to journalArticlepeer-review

Abstract

Rewritable Reference Attributed Grammars (ReRAGs) is a recently developed compiler-compiler technology based on object-orientation, aspect-orientation, reference attributed grammars, and conditional rewrites. In this paper we describe our experiences from using ReRAGs for implementing Java compilers. We illustrate how the usage of ReRAGs renders a rather compact, yet easy-to-understand and modular compiler specification where code analysis, restructurings, and optimizations can be conveniently described as aspects performing computations and transformations on the abstract syntax tree. Currently, we have implemented two compilers: one that generates C code with real-time support, and one that generates Java bytecode. Both share the same front end.
Original languageEnglish
Pages (from-to)213-234
JournalNordic Journal of Computing
Volume11
Issue number3
Publication statusPublished - 2004

Subject classification (UKÄ)

  • Computer Science

Free keywords

  • Java
  • compiler construction
  • Object-Orientation

Fingerprint

Dive into the research topics of 'Implementing Java Compilers Using ReRAGs'. Together they form a unique fingerprint.

Cite this