Skip to content

im-fiv/prog-lang

 
 

Repository files navigation

Prog Lang

Build Status Language Contributions Lines of Code Hits-of-Code

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.

Notable Features

  • 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.

Whats Next

  • Objects
  • Spanned error reporting
  • More standard functions
  • Improved stability

Getting Started

You can follow these simple steps to get started with Prog Lang:

  1. Clone the Repository:
git clone https://github.com/im-fiv/prog-lang.git
  1. Build the project:
cd prog-lang
cargo build --release
  1. Run:
cargo run -- run file_name.prog

Syntax

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

License

Prog Lang is MIT licensed.

About

A made-for-fun interpreted programming language written in Rust during the TulaHack 2024

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 89.7%
  • CSS 6.3%
  • HTML 2.3%
  • JavaScript 1.7%