🎉 Initial source commit

This commit is contained in:
Tony Bark 2025-05-06 20:48:35 -04:00
commit 65814f2164
7 changed files with 1411 additions and 0 deletions

35
README.md Normal file
View file

@ -0,0 +1,35 @@
# 🧪 Glyph
Glyph is a human-readable esoteric programming language that is designed to fit into a 57x57 QR code (~1,187 characters). With the initial implantation scaffold together using GPT, it is written C# with the interpreter based on Dynamic Expresso.
## 🧾 Program Structure
Each line is a command.
```plaintext
verb subject object [modifier]
```
### ⌨️ Commands
| Verb | Function | Example |
| ------ | ------------------- | --------------------- |
| `say` | print to stdout | `say hello world` |
| `set` | assign value | `set x 42` |
| `add` | arithmetic add | `add x 1` |
| `sub` | arithmetic subtract | `sub x 3` |
| `mul` | multiply | `mul x 2` |
| `div` | divide | `div x 10` |
| `if` | conditional | `if x > 10 goto @end` |
| `goto` | jump to label | `goto @start` |
| `def` | define function | `def square x` |
| `ret` | return from func | `ret` |
| `call` | call function | `call square 3` |
| `inp` | input from user | `inp name` |
| `cmp` | compare values | `cmp x y` |
| `mod` | modulo | `mod x 5` |
| `end` | stop execution | `end` |
## 📜 License
I license this project under the GPL v3 license - see [LICENSE](LICENSE) for details.