Skip to content
/ PeachLang Public

🍑 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/

Notifications You must be signed in to change notification settings

pH-7/PeachLang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy