PL and Compiler
- PL is mathematical notation for human, not machine.
- A translator, compiler is for translating PL into one for machine.
- A compiler is a program that reads a program in HLL and translates it into equivalent program in another language for Machine.
- Therefore, it must generate legal, correct code and manage storage of all variables.
- Must agree OS & linker on object file format.
machine, assembly, high level language
- machine lan : binary form. totally machine oriented.
- assembly lan : instruction and memory location are given as symbolic form, machine dependent.
- HLL : mathmetical form, natural language form, machine independent.
Compiler and Interpreter
- An interpreter is a program that reads a pregram in HLL and produces the results of executing this program.
N by M compiler
- A compiler that can read N source programs and produce M target programs.
- This compiler implement several target language interpreting, resulting more complex structure.
Chmosky Hierachy
- Type-0 : unrestricted grammars
- Type-1 : context-sensetive grammars
- Type-2 : context-free grammars
- Type-3 : regular grammar