Compliers (typically 3 stages)

1) Frontend

- performs syntax checking by a lexical analyzer and parser.

> Lexical analyzer (or "lexer") separates the input source code text into recognizable language elements (like variable names, operations, compiler directives,etc) called tokens

> Parser performs syntax analysis, enforcing the rules of the language

> Lexer and parser construct a symbol table

2) Middle Stage

- performs analysis and optimization of the program. (eg. delete unused variables or operaions)

> This stage is optional

3) Backend

-constructs machine code from the intermediate program representation.

> The backend first chooses the layout of data memory, organizing variables and functions, then constructs sequences of instructions that will execute the specified behavior.

*Compilers often take advantage of additional tools such as Linkers and Assemblers:

**Linkers are tools that combine partial programs and libraries of compiled code into a single executable

** Assemblers translate between assebly language code to machine code

profile
다시 보면, 더 많은 것들이 보인다.

0개의 댓글