Skip to content
/ vsi Public

A minimalist turing-complete programming language with an interpreter implemented in Python.

License

Notifications You must be signed in to change notification settings

xash3000/vsi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 the 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

Is it tested

yes, follow the following steps:

$ # first clone the repository
$ git clone https://github.com/afaki077/vsi.git
$ # change directory to the clone repository
$ cd vsi
$ # install required packages for testing
$ pip install -r test-requirements.txt
$ # let's run tests
$ py.test

LICENSE

MIT

see LICENSE file for more information.

About

A minimalist turing-complete programming language with an interpreter implemented in Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages