Seven Kast USA said:
Hi
pelase explain me complier design of c and i need a small example
complier design all phases in c programming .
by
KAST
You build a compiler around an expression parser, which breaks down a
complex expression into binary arithmetical operations.
Once you have the basic logic, it is not too difficult to add flow control
constructs like if statements and loops.
The binary operations then need to be translated into machine language.
Doing this efficiently is very difficult. However most C statements map
quite simply to assembly language instructions.
I can give you my BASIC interpreter if you like. It is the first half of a
compiler, but it executes instructions immediately rather than producing
machine language. Also of coure the high level language is not C, though it
has a good deal in common with C.