META II: A Syntax-Oriented Compiler Writing Language

Heath Matlock shared META II: A Syntax-Oriented Compiler Writing Language, by D. V. Schorre from UCLA’s Computing Faculty.

META II is a compiler writing language which consists of syntax equations resembling Backus normal form and into which instructions to output assembly language commands are inserted. […] Each syntax equation is translated into a recursive subroutine which tests the input string for a particular phrase structure, and deletes it if found. Backup is avoided by the extensive use of factoring in the syntax equations. For each source language, an interpreter is written and programs are compiled into that interpretive language.

Interestingly, you can hear more about this paper in a recent Interview between Joe Armstrong and Alan Kay. Alan Kay says this is one of his favorite papers, and Joe says that he lost a month of his life to it, and loved it.

I found a GitHub repo with his metacompiler code in it.  Also, here’s a tutorial for writing compilers that goes into some practical detail.  Finally, there’s an article about it on Wikipedia.