Complete compiler

We have individually viewed all the stages of a compiler. We will now combine the entire code together to write the complete compiler.

%183 node_1 Parsing node_2 Transformation node_1->node_2 node_3 Code generation node_2->node_3
Press + to interact
var input = '(add 2 (subtract 4 2))';
console.log('Input: ' + input);
var tokens = tokenizer(input);
var ast = parser(tokens);
var newAst = transformer(ast);
var output = codeGenerator(newAst);
console.log('Output: ' + output);