Code Monkey home page Code Monkey logo

monkey_lang's Introduction

Monkey Lang

⚠ Disclaimer

This language is mostly based on the fantastic book Writing An Interpreter In Go This implementation of monkeyLang is for educational purpose only, as I want to learn more about compilers and interpreters. I am neither an experienced rust developer (as of Aug 16 2023) nor do I know anything about developing a programming language, so this repo is most probably far from best-practices and is not optimized at all. This is just me learning new stuff.

Why rust?

At this point you are probably asking why am I writing Interpreter in rust using a book that uses Go. The answer is how else can I write ⚡blazing fast⚡ and memory-safe code to implement a not so optimized and unsafe language?

well ... not really. I am just fascinated by rust and I was waiting for the best excuse to learn rust. and what excuse is better than learning about rust and Interpreters/Compilers at the same time?

Features

the language is mostly gonna be based on the book, but may also include more features e.g. more data types.

Structure

Lexer

Given an input string, we first tokenize it with the help of the Lexer. At this step we don't care about the syntax or the semantics of our language. We only define what is considered an identifier, a keyword, an operator, etc.

Parser

After tokenization, the Parser will basically check for the correctness of the syntax. It reads through the tokens and builds an Abstract Syntax Tree. The tree is an abstract summarization of our grammar for the given input. it is abstract because it does not contain some inessential parts of the syntax like punctuation(braces, brackets and etc.)

Current State

Feature State
Lexer Implemented basic features, more features to be added
Parser Working on it
AST Working on it
Eval/Semantics Not developed yet

monkey_lang's People

Contributors

mahbodghadiri avatar

Stargazers

MehrdadAramesh avatar danial azimi avatar joseph avatar Arman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.