Giter Club home page Giter Club logo

ph-7 / peachlang Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 50 KB

:peach: PeachLang™ is a simple interpreted language done with Ruby using Racc (the Ruby version of Yacc/Bison). The language has been made thanks to MACournoyer's book http://01script.com/comment-creer-son-langage-de-programmation/

Home Page: https://github.com/pH-7/PeachLang

Ruby 65.30% Yacc 34.70%
programming-language ruby peachlang interpreter peach-language parser interpreted-languages programming racc interpreted-language

peachlang's Introduction

PeachLang 🍑 (Programming Language)

PeachLang™ is a simple interpreted programming language done with Ruby using Racc for the parser (Racc is the Ruby version of Yacc/Bison). The language has been made thanks to MACournoyer's book.

Although my favorite book (my bedside book TBH! 👌) is by far the Dragon Book, Marc-André's book is also a really good one! 😊

📓 Usage

From your terminal, you can execute the example peach file:

ruby src/PeachLang examples/PeachLang/say-hello.peach

Or... use the interactive shell, like

PeachLang Interpreter
CTRL+R to quit
>> say("Hi")
Hi
=> nil

⚙️ Modify "grammar.y"

If you change grammar.y parsing rules, you will need to regenerate parser.rb file by using the following command:

racc -o parser.rb grammar.y

P.S. You will need to install Racc before doing it:

gem install racc

🚀 Other Programming Languages I've Done

✉️ Contact

Any questions, please ask me at hi {{ AT }} ph7 {{ D0T }} me or visit my personal website.

peachlang's People

Contributors

ph-7 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

harrystays

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.