All Projects → mgechev → Tiny Compiler

mgechev / Tiny Compiler

A tiny evaluator and compiler of arithmetic expressions.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Tiny Compiler

Lioness
The Lioness Programming Language
Stars: ✭ 155 (-77.21%)
Mutual labels:  compiler, ast, interpreter
Cub
The Cub Programming Language
Stars: ✭ 198 (-70.88%)
Mutual labels:  compiler, ast, interpreter
Webassemblyjs
Toolchain for WebAssembly
Stars: ✭ 566 (-16.76%)
Mutual labels:  compiler, ast, interpreter
Enso Archive
Looking for Enso, the visual programming language? ➡️ https://github.com/enso-org/enso
Stars: ✭ 305 (-55.15%)
Mutual labels:  compiler, interpreter
Lbforth
Self-hosting metacompiled Forth, bootstrapping from a few lines of C; targets Linux, Windows, ARM, RISC-V, 68000, PDP-11, asm.js.
Stars: ✭ 293 (-56.91%)
Mutual labels:  compiler, interpreter
Exprtk
C++ Mathematical Expression Parsing And Evaluation Library
Stars: ✭ 301 (-55.74%)
Mutual labels:  compiler, ast
js-ziju
Compile javascript to LLVM IR, x86 assembly and self interpreting
Stars: ✭ 112 (-83.53%)
Mutual labels:  interpreter, ast
V8
The official mirror of the V8 Git repository
Stars: ✭ 18,808 (+2665.88%)
Mutual labels:  compiler, interpreter
Umka Lang
Umka: a statically typed embeddable scripting language
Stars: ✭ 308 (-54.71%)
Mutual labels:  compiler, interpreter
Passerine
A small extensible programming language designed for concise expression with little code.
Stars: ✭ 341 (-49.85%)
Mutual labels:  compiler, interpreter
Ph7
An Embedded Implementation of PHP (C Library)
Stars: ✭ 422 (-37.94%)
Mutual labels:  compiler, interpreter
Rascal
The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
Stars: ✭ 284 (-58.24%)
Mutual labels:  compiler, interpreter
Swiftpascalinterpreter
Simple Swift interpreter for the Pascal language inspired by the Let’s Build A Simple Interpreter article series.
Stars: ✭ 270 (-60.29%)
Mutual labels:  ast, interpreter
Awesome Graal
A curated list of awesome resources for Graal, GraalVM, Truffle and related topics
Stars: ✭ 302 (-55.59%)
Mutual labels:  ast, interpreter
pascal-interpreter
A simple interpreter for a large subset of Pascal language written for educational purposes
Stars: ✭ 21 (-96.91%)
Mutual labels:  interpreter, ast
Craftinginterpreters
Repository for the book "Crafting Interpreters"
Stars: ✭ 4,298 (+532.06%)
Mutual labels:  compiler, interpreter
Enso
Hybrid visual and textual functional programming.
Stars: ✭ 5,238 (+670.29%)
Mutual labels:  compiler, interpreter
Tiny Compiler
A tiny compiler for a language featuring LL(2) with Lexer, Parser, ASM-like codegen and VM. Complex enough to give you a flavour of how the "real" thing works whilst not being a mere toy example
Stars: ✭ 425 (-37.5%)
Mutual labels:  compiler, ast
Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+312.06%)
Mutual labels:  compiler, interpreter
pyccolo
Declarative instrumentation for Python.
Stars: ✭ 70 (-89.71%)
Mutual labels:  interpreter, ast

Tiny Interpreter and Compiler

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.

You want even smaller compiler?

Here it is!

Compiler in a Tweet

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].