"Reversed stack-based" programming language.
It means it's pushing operations on the stack instead of values.
- Go 100%
|
|
||
|---|---|---|
| .vscode | Adds README.md | |
| example | Added new math OPs, and slight fixes | |
| .gitignore | Initial commit | |
| go.mod | Adds emulation, lexing and two operations | |
| LICENSE | Fix name in LICENSE | |
| main.go | Added new math OPs, and slight fixes | |
| README.md | Update README.md | |
Yico
Warning
The core ideas of the project changed recently, this README is outdated
Yico is a "reversed stack-based" programming language, meaning it's pushing operations instead of values on a stack.
Operations
| Token | Name | Arguments | Return values |
|---|---|---|---|
. |
2 | 0 | |
+ |
Add | 2 | 1 |
- |
Subtract | 2 | 1 |
* |
Multiply | 2 | 1 |
/ |
Divide | 2 | 1 |
% |
Remainder | 2 | 1 |
Examples
They are located in the ./examples directory.
basic_math.yico
. + 34 35
. / 840 2
. % 69 2
. * -1 - 1 * 35 2
Expected output:
69
420
1
69