Crates.io | roost-lang |
lib.rs | roost-lang |
version | 2.0.4 |
source | src |
created_at | 2022-07-27 18:29:09.866119 |
updated_at | 2022-08-01 18:58:13.975754 |
description | Interpreter library for the roost language |
homepage | |
repository | https://github.com/RubixDev/Roost |
max_upload_size | |
id | 634023 |
size | 1,183,010 |
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.
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