Mind map
COMPILER
Map content
COMPILER
Is a computer program that translates text written in a computer language into another computer languague
- Compilation
Operations
- Lexing
- Preprocessing
- Parsing
- Semantic analysis
- Code optimizations
- Code generation
Characteristics
- Bug-free
- It generates correct machine code
- This code must run fast
- It must run fast
- It must be portable
- It must print good diagnostics and error messages
Types
- One-pass compiler
- It passes through the source code of each compilation unit only once
- It can´t look back at a code it previously processed
- Limited scope available
- It passes through the source code of each compilation unit only once
- Multi-pass compiler
- It processes the source code several times
- The intermediate code is improved pass by pass
- Greater scope of the passes
- Better code generation
- It processes the source code several times
- Source-to-source compiler
- It takes a high level language
- Its inputs and outputs a high level language
- It takes a high level language
- One-pass compiler
Classification
- A native compiler
- Its output is intended to directly run on the same type of computer
- Cross compiler
- Is designed to run on a different platform
- A native compiler
Design
- The source language is large and complex and high quality output
- The design may be split into a number of relatively independent phases
- Front end
- It is where syntactic and semantic processing takes place
- It includes all analysis phases end the intermediate code generator
- Middle end
- It performs optimizations on a form other than the source code
- Back end
- It performs more analysis, transformations and optimizations that are for a particular computer
- It generates code for a particular processor and OS
- Front end
- The design may be split into a number of relatively independent phases
- The source language is large and complex and high quality output
Analysis
- The source program is analyzed to determine whether it meets the syntactic and static semantic constraints
- Lexical analysis
- It works as interface between source program and syntax analyzer
- It reads a stream of characters as an input and produce a sequence of tokens
- Syntax Analysis
- Syntax analyser or parser groups the tokens produced by the scanner into syntactic structures
- Parsing expressions and statements
- Syntax analyser or parser groups the tokens produced by the scanner into syntactic structures
- Semantic Analysis
- It is a pass by a compiler that adds semantical information to the parse tree
- It performs certain checks
- Lexical analysis
- The source program is analyzed to determine whether it meets the syntactic and static semantic constraints
Out target program
- Code generator
- Process by which a compiler´s code generator converts a syntactically-correct program into a series of instructions
- Code optimizier
- Process of tuning the output of a compiler to minimize some attribute of an executable program
- Intermediate code generator
- Three address code
- Code generator
Information
- Description
- Mind Map on COMPILER, created by Manuela Idarraga on 16/09/2020.
- Created by
- Manuela Idarraga
- Views
- 11
- Rating