WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

mgechev/tiny-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

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

About

A tiny evaluator and compiler of arithmetic expressions.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •