Roost is a simple example for an interpreted programming language. Its name is a combination of the language it was written in - Rust - and the word "rooster".
I created this language in connection with an obligatory research paper about the structure of a programming language in my 11th grade on school. The resulting paper can be found here. The main focuses of the paper are the lexing and parsing steps, regular and context-free languages, and the grammatical definition of a language. After that a short note on compilers and LLVM follows and some basic implementation details for a tree-walking interpreter are given.
Most of the paper actually refers to rost, an even more stripped down language acting just as a calculator but following the same principles, because while writing I quickly noticed that even Roost is too complex to explain in such a short paper.
The logo seen here and on the paper's title page was created by my friend and classmate Mik Müller.
- rost: A simple interpreted calculator following the same principles
- The german research paper
- roost.rubixdev.de: An online playground for Roost using WebAssembly
- And the corresponding GitHub repository
- rost.rubixdev.de: An online playground for rost using WebAssembly
- And the corresponding GitHub repository
- My school's website
- Rust: The language both Roost and rost were written in
git clone https://github.com/RubixDev/roost.git && cd roost
make release
sudo cp target/release/roost-cli /usr/local/bin/roost
or for just this user:
cp target/release/roost-cli ~/.local/bin/roost
Note: This step assumes you are running Linux and have your $PATH variable setup correctly. On other operating systems you can either run the binary by specifying the whole path or use
cargo run --release
When executing the roost
command without any extra arguments you enter the REPL for Roost. Here you can simply type expressions and execute them one by one.
To run a file (usually ending with .ro
) pass the path to that file as the first argument to roost
. For example:
roost samples/sample.ro