Interpreter for the Shrug Programming Language
Project description
ShrugProgrammingLanguage
WORK IN PROGRESS
Interpreter for the Shrug Programming Language
Shrug is a imperative, dynamically-typed, very very high-level, general-purpose programming language
Language spec
n
assignment
n 1
math operators start with ¯\_(ツ)_/¯
addition
¯\_(ツ)_/¯ n 3
subtraction
¯\_(ツ)_/¯ n ¯\_(ツ)_/¯ 3
multiplication
¯\_(ツ)_/¯ n ¯\_(ツ)_/¯¯\_(ツ)_/¯ 4
division
¯\_(ツ)_/¯ n ¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ 4
modulus
¯\_(ツ)_/¯ n ¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ 4
comparators start with ¯\_(ツ)_/¯¯\_(ツ)_/¯
equality
¯\_(ツ)_/¯¯\_(ツ)_/¯ n m
inequality
¯\_(ツ)_/¯¯\_(ツ)_/¯ n ¯\_(ツ)_/¯ m
greater than
¯\_(ツ)_/¯¯\_(ツ)_/¯ n ¯\_(ツ)_/¯¯\_(ツ)_/¯ m
less than
¯\_(ツ)_/¯¯\_(ツ)_/¯ n ¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ m
logical operators follow a comparator
AND
¯\_(ツ)_/¯
OR
¯\_(ツ)_/¯¯\_(ツ)_/¯
XOR
¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯
conditional
¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ comparator statement1 ¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ comparator2 statement2 ¯\_(ツ)_/¯¯\_(ツ)_/¯ <- optional default statement statement2 ¯\_(ツ)_/¯ <- end conditional
iteration
¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ n <- run statement n times statement ¯\_(ツ)_/¯ <- end iteration
¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ x arr <- for each x in arr statement ¯\_(ツ)_/¯ <- end iteration
¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯¯\_(ツ)_/¯ cond <- run statement while cond is true statement ¯\_(ツ)_/¯ <- end iteration
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for shrug_lang-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e13c9eaaca9cfe44de61f3efbe6b16adf3d9581f1f410c48771a8e15a28c5cb0 |
|
MD5 | 0ae56ec9cb24292d1edef9bbee1c3a67 |
|
BLAKE2b-256 | e1d86198c71ab5b907a927465f28d13fd4da46ce9a20c55a3656b4914cb3a406 |