META II

From Wikipedia, the free encyclopedia
Jump to: navigation, search

META II is a compiler writing language (also known as compiler-compiler) first released in 1962 by D. V. Schorre. It 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 an interpreted language. Compilers have been written in this language for VALGOL I and VALGOL II: the former is a simple algebraic language designed for the purpose of illustrating META II, the latter is described as a fairly large subset of ALGOL 60.

META II is the first documented version of a metacompiler. As such it is written in its own language and translates itself. It also translates to one of the earliest instances of a virtual machine with the operations list given in the paper.

"The paper itself is a wonderful gem which includes a number of excellent examples, including the bootstrapping of Meta II in itself (all this was done on an 8K (six bit bytes) 1401!)." -- Alan Kay

The original paper is not freely available, but was reprinted in Doctor Dobb's Journal (April 1980). Transcribed source code has at various times been made available (possibly by the CP/M User Group). The paper included a listing of the description of Meta II, this could in principle be processed manually to yield an interpretable program in virtual machine opcodes; if this ran and produced identical output then the implementation was correct.

See also[edit]

External links[edit]