Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们知道编译器可以将高级语言转换为低级语言,例如将 C 转换为汇编。
但有可能反过来吗?
在某种程度上,是的。它们被称为反编译器。
http://en.wikipedia.org/wiki/Decompiler
通过输入到输出的正确映射,任何语言都可以转换为任何其他语言,假设存在映射每种语言的每个特征的机制。
此类工具的实用性值得商榷,生成的代码的可读性/可维护性简直糟糕透顶。
但是你说的是理论,是的,理论上可以将任何语言 X 映射到任何其他语言 Y。