Compiler and interpreter lexicon

Last Update: 2023-04-16

This is a collection of terms used for compilers and interpreters.


Transforms source code into another format like machine code (assembler) or bytecode, which can be executed/interpreted later on. Examples: gcc, clang, javac.

A compiler can partially be an interpreter when using features such as constant evaluation or during optimization.

Examples for outputs: x86_64 binary, WASM or minified ECMAScript code.


Executes the source code. Examples: CPython, V8.

An interpreter can partially be an compiler when using methods such as JIT compilation.


The part of the compiler/interpreter which intreprets your code and represents it in an internal format.


The part of the compiler/interpreter which executes/transforms the internal format generated by the frontend. A popular backend is LLVM.


Just-in-time compilation is a method to compile code and immediatly execute it. Examples: ECMAScript engines, JVM.


Operations done during compile-time are performed by the compiler. These are compile steps like parsing the code, optimizations or executing const expressions in C++.


Operations done while the program is executed. Programming languages also have a runtime environment, which are things like multi-threading, a virtual machine (like the JVM or WASM), reflection or garbage collection.


GC - Garbage collection - is responsible for freeing unused memory.


Transforms code (text) into a token stream. Examples for tokens: identifier, integer, strings, keywords, operators. Lexers can be generated by projects such as flex or logos.


Transform token stream of the lexer into an (abstract) syntax tree.


The abstract syntax tree (AST) is an representation of syntactic structure of the code (text).

Operator-precedence parser

A parser method for parsing expressions with operators which have precendence (like '+' and '*').