源代码到源代码编译器(英語:source-to-source compiler)、翻译器(transcompiler)或转译器(transpiler)是以某种编程语言的程序源代码作为输入,生成以另一种编程语言构成的等效源代码的编译器。源代码到源代码编译器会在大致相同的抽象级别之间抽象化,而传统編譯器则从一个较高等级的高级语言转换为低级语言。举例来说,源代码到源代码编译器可以将一个程序从Pascal转换为C语言。自动并行化编译器经常采用高级语言的程序作为输入,然后转换代码并增加并行代码注释(例如OpenMP)或语言结构(例如Fortran的forall
语句)。[1]
此條目可参照外語維基百科相應條目来扩充。 |
转译语言的例子包括:Closure Compiler、Coccinelle、CoffeeScript、Dart、Haxe、Nim、TypeScript[2]、Vala和Emscripten。[3]
参考资料
Wikiwand in your browser!
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.