harrystays / PeachLang

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

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PeachLang (Programming Language)

PeachLang is a simple interpreted 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! :D) is by far the Dragon Book, Marc-André's book is really cool as well :-)

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

Contact

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

About

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

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


Languages

Language:Ruby 65.3%Language:Yacc 34.7%