看板 Perl 關於我們 聯絡資訊
大家都知道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
kdjf:wikipedia/perl/Implementation 06/18 15:24
kdjf:先去看看吧 06/18 15:24
kdjf:每個語言都不太一樣,從純interpreted(eg. bash)到幾乎變成 06/18 15:26
kdjf:binary(eg. perl) wiki/Interpreter_(computing)也可以看看 06/18 15:27
yaote:Wiki並沒有解釋如何變成binary code的細節。 06/18 15:33
yaote:只是都是個抽象的大概解釋,沒有較Detail的流程 06/18 15:33