Prog Lang is an interpreted programming language written in Rust, developed during the TulaHack 2024. It is designed to be as simple and as lightweight as possible. I have forked the original repository in order to preserve the exact version that we presented.
- Interpreted: Albeit slower than compiled languages, does not require an architecture-dependent compiler and can be run on any machine.
- Syntax: Designed to be as simple as possible. Basic features, basic syntax.
- Parsing Library: Utilizes pest.rs to parse the source code, enabling quick modifications to the grammar when needed.
- Objects
- Spanned error reporting
- Classes
- More standard functions
- Improved stability
You can follow these simple steps to get started with Prog Lang:
- Clone the Repository:
git clone https://github.com/im-fiv/prog-lang.git
- Build the project:
cd prog-lang
cargo build --release
- Run:
cargo run -- run file_name.prog
The specifications of Prog Lang are still being considered, but here's the currently accepted syntax:
// this is a comment!
/* and so is this */
def variable_definition = "hello, world!"
def module_import = ("path goes here") -> import
def user_input = ("what is your favorite food?: ") -> input
variable_definition = "variable reassign!"
def function_definition = func(arg1, arg2) do
return arg1 + arg2
end
def returning_void = func() do
return void
end
def function_call = (2, 2) -> function_definition
if function_call == 4 then
("math works!") -> print
end
while function_call < 15 do
("while loop: ", function_call) -> print
function_call = function_call + 1
end
Alternatively, the grammar file can be found at crates/prog-parser/src/grammar.pest
Prog Lang is MIT licensed.