Compiled vs. Interpreted Languages

A compiled language is one where the program, once compiled, is expressed in the instructions of the target machine. For example, an addition “+” operation in your source code could be translated directly to the “ADD” instruction in machine code. An interpreted language is one where the instructions are not directly executed by the target … Read more

What kinds of patterns could I enforce on the code to make it easier to translate to another programming language? [closed]

I’ve been building tools (DMS Software Reengineering Toolkit) to do general purpose program manipulation (with language translation being a special case) since 1995, supported by a strong team of computer scientists. DMS provides generic parsing, AST building, symbol tables, control and data flow analysis, application of translation rules, regeneration of source text with comments, etc., … Read more

Compiling an AST back to source code

The problem of converting an AST back into source code is generally called “prettyprinting”. There are two subtle variations: regenerating the text matching the original as much as possible (I call this “fidelity printing”), and (nice) prettyprinting, which generates nicely formatted text. And how you print matters depending on whether coders will be working on … Read more