A tiny evaluator and transpiler of arithmetic expressions.
Switch branches/tags
Nothing to show
Latest commit 1096c0a Sep 25, 2017 @mgechev mgechev Format comments
Failed to load latest commit information.
README.md Update broken link Sep 16, 2017
tiny.js Format comments Sep 24, 2017


Tiny Interepter and Transpiler

A tiny interpreter and compiler which shows the basics of compiler development.

For more details see the source or my blog post "Implementing a Simple Compiler on 25 Lines of JavaScript"

Along the implementation you can find sample (and simple) implementations of:

  • Lexer which produces a list of tokens (module for lexical analysis).
  • Parser which produces an Abstract Syntax Tree (AST) (module for syntax analysis).
  • Interpreter which traverses and evaluates the AST.
  • EBNF grammar.
  • Recursive Descent Parsing.