Skip to main content

very simple interpreter written in pure python

Project description

vsi

very simple interpreter written in pure python without any third party dependencies.

Installation

you will need python interpreter and pip package manager after that run this command

$ pip install vsi

note: for linux and mac users you may want to prefix command with sudo

Quick Start

# this is a comment

# variables
x := 1;
y := x + 2;

# printing
print x;
print y;

# if statements
if y > x then
    z := y;
# optional else
else
    z := x;
done

# while statemnt
while x < 5 do
    x := x + 1;
    print x;
done

save this to hello.vsi file and then

$ vsi hello.vsi

output

1
3
2
3
4
5

see more examples at examples/ folder

LICENSE

MIT

see LICENSE file for more information.

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

vsi-0.1.tar.gz (5.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page