top | item 35093022

(no title)

samsaga2 | 3 years ago

If the languages are similar:

  1. Tokenize
  2. Build AST tree
  3. Emit target code from the AST tree
If they are very different:

  1. Tokenize
  2. Build AST tree
  3. Create a simple intermediate language from the AST tree
  4. Emit target code from the intermediate language
It is the same as building a whole compiler, but without the optimization/register allocator passes.

discuss

order

No comments yet.