The Ultra Simple Python Interpreted Language
This language is very expiremental! I've only been developing it for a day or two.
python main.py <filename>
- Pure-Python implementation
- Flexible(ish)
- Simple
- Small runtime
The language itself is very basic, similar to C or JS. It is very simple.
var (x = 10)
print(x)
>>> 10
As you can see, it creates a variable called x
, then it prints the variable.
var (x = 0)
while (x < 10)
{
print(x)
var (x = x + 1)
}
This will increment x
until it reaches 10
.
Using require()
we can include other scripts into the current script.
You can make comments with ;
.
For example:
var (x = 1)
;var (x = 2)
print(x)
>>> 1
require('Program2.prog')
print('Hello from program 1!')
print('Hello from program 2!')
Todo | Done |
---|---|
Evaluate expressions without eval() |
No |
Switch statement | No |
For statement | No |
Allow var to work without ( and ) |
No |
Implementing arrays | No |
USPIL/ [
interpreter.py (evaluator)
lexer.py (makes tokens)
main.py (this ties it all together)
parse.py (turns the tokens into something better)
pre.py (preprocessor, created for `require()`)
]
Readme last updated <15/7/2017> AUS format