compiler
英 /kəmˈpaɪlə/美 /kəmˈpaɪlər/
n. 名词
编译器;编译程序
基本释义
本义指将一种语言(通常是高级编程语言)翻译成另一种语言(通常是机器码或字节码)的程序。引申义可指任何将某物“汇编”或“整理”成整体的人或物,如“a compiler of data”(数据汇编者)。在计算机科学中,编译器与解释器相对,编译器一次性翻译整个程序,而解释器逐行执行。
构词与来源
源自拉丁语“compilare”,意为“掠夺、收集”,后经古法语“compiler”演变,意为“汇集、编纂”。英语中“compile”加后缀“-er”构成名词,表示“执行编译动作的人或物”。记忆时可联想“将代码汇编成可执行文件”的过程。
常见语境
主要出现在计算机科学、软件工程、学术论文和技术文档中。在日常口语中较少使用,但程序员之间交谈时常见。在新闻报道中,可能涉及科技公司发布新编译器或编译器安全漏洞。商务邮件中,可能用于技术团队沟通。语气中性,正式程度较高。
语法提示
名词,可数。常见句型如“The compiler translates source code into machine code.”(编译器将源代码翻译成机器码。)“Run the compiler to generate the executable.”(运行编译器生成可执行文件。)易错点:与“compile”混淆,后者是动词;与“interpreter”相对,注意区分。
同义词区别
与“translator”相比,“translator”泛指任何翻译程序,但“compiler”特指将高级语言翻译为低级语言。“interpreter”逐行执行,不生成独立的目标文件。“assembler”将汇编语言翻译成机器码,比编译器更底层。选择时,若强调整个程序的翻译,用“compiler”;若强调逐行执行,用“interpreter”。
常见误区
语域偏技术,适合正式场合。无褒贬色彩。常见误用:将“compiler”与“linker”混淆,链接器是合并目标文件生成可执行文件的程序,通常在编译后运行。另外,不要将“compiler”误写为“compilor”等拼写错误。
相关词条
搭配用法
- source code compiler
- compiler optimization
- compiler error
- run the compiler
- compiler design
- compiler warning
- cross compiler
实用例句
The compiler optimized the code for better performance.
She works as a compiler of dictionaries.
This compiler supports the latest C++ standard.
Compile the program with the GNU compiler.
The compiler reported a syntax error on line 5.
He is a compiler of statistical data.