Anyone knows the complete chain of operations from .c
source code to finally an executable .exe
?
I've downloaded the source of gcc,and found its c-parser.y
is also written in c:
extdef:
fndef
| datadef
| ASM_KEYWORD '(' expr ')' ';'
{ STRIP_NOPS ($3);
if ((TREE_CODE ($3) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND ($3, 0)) == STRING_CST)
|| TREE_CODE ($3) == STRING_CST)
assemble_asm ($3);
else
error ("argument of `asm' is not a constant string"); }
| extension extdef
{ pedantic = $<itype>1; }
;
So anyone knows the complete story of c's self-hosting?
UPDATE
I know how some compilers for scripts are written,most of them depends on c compilers.
So I'm now asking how c compiler works.