Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jaysmito101/tovie

An Stack Based Programming Language (Compiler + VM)
https://github.com/jaysmito101/tovie

compiler cpp interpreter language programming-language python tovie-lang

Last synced: 2 months ago
JSON representation

An Stack Based Programming Language (Compiler + VM)

Awesome Lists containing this project

README

        








GitHub repo size
Lines of code
GitHub commit activity


GitHub Workflow Status
Maintenance
Support me on Patreon



# Tovie Lang

An Advanced Programming Language (Compiler + Interpreter + Transpiler ).

# Docs :
### For Help join our discord server : https://discord.gg/3h5S2cSbm8
### https://github.com/Jaysmito101/tovie/wiki

# What can it do?

* All Arithmetic operations
* Dynamic Memory Allocation
* Call Native Functions By Loading DLL or SO
* String management
* Library System
* While, Do, For loops
* If statements
* User Input, ...

# Todo

* A standard library in tovie
* A standard library implemented in c
* Add more examples

## Usage

Usage: C:\Users\Jaysmito Mukherjee\Desktop\tovie\bin\tovie.exe [options]

Options:
-h, --help ............ prints this message and exits
-v, --version ......... prints tovie's version and exits
-r, --run ............. runs instead of compiling (`-f` will specify the backend; will also compile if `-o` is given)
-d, --debug ........... prints useful debug information
-o, --output ... specifies the output-file
-f, --format . specifies the output-format (bytecode,table,c,python; default: bytecode)
-i, --include .. specifies include directories (can be used multiple times)
-I, --input .. specifies the input-format (source,bytecode; default: extension)

## Examples :

### 1. Hello World

proc_main
"Hello World!"
puts
proc_end

### 2. Factorial

def
proc_factorial
1 memset_0
true while
dup memget_0 * memset_0
1 -
dup > 0
while_end
memget_0
proc_end

### 4. Using Arrays

dec data:int[35]
proc_main
dec i:int
0 >i
1
for_15
dup >data[i]
1 +
i
for_end

for_15
i


def
proc_2
dec tmp:int
0 >tmp
32 for
tmp
for_end
proc_end

def
proc_3
0 >board[0]
0 >board[1]
0 >board[2]
0 >board[3]
0 >board[4]
1 >board[5]
0 >board[6]
1 >board[7]
0 >board[8]
0 >board[9]
0 >board[10]
0 >board[11]
0 >board[12]
0 >board[13]
0 >board[14]
0 >board[15]
0 >board[16]
0 >board[17]
0 >board[18]
0 >board[19]
0 >board[20]
1 >board[21]
0 >board[22]
1 >board[23]
0 >board[24]
0 >board[25]
0 >board[26]
0 >board[27]
0 >board[28]
0 >board[29]
0 >board[30]
0 >board[31]
proc_end

def
proc_5
dec t1:int
dec t2:int
dec t3:int
>t3 >t2 >t1
if
proc_4
dec b0:int
dec b1:int
dec tmp2:int
dec tmp3:int
dec tmp4:int
dec tmp5:int
dec tmp:int
b0
b1
0 >tmp
32 for
tmp2
tmp2
tmp5
>tmp4
>tmp3
end_if
if tmp5
tmp2
tmp4
tmp3
end_if
if tmp5
tmp4
tmp3
end_if
board[tmp]
tmp
for_end
proc_end

proc_main
load_arr call
COUNT for
print_arr call
" " putsln
do_cycle call
for_end
proc_end

# How to install and use tovie?

Requirements:
- git (optional)
- make
- g++

You have to download this repository, you go to *tags* and download the latest version or use `git clone`:
```
$ git clone https://github.com/Jaysmito101/tovie
$ cd tovie
```

To build **tovie** just run `make`:
```
$ make
```

Your built `tovie` executable (or `tovie.exe` on windows) is in `bin`, run `tovie -h` to print a help message.

> *Have fun using Tovie!*

# Support

Any support would be highly appretiated!

For example you could add a feature and contribute via pull requests or you could even report any issues with the program!

And the best thing you could do to support this project is spread word about this so that more people who might be interested in this may use this!

Please considering tweeting about this!





Visitors