https://github.com/ph-7/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 to MACournoyer's book http://01script.com/comment-creer-son-langage-de-programmation/
https://github.com/ph-7/peachlang
bison interpreted-language interpreted-languages interpreted-programming-language interpreter language own-language parser peach-language peachlang programming programming-language programming-languages racc ruby simple-programming-language yacc
Last synced: about 2 months ago
JSON representation
: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/
- Host: GitHub
- URL: https://github.com/ph-7/peachlang
- Owner: pH-7
- Created: 2017-10-11T18:20:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-02T02:08:35.000Z (about 2 years ago)
- Last Synced: 2025-04-09T20:05:33.325Z (about 2 months ago)
- Topics: bison, interpreted-language, interpreted-languages, interpreted-programming-language, interpreter, language, own-language, parser, peach-language, peachlang, programming, programming-language, programming-languages, racc, ruby, simple-programming-language, yacc
- Language: Ruby
- Homepage: https://github.com/pH-7/PeachLang
- Size: 48.8 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](http://01script.com/comment-creer-son-langage-de-programmation/).
Although my favorite book (my bedside book TBH! 👌) is by far the [Dragon Book](https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniques,_and_Tools), Marc-André's book is also a really good one! 😊
## 📓 Usage
From your terminal, you can execute the example peach file:
```bash
ruby src/PeachLang examples/PeachLang/say-hello.peach
```Or... use the interactive shell, like
```bash
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:
```bash
racc -o parser.rb grammar.y
```P.S. You will need to install Racc before doing it:
```bash
gem install racc
```## 🚀 Other Programming Languages I've Done
* [JoraLang](https://github.com/pH-7/JoraLang)
* [GoYa Programming Language](https://github.com/pH-7/GoYa)## ✉️ Contact
Any questions, please ask me at *hi {{ AT }} ph7 {{ D0T }} me* or visit [my personal website](https://ph7.me).