Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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)
- Host: GitHub
- URL: https://github.com/jaysmito101/tovie
- Owner: Jaysmito101
- License: mit
- Created: 2021-11-14T09:38:36.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-05T07:18:36.000Z (about 3 years ago)
- Last Synced: 2024-05-01T19:27:58.100Z (8 months ago)
- Topics: compiler, cpp, interpreter, language, programming-language, python, tovie-lang
- Language: C++
- Homepage:
- Size: 212 KB
- Stars: 26
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# 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 Arraysdec data:int[35]
proc_main
dec i:int
0 >i
1
for_15
dup >data[i]
1 +
i
for_endfor_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!