大家都知道Compiler通常用在高階語言C/C++,而Scripting Language通常用
Interpreter做解譯,而我有點搞不清楚Compiler與Interpreter的差別。
就我來說,Compiler很簡單就是下列流程:
C code(printf/for/while) -> [Compiler] ->
Assembly instruction code(ADD/SUB/MOV) -> [Assembler]
-> Machine binary code(0010001)
而Interpreter的角色呢?他是如何轉換成binary code呢?是不是比Compiler多了
幾個步驟呢? 假設我們用Perl寫程式,如何轉換成binary code呢?
Perl -> Interpreter -> a bunch of C code -> compiler -> assembly ->
assembler -> machine binary code?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.34.225.82
→
06/18 15:24, , 1F
06/18 15:24, 1F
→
06/18 15:24, , 2F
06/18 15:24, 2F
→
06/18 15:26, , 3F
06/18 15:26, 3F
→
06/18 15:27, , 4F
06/18 15:27, 4F
→
06/18 15:33, , 5F
06/18 15:33, 5F
→
06/18 15:33, , 6F
06/18 15:33, 6F