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! 😊
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
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
Any questions, please ask me at hi {{ AT }} ph7 {{ D0T }} me or visit my personal website.