Compilers
Programs that translate source code into machine code through lexing, parsing, analysis, optimisation and code generation.
Edited by Alex C, EduAlx · Sources cited below
Explanation
Hopper's A-0 (1952) and Backus's FORTRAN compiler (1957) began the field. Chomsky's grammar hierarchy and Backus–Naur form describe syntax. LLVM (Lattner, 2003 onward) is a widely used modern compiler infrastructure. Interpreters and JIT compilers (V8, JVM HotSpot) are related approaches.
Example
How it works, step by step
- Lexical analysis: characters → tokens
- Parsing: tokens → syntax tree
- Semantic analysis: types and scopes
- Intermediate representation and optimisation
- Code generation for the target machine
Open the interactive page with diagrams →
People behind it
- Grace Hopper (1906–1992), Computer science, USA: US Navy rear admiral; built the first compiler (A-0) and influenced COBOL.
- John Backus
- Noam Chomsky
- Frances Allen
References
- J. W. Backus et al., Proc. Western Joint Computer Conf. 1957, 188–198.
- N. Chomsky, IRE Trans. Inf. Theory 1956, 2, 113–124.
Textbooks
- Compilers: Principles, Techniques, and Tools, Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman (Pearson, 2nd ed. 2006). The 'Dragon Book'.
Related topics
Programming paradigmsMachine learningNeural networks and backpropagationPublic-key cryptography (Diffie–Hellman, RSA)Transformers and large language modelsInformation theory and entropyArtificial intelligence: search and the Turing testWorld Wide Web, HTTP and HTMLSoftware engineering and version controlComputer networks and the TCP/IP model