translate one language to another? -


is possible translate 1 language interpreter?

heard quercus translate php java? @ first, thought cheap lousy solution give code errors, seems it´s possible so.

could translate php other languages, python or ruby? c++ java , on?

translating 1 language special case class of programs called compilers, interpreters , translators.

this class of program take stream of input symbols ("source code") can usually described formal grammar , output stream of symbols.

that output stream of symbols can be:

  • native assembly code, operating system , hardware machine running on. if so, program referred compiler;
  • native assembly code different os and/or hardware. can called compiler referred cross-compiler;
  • to intermediate form can executed virtual machine of kind. isn't true compiler called compiler anyway. java, c#, f#, vb.net, etc "compilers" fall category;
  • to language entirely. called translator , there examples of, say, java c# translators. typically have varying degrees of success because idioms aren't readily translatable;
  • interpreters follow same principle typically execute processed form in-place rather saving somewhere. perl, php , shell scripts fall category. php example store opcodes in opcode cache intermediate form (if opcoding caching enabled) intermediate form isn't stored it's still safe call php interpreter.

Comments

Popular posts from this blog

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -

openssl - Load PKCS#8 binary key into Ruby -