TMG (language)
Designed by | Robert M. McClure |
---|---|
Developer | Robert M. McClure |
First appeared | 1963[1] |
Dialects | |
Unix dialect (by Douglas McIlroy) |
TMG program with highlighted syntax | |
Developer | Douglas McIlroy |
---|---|
First appeared | 1969 |
Filename extensions | .t |
Dialects | |
PDP-7 version, PDP-11 version | |
Influenced | |
B, Yacc |
In computing TMG (TransMoGrifier) is a recursive descent compiler-compiler[2] developed by Robert M. McClure and presented in 1965.[3][4][5] TMG ran on systems including OS/360 and early Unix.[6] It was used to build EPL, an early version of PL/I.[6]
Douglas McIlroy ported TMG to an early version of Unix. According to Ken Thompson, McIlroy wrote TMG in TMG on a piece of paper and "decided to give his piece of paper his piece of paper," hand-compiling assembly language that he entered and assembled on Thompson's Unix system running on PDP-7.[7] Thompson used TMG in 1970 as a tool to offer Fortran, but due to memory limitations of PDP-7 ended up creating the B programming language which was much influenced by BCPL.[3]
The recursive descent algorithm of TMG was studied formally by Alexander Birman and Jeffrey Ullman. The formal description of the algorithms was named TMG recognition scheme (or simply TS).[8]
See also
References
- ↑ "Early Translator Writing Systems - Brooker-Morris Compiler Compiler 1966". Atlas Computer Laboratory. http://www.chilton-computing.org.uk/acl/applications/cc/p007.htm#s3p3. "TMG, ... comes later but appears to have not been influenced by the earlier systems [Alick Glennie's 1960 Syntax Machine, Ned Irons 1960 PSYCO compiler, or Brooker and Morris's 1960 Compiler-Compiler]."
- ↑ "M. Douglas McIlroy". Dartmouth College. https://www.cs.dartmouth.edu/~doug/. "Some things I have worked on: Languages and compilers: macros, Lisp, PL/I, TMG (a compiler-compiler), regular expressions; influenced Snobol, Altran, C++ ..."
- ↑ 3.0 3.1 Ritchie, Dennis M.. "The Evolution of the Unix Time-sharing System*". http://cm.bell-labs.com/cm/cs/who/dmr/hist.html. "Every program for the original PDP-7 Unix system was written in assembly language, and bare assembly language it was—for example, there were no macros. Moreover, there was no loader or link-editor, so every program had to be complete in itself. The first interesting language to appear was a version of McClure's TMG that was implemented by McIlroy. Soon after TMG became available, Thompson decided that we could not pretend to offer a real computing service without Fortran, so he sat down to write a Fortran in TMG. As I recall, the intent to handle Fortran lasted about a week. What he produced instead was a definition of and a compiler for the new language B."
- ↑ McClure, R.M. (1965). "TMG—A Syntax-Directed Compiler". in L. Winner. Proceedings of the 1965 20th national conference (ACM '65). ACM. pp. 262–274. doi:10.1145/800197.806050. https://dl.acm.org/citation.cfm?id=806050&preflayout=flat.
- ↑ Template:Cite tech report
- ↑ 6.0 6.1 "TMG". https://www.multicians.org/tmg.html. "... TMG that runs under OS360 (sic) ... Mike Green took Bob McClure's 7090/7040 version and implemented the compiler-compiler on the 360; ... TMG was the compiler definition tool used by Ken Thompson to write the compiler for the B language on his PDP-7 in 1970. B was the immediate ancestor of C."
- ↑ Ken Thompson. "VCF East 2019 -- Brian Kernighan interviews Ken Thompson". https://www.youtube.com/watch?v=EY6q5dv_B-o&t=2330.
- ↑ Birman, Alexander; Ullman, Jeffrey D (1973). "Parsing algorithms with backtrack". Information and Control (Elsevier B.V) 23 (1): 1–34. doi:10.1016/S0019-9958(73)90851-6. ISSN 0019-9958.
External links
- "TMG – Compiler writing language". HOPL: Online Historical Encyclopaedia of Programming Languages. http://hopl.murdoch.edu.au/showlanguage.prx?exp=242.
- on GitHub