|PeterBURG: a Generic Back-End Generator|
PeterBURG is an implementation of well-known Bottom-Up tree
Rewriting System (BURS) generator for rapid codegenerator
development. The closiest relatives of PeterBURG are
BURG, IBURG and Twig (see Compiler
Since there are already a number of good BURG implementations the main idea of PeterBURG is not BURS as such but rather it functional implementation when all needed descriptions are written in the same source language as PeterBURG itself.
PeterBURG is written in Objective Caml programming language and consists of bundle of modules and functors implementing all BURS facilities.
Source tree to rewrite as well as grammar have to be introduces as modules with appropriate (required by PeterBURG) type. BURS dynamic programming algorithm is then accessible via functor instantiation. So BURS grammar, tree, semantic actions and algorithm itself are ultimately implemented in the same programming language.
In comparison with conventional BURS technique there are some extensions introduced in PeterBURG:
These features allow to implement slightly more broad set of algorithms controlled by BURS process. For example it is possible to incorporate Aho-Johnson register allocation principle with instruction selection.
PeterBURG is available for free without any warranty. One can download, distribute, modify and use it in any other manner without prompting of author. The distribution consists of source files, example and Makefile. Simply look at that stuff to clarify how to make it work.
More in this section: