├── .gitignore ├── .vscode └── launch.json ├── README.md ├── documents ├── README.md ├── externals │ ├── README.md │ ├── board.md │ ├── dialog.md │ ├── mouse.md │ ├── music.md │ ├── paper.md │ ├── pencil.md │ ├── sound.md │ └── stage.md └── internals │ ├── README.md │ ├── cipher.md │ ├── dict.md │ ├── file.md │ ├── global.md │ ├── list.md │ ├── number.md │ ├── string.md │ ├── system.md │ └── time.md ├── examples ├── externals │ ├── awaz.ug │ ├── chember.ug │ ├── hisabliguch.ug │ ├── muzika.ug │ ├── qeghez.ug │ ├── resim.ug │ ├── ressam.ug │ ├── saet.ug │ ├── sohbet.ug │ ├── xet.ug │ └── yuguresh.ug ├── features │ ├── calculation.en │ ├── calculation │ │ ├── calculation.en │ │ ├── calculation.kz │ │ ├── calculation.tr │ │ ├── calculation.ug │ │ ├── calculation.uy │ │ └── calculation.uz │ ├── closure.en │ ├── closure │ │ ├── closure.en │ │ ├── closure.kz │ │ ├── closure.tr │ │ ├── closure.ug │ │ ├── closure.uy │ │ └── closure.uz │ ├── command.en │ ├── command │ │ ├── command.en │ │ ├── command.kz │ │ ├── command.tr │ │ ├── command.ug │ │ ├── command.uy │ │ └── command.uz │ ├── container.en │ ├── container │ │ ├── container.en │ │ ├── container.kz │ │ ├── container.tr │ │ ├── container.ug │ │ ├── container.uy │ │ └── container.uz │ ├── exception.en │ ├── exception │ │ ├── exception.en │ │ ├── exception.kz │ │ ├── exception.tr │ │ ├── exception.ug │ │ ├── exception.uy │ │ └── exception.uz │ ├── hello.en │ ├── hello │ │ ├── hello.en │ │ ├── hello.kz │ │ ├── hello.tr │ │ ├── hello.ug │ │ ├── hello.uy │ │ └── hello.uz │ ├── if.en │ ├── if │ │ ├── if.en │ │ ├── if.kz │ │ ├── if.tr │ │ ├── if.ug │ │ ├── if.uy │ │ └── if.uz │ ├── import.en │ ├── import │ │ ├── import.en │ │ ├── import.kz │ │ ├── import.tr │ │ ├── import.ug │ │ ├── import.uy │ │ └── import.uz │ ├── objective.en │ ├── objective │ │ ├── objective.en │ │ ├── objective.kz │ │ ├── objective.tr │ │ ├── objective.ug │ │ ├── objective.uy │ │ └── objective.uz │ ├── spread.en │ ├── spread │ │ ├── spread.en │ │ ├── spread.kz │ │ ├── spread.tr │ │ ├── spread.ug │ │ ├── spread.uy │ │ └── spread.uz │ ├── type.en │ ├── type │ │ ├── type.en │ │ ├── type.kz │ │ ├── type.tr │ │ ├── type.ug │ │ ├── type.uy │ │ └── type.uz │ ├── variable.en │ ├── variable │ │ ├── variable.en │ │ ├── variable.kz │ │ ├── variable.tr │ │ ├── variable.ug │ │ ├── variable.uy │ │ └── variable.uz │ ├── while.en │ ├── while │ │ ├── while.en │ │ ├── while.kz │ │ ├── while.tr │ │ ├── while.ug │ │ ├── while.uy │ │ └── while.uz │ ├── worker.en │ └── worker │ │ ├── worker.en │ │ ├── worker.kz │ │ ├── worker.tr │ │ ├── worker.ug │ │ ├── worker.uy │ │ └── worker.uz ├── help.ug ├── internals │ ├── box.ug │ ├── file.ug │ ├── global.ug │ ├── number.ug │ ├── string.ug │ ├── system.ug │ └── time.ug ├── language │ ├── en │ │ ├── calculation.en │ │ ├── closure.en │ │ ├── command.en │ │ ├── container.en │ │ ├── exception.en │ │ ├── hello.en │ │ ├── if.en │ │ ├── import.en │ │ ├── objective.en │ │ ├── spread.en │ │ ├── type.en │ │ ├── variable.en │ │ ├── while.en │ │ └── worker.en │ ├── kz │ │ ├── calculation.kz │ │ ├── closure.kz │ │ ├── command.kz │ │ ├── container.kz │ │ ├── exception.kz │ │ ├── hello.kz │ │ ├── if.kz │ │ ├── import.kz │ │ ├── objective.kz │ │ ├── spread.kz │ │ ├── type.kz │ │ ├── variable.kz │ │ ├── while.kz │ │ └── worker.kz │ ├── tr │ │ ├── calculation.tr │ │ ├── closure.tr │ │ ├── command.tr │ │ ├── container.tr │ │ ├── exception.tr │ │ ├── hello.tr │ │ ├── if.tr │ │ ├── import.tr │ │ ├── objective.tr │ │ ├── spread.tr │ │ ├── type.tr │ │ ├── variable.tr │ │ ├── while.tr │ │ └── worker.tr │ ├── ug │ │ ├── calculation.ug │ │ ├── closure.ug │ │ ├── command.ug │ │ ├── container.ug │ │ ├── exception.ug │ │ ├── hello.ug │ │ ├── if.ug │ │ ├── import.ug │ │ ├── objective.ug │ │ ├── spread.ug │ │ ├── type.ug │ │ ├── variable.ug │ │ ├── while.ug │ │ └── worker.ug │ ├── uy │ │ ├── calculation.uy │ │ ├── closure.uy │ │ ├── command.uy │ │ ├── container.uy │ │ ├── exception.uy │ │ ├── hello.uy │ │ ├── if.uy │ │ ├── import.uy │ │ ├── objective.uy │ │ ├── spread.uy │ │ ├── type.uy │ │ ├── variable.uy │ │ ├── while.uy │ │ └── worker.uy │ └── uz │ │ ├── calculation.uz │ │ ├── closure.uz │ │ ├── command.uz │ │ ├── container.uz │ │ ├── exception.uz │ │ ├── hello.uz │ │ ├── if.uz │ │ ├── import.uz │ │ ├── objective.uz │ │ ├── spread.uz │ │ ├── type.uz │ │ ├── variable.uz │ │ ├── while.uz │ │ └── worker.uz ├── merhaba.ug ├── snippets │ ├── apply_assister.en │ ├── apply_creator.en │ ├── apply_worker.en │ ├── assister.en │ ├── creator.en │ ├── exception.en │ ├── hello.en │ ├── if.en │ ├── import.en │ ├── iterate.en │ ├── read.en │ ├── spread.en │ ├── value.en │ ├── variable.en │ ├── while.en │ ├── worker.en │ └── write.en ├── test.en ├── test.ug └── todo.ug ├── extension ├── .gitattributes ├── .gitignore ├── .vscode │ └── launch.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── language-configuration.json ├── others │ ├── icon.png │ └── screenshot.png ├── package.tpl.json ├── syntaxes │ └── tmLanguage.tpl.json └── vsc-extension-quickstart.md ├── main.c ├── others ├── colorize.tpl.js ├── convert.js ├── converter.html ├── document.tpl.md ├── documents.tpl.md ├── empty.tpl.txt ├── features.yml ├── grammars.yml ├── readme.tpl.md ├── snippets.yml └── translate.tpl.js ├── release ├── uyghur.exe └── yuguresh.exe ├── resources ├── bahar.mp3 ├── door.wav ├── examples │ ├── deaw.png │ ├── function.png │ └── running.png ├── icon.ico ├── icon.png ├── languages │ ├── hello.en.png │ ├── hello.kz.png │ ├── hello.tr.png │ ├── hello.ug.png │ ├── hello.uy.png │ └── hello.uz.png ├── road.wav ├── rose.png ├── run.png ├── screenshot.png ├── test.txt └── ukij.ttf ├── run.py ├── scripts ├── README.MD ├── base.py ├── bind.py ├── converter.py ├── converting.py ├── document.py ├── extension.py ├── interpreter.py └── readme.py └── uyghur ├── bridge.c ├── debug.c ├── delegates ├── delegates.h ├── header.h ├── raysan_lib.h ├── riley_lib.h └── tigr_lib.h ├── executer.c ├── externals ├── board.c ├── control.c ├── dialog.c ├── externals.h ├── header.h ├── mouse.c ├── music.c ├── paper.c ├── pencil.c ├── sound.c ├── stage.c └── voyager.c ├── include.h ├── internals ├── cipher.c ├── dict.c ├── file.c ├── global.c ├── header.h ├── list.c ├── number.c ├── string.c ├── stuf.c ├── system.c ├── task.c └── time.c ├── machine.c ├── multilangs ├── aliases.yml ├── configs.yml ├── languages.yml └── letters.yml ├── objects ├── leaf.c ├── token.c └── value.c ├── others ├── constant.h ├── header.h ├── helpers.c ├── tools.c └── utils.c ├── parser.c ├── templates ├── aliases.tpl.h ├── configs.tpl.h ├── languages.tpl.h ├── letters.tpl.h └── module.tpl.c ├── tokenizer.c ├── uyghur.c └── values ├── dictable.c ├── holdable.c ├── listable.c ├── loadable.c ├── objective.c ├── runnable.c └── waitable.c /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /build/ 3 | pure-lua-tools/ 4 | my-build-tools/ 5 | /*.vsix 6 | /*.exe 7 | /*.log 8 | /.vscode/settings.json 9 | __pycache__ 10 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Uyghur", 10 | "type": "debugpy", 11 | "request": "launch", 12 | "program": "${workspaceFolder}/run.py", 13 | "console": "integratedTerminal", 14 | // "args": ["./examples/test.ug"] 15 | }, 16 | { 17 | "name": "Update", 18 | "type": "debugpy", 19 | "request": "launch", 20 | "program": "${workspaceFolder}/run.py", 21 | "console": "integratedTerminal", 22 | "args": ["--update"] 23 | }, 24 | { 25 | "name": "Generate", 26 | "type": "debugpy", 27 | "request": "launch", 28 | "program": "${workspaceFolder}/run.py", 29 | "console": "integratedTerminal", 30 | "args": ["--generate"] 31 | }, 32 | { 33 | "name": "Release", 34 | "type": "debugpy", 35 | "request": "launch", 36 | "program": "${workspaceFolder}/run.py", 37 | "console": "integratedTerminal", 38 | "args": ["--release"] 39 | }, 40 | { 41 | "name": "Extension", 42 | "type": "extensionHost", 43 | "request": "launch", 44 | "args": [ 45 | "--extensionDevelopmentPath=${workspaceFolder}/extension/" 46 | ] 47 | } 48 | ] 49 | } -------------------------------------------------------------------------------- /documents/README.md: -------------------------------------------------------------------------------- 1 | ## UyghurScript Documents 2 | 3 | ### 1. Types 4 | 5 | * CString 6 | * float 7 | * int 8 | * Color 9 | * Vector2 10 | * Rectangle 11 | * ... 12 | 13 | ### 2. Internals 14 | 15 | 16 | - [global](internals/global.md) 17 | - [number](internals/number.md) 18 | - [string](internals/string.md) 19 | - [list](internals/list.md) 20 | - [dict](internals/dict.md) 21 | - [time](internals/time.md) 22 | - [system](internals/system.md) 23 | - [file](internals/file.md) 24 | - [cipher](internals/cipher.md) 25 | 26 | ### 3. Externals 27 | 28 | 29 | - [stage](externals/stage.md) 30 | - [mouse](externals/mouse.md) 31 | - [board](externals/board.md) 32 | - [paper](externals/paper.md) 33 | - [pencil](externals/pencil.md) 34 | - [music](externals/music.md) 35 | - [sound](externals/sound.md) 36 | - [dialog](externals/dialog.md) 37 | 38 | ### 4. Others 39 | 40 | > ... 41 | -------------------------------------------------------------------------------- /documents/externals/README.md: -------------------------------------------------------------------------------- 1 | ## externals Document 2 | 3 | - [stage](stage.md) 4 | - [mouse](mouse.md) 5 | - [board](board.md) 6 | - [paper](paper.md) 7 | - [pencil](pencil.md) 8 | - [music](music.md) 9 | - [sound](sound.md) 10 | - [dialog](dialog.md) 11 | -------------------------------------------------------------------------------- /documents/externals/board.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript board 3 | 4 | > source code [board.c](../../uyghur/externals/board.c) 5 | --- 6 | 7 | ### 1. get_key_action 8 | 9 | > 📝: get_key_action func of board module 10 | 11 | > 🔙: Number 12 | 13 | > 🛒: 14 | * keyCodeOrName `Value` 15 | 16 | 17 | ### 2. get_key_state 18 | 19 | > 📝: get_key_state func of board module 20 | 21 | > 🔙: Number 22 | 23 | > 🛒: 24 | * keyCodeOrName `Value` 25 | 26 | 27 | ### 3. is_pressed 28 | 29 | > 📝: is_pressed func of board module 30 | 31 | > 🔙: Boolean 32 | 33 | > 🛒: 34 | * keyCodeOrName `Value` 35 | 36 | 37 | ### 4. is_pressing 38 | 39 | > 📝: is_pressing func of board module 40 | 41 | > 🔙: Boolean 42 | 43 | > 🛒: 44 | * keyCodeOrName `Value` 45 | 46 | 47 | ### 5. is_released 48 | 49 | > 📝: is_released func of board module 50 | 51 | > 🔙: Boolean 52 | 53 | > 🛒: 54 | * keyCodeOrName `Value` 55 | 56 | 57 | --- 58 | > document info [document.md](../README.md) 59 | -------------------------------------------------------------------------------- /documents/externals/dialog.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript dialog 3 | 4 | > source code [dialog.c](../../uyghur/externals/dialog.c) 5 | --- 6 | 7 | ### 1. inform 8 | 9 | > 📝: inform func of dialog module 10 | 11 | > 🔙: Empty 12 | 13 | > 🛒: 14 | * dialogTitle `CString` 15 | * messageContent `CString` 16 | 17 | 18 | ### 2. confirm 19 | 20 | > 📝: confirm func of dialog module 21 | 22 | > 🔙: Boolean 23 | 24 | > 🛒: 25 | * dialogTitle `CString` 26 | * messageContent `CString` 27 | 28 | 29 | ### 3. input 30 | 31 | > 📝: input func of dialog module 32 | 33 | > 🔙: String 34 | 35 | > 🛒: 36 | * dialogTitle `CString` 37 | * defaultText `CString` 38 | 39 | 40 | ### 4. select_save 41 | 42 | > 📝: select_save func of dialog module 43 | 44 | > 🔙: String 45 | 46 | > 🛒: 47 | * dialogTitle `CString` 48 | * defaultPath `CString` 49 | * filterRule `CString` 50 | 51 | 52 | ### 5. select_open 53 | 54 | > 📝: select_open func of dialog module 55 | 56 | > 🔙: String 57 | 58 | > 🛒: 59 | * dialogTitle `CString` 60 | * defaultPath `CString` 61 | * filterRule `CString` 62 | 63 | 64 | ### 6. select_folder 65 | 66 | > 📝: select_folder func of dialog module 67 | 68 | > 🔙: String 69 | 70 | > 🛒: 71 | * dialogTitle `CString` 72 | * defaultPath `CString` 73 | 74 | 75 | ### 7. select_color 76 | 77 | > 📝: select_color func of dialog module 78 | 79 | > 🔙: String 80 | 81 | > 🛒: 82 | * dialogTitle `CString` 83 | * defaultColor `CString` 84 | 85 | 86 | --- 87 | > document info [document.md](../README.md) 88 | -------------------------------------------------------------------------------- /documents/externals/mouse.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript mouse 3 | 4 | > source code [mouse.c](../../uyghur/externals/mouse.c) 5 | --- 6 | 7 | ### 1. set_visible 8 | 9 | > 📝: set_visible func of mouse module 10 | 11 | > 🔙: Empty 12 | 13 | > 🛒: 14 | * visible `bool` 15 | 16 | 17 | ### 2. is_visible 18 | 19 | > 📝: is_visible func of mouse module 20 | 21 | > 🔙: Boolean 22 | 23 | > 🛒: none 24 | 25 | 26 | ### 3. set_cursor 27 | 28 | > 📝: set_cursor func of mouse module 29 | 30 | > 🔙: Empty 31 | 32 | > 🛒: 33 | * type `int` 34 | 35 | 36 | ### 4. get_position 37 | 38 | > 📝: get_position func of mouse module 39 | 40 | > 🔙: Numbers 41 | 42 | > 🛒: none 43 | 44 | 45 | ### 5. get_wheel 46 | 47 | > 📝: get_wheel func of mouse module 48 | 49 | > 🔙: Number 50 | 51 | > 🛒: none 52 | 53 | 54 | ### 6. get_key_action 55 | 56 | > 📝: get_key_action func of mouse module 57 | 58 | > 🔙: Number 59 | 60 | > 🛒: 61 | * keyCodeOrName `Value` 62 | 63 | 64 | ### 7. get_key_state 65 | 66 | > 📝: get_key_state func of mouse module 67 | 68 | > 🔙: Number 69 | 70 | > 🛒: 71 | * keyCodeOrName `Value` 72 | 73 | 74 | ### 8. is_pressed 75 | 76 | > 📝: is_pressed func of mouse module 77 | 78 | > 🔙: Boolean 79 | 80 | > 🛒: 81 | * keyCodeOrName `Value` 82 | 83 | 84 | ### 9. is_pressing 85 | 86 | > 📝: is_pressing func of mouse module 87 | 88 | > 🔙: Boolean 89 | 90 | > 🛒: 91 | * keyCodeOrName `Value` 92 | 93 | 94 | ### 10. is_released 95 | 96 | > 📝: is_released func of mouse module 97 | 98 | > 🔙: Boolean 99 | 100 | > 🛒: 101 | * keyCodeOrName `Value` 102 | 103 | 104 | --- 105 | > document info [document.md](../README.md) 106 | -------------------------------------------------------------------------------- /documents/externals/music.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript music 3 | 4 | > source code [music.c](../../uyghur/externals/music.c) 5 | --- 6 | 7 | ### 1. load 8 | 9 | > 📝: load func of music module 10 | 11 | > 🔙: Value 12 | 13 | > 🛒: 14 | * path `CString` 15 | 16 | 17 | ### 2. play 18 | 19 | > 📝: play func of music module 20 | 21 | > 🔙: Empty 22 | 23 | > 🛒: 24 | * music `RMusic` 25 | 26 | 27 | ### 3. stop 28 | 29 | > 📝: stop func of music module 30 | 31 | > 🔙: Empty 32 | 33 | > 🛒: 34 | * music `RMusic` 35 | 36 | 37 | ### 4. resume 38 | 39 | > 📝: resume func of music module 40 | 41 | > 🔙: Empty 42 | 43 | > 🛒: 44 | * music `RMusic` 45 | 46 | 47 | ### 5. pause 48 | 49 | > 📝: pause func of music module 50 | 51 | > 🔙: Empty 52 | 53 | > 🛒: 54 | * music `RMusic` 55 | 56 | 57 | ### 6. is_playing 58 | 59 | > 📝: is_playing func of music module 60 | 61 | > 🔙: Boolean 62 | 63 | > 🛒: 64 | * music `RMusic` 65 | 66 | 67 | ### 7. set_volume 68 | 69 | > 📝: set_volume func of music module 70 | 71 | > 🔙: Empty 72 | 73 | > 🛒: 74 | * music `RMusic` 75 | * volume `float` 76 | 77 | 78 | ### 8. update 79 | 80 | > 📝: update func of music module 81 | 82 | > 🔙: Empty 83 | 84 | > 🛒: 85 | * music `RMusic` 86 | 87 | 88 | ### 9. get_length 89 | 90 | > 📝: get_length func of music module 91 | 92 | > 🔙: Number 93 | 94 | > 🛒: 95 | * music `RMusic` 96 | 97 | 98 | ### 10. get_position 99 | 100 | > 📝: get_position func of music module 101 | 102 | > 🔙: Number 103 | 104 | > 🛒: 105 | * music `RMusic` 106 | 107 | 108 | ### 11. set_position 109 | 110 | > 📝: set_position func of music module 111 | 112 | > 🔙: Empty 113 | 114 | > 🛒: 115 | * music `RMusic` 116 | * position `float` 117 | 118 | 119 | --- 120 | > document info [document.md](../README.md) 121 | -------------------------------------------------------------------------------- /documents/externals/paper.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript paper 3 | 4 | > source code [paper.c](../../uyghur/externals/paper.c) 5 | --- 6 | 7 | ### 1. create 8 | 9 | > 📝: create func of paper module 10 | 11 | > 🔙: Value 12 | 13 | > 🛒: 14 | * w `int` 15 | * h `int` 16 | 17 | 18 | ### 2. copy 19 | 20 | > 📝: copy func of paper module 21 | 22 | > 🔙: Value 23 | 24 | > 🛒: 25 | * canvas `ECanvas` 26 | * point `UGPoint` 27 | * size `UGSize` 28 | 29 | 30 | ### 3. crop 31 | 32 | > 📝: crop func of paper module 33 | 34 | > 🔙: Empty 35 | 36 | > 🛒: 37 | * canvas `ECanvas` 38 | * point `UGPoint` 39 | * size `UGSize` 40 | 41 | 42 | ### 4. flip 43 | 44 | > 📝: flip func of paper module 45 | 46 | > 🔙: Empty 47 | 48 | > 🛒: 49 | * canvas `ECanvas` 50 | * xFlip `bool` 51 | * yFlip `bool` 52 | 53 | 54 | ### 5. invert 55 | 56 | > 📝: invert func of paper module 57 | 58 | > 🔙: Empty 59 | 60 | > 🛒: 61 | * canvas `ECanvas` 62 | 63 | 64 | ### 6. tint 65 | 66 | > 📝: tint func of paper module 67 | 68 | > 🔙: Empty 69 | 70 | > 🛒: 71 | * canvas `ECanvas` 72 | * color `UGColor` 73 | * intensity `float` 74 | 75 | 76 | ### 7. fade 77 | 78 | > 📝: fade func of paper module 79 | 80 | > 🔙: Empty 81 | 82 | > 🛒: 83 | * canvas `ECanvas` 84 | * intensity `float` 85 | 86 | 87 | ### 8. blur 88 | 89 | > 📝: blur func of paper module 90 | 91 | > 🔙: Empty 92 | 93 | > 🛒: 94 | * canvas `ECanvas` 95 | * radius `int` 96 | 97 | 98 | ### 9. read 99 | 100 | > 📝: read func of paper module 101 | 102 | > 🔙: Value 103 | 104 | > 🛒: 105 | * path `CString` 106 | 107 | 108 | ### 10. write 109 | 110 | > 📝: write func of paper module 111 | 112 | > 🔙: Empty 113 | 114 | > 🛒: 115 | * canvas `ECanvas` 116 | * path `CString` 117 | 118 | 119 | --- 120 | > document info [document.md](../README.md) 121 | -------------------------------------------------------------------------------- /documents/externals/sound.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript sound 3 | 4 | > source code [sound.c](../../uyghur/externals/sound.c) 5 | --- 6 | 7 | ### 1. load 8 | 9 | > 📝: load func of sound module 10 | 11 | > 🔙: Value 12 | 13 | > 🛒: 14 | * path `CString` 15 | 16 | 17 | ### 2. play 18 | 19 | > 📝: play func of sound module 20 | 21 | > 🔙: Empty 22 | 23 | > 🛒: 24 | * sound `RSound` 25 | 26 | 27 | ### 3. stop 28 | 29 | > 📝: stop func of sound module 30 | 31 | > 🔙: Empty 32 | 33 | > 🛒: 34 | * sound `RSound` 35 | 36 | 37 | ### 4. resume 38 | 39 | > 📝: resume func of sound module 40 | 41 | > 🔙: Empty 42 | 43 | > 🛒: 44 | * sound `RSound` 45 | 46 | 47 | ### 5. pause 48 | 49 | > 📝: pause func of sound module 50 | 51 | > 🔙: Empty 52 | 53 | > 🛒: 54 | * sound `RSound` 55 | 56 | 57 | ### 6. is_playing 58 | 59 | > 📝: is_playing func of sound module 60 | 61 | > 🔙: Boolean 62 | 63 | > 🛒: 64 | * sound `RSound` 65 | 66 | 67 | ### 7. set_volume 68 | 69 | > 📝: set_volume func of sound module 70 | 71 | > 🔙: Empty 72 | 73 | > 🛒: 74 | * sound `RSound` 75 | * volume `float` 76 | 77 | 78 | --- 79 | > document info [document.md](../README.md) 80 | -------------------------------------------------------------------------------- /documents/externals/stage.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript stage 3 | 4 | > source code [stage.c](../../uyghur/externals/stage.c) 5 | --- 6 | 7 | ### 1. set_fps 8 | 9 | > 📝: set_fps func of stage module 10 | 11 | > 🔙: Empty 12 | 13 | > 🛒: 14 | * fps `int` 15 | 16 | 17 | ### 2. get_fps 18 | 19 | > 📝: get_fps func of stage module 20 | 21 | > 🔙: Number 22 | 23 | > 🛒: none 24 | 25 | 26 | ### 3. show 27 | 28 | > 📝: show func of stage module 29 | 30 | > 🔙: Empty 31 | 32 | > 🛒: 33 | * w `int` 34 | * h `int` 35 | * title `CString` 36 | * mode `int` 37 | 38 | 39 | ### 4. update 40 | 41 | > 📝: update func of stage module 42 | 43 | > 🔙: Empty 44 | 45 | > 🛒: none 46 | 47 | 48 | ### 5. is_fullscreen 49 | 50 | > 📝: is_fullscreen func of stage module 51 | 52 | > 🔙: Boolean 53 | 54 | > 🛒: none 55 | 56 | 57 | ### 6. is_hidden 58 | 59 | > 📝: is_hidden func of stage module 60 | 61 | > 🔙: Boolean 62 | 63 | > 🛒: none 64 | 65 | 66 | ### 7. is_minimized 67 | 68 | > 📝: is_minimized func of stage module 69 | 70 | > 🔙: Boolean 71 | 72 | > 🛒: none 73 | 74 | 75 | ### 8. is_maximized 76 | 77 | > 📝: is_maximized func of stage module 78 | 79 | > 🔙: Boolean 80 | 81 | > 🛒: none 82 | 83 | 84 | ### 9. toggle_fullscreen 85 | 86 | > 📝: toggle_fullscreen func of stage module 87 | 88 | > 🔙: Empty 89 | 90 | > 🛒: none 91 | 92 | 93 | ### 10. set_minimize 94 | 95 | > 📝: set_minimize func of stage module 96 | 97 | > 🔙: Empty 98 | 99 | > 🛒: none 100 | 101 | 102 | ### 11. set_maximize 103 | 104 | > 📝: set_maximize func of stage module 105 | 106 | > 🔙: Empty 107 | 108 | > 🛒: none 109 | 110 | 111 | ### 12. set_normalize 112 | 113 | > 📝: set_normalize func of stage module 114 | 115 | > 🔙: Empty 116 | 117 | > 🛒: none 118 | 119 | 120 | ### 13. set_title 121 | 122 | > 📝: set_title func of stage module 123 | 124 | > 🔙: Empty 125 | 126 | > 🛒: 127 | * title `CString` 128 | 129 | 130 | ### 14. set_icon 131 | 132 | > 📝: set_icon func of stage module 133 | 134 | > 🔙: Empty 135 | 136 | > 🛒: 137 | * path `CString` 138 | 139 | 140 | ### 15. set_position 141 | 142 | > 📝: set_position func of stage module 143 | 144 | > 🔙: Empty 145 | 146 | > 🛒: 147 | * x `int` 148 | * y `int` 149 | 150 | 151 | ### 16. get_position 152 | 153 | > 📝: get_position func of stage module 154 | 155 | > 🔙: Numbers 156 | 157 | > 🛒: none 158 | 159 | 160 | ### 17. set_size 161 | 162 | > 📝: set_size func of stage module 163 | 164 | > 🔙: Empty 165 | 166 | > 🛒: 167 | * w `int` 168 | * h `int` 169 | 170 | 171 | ### 18. get_size 172 | 173 | > 📝: get_size func of stage module 174 | 175 | > 🔙: Numbers 176 | 177 | > 🛒: none 178 | 179 | 180 | ### 19. set_clipboard 181 | 182 | > 📝: set_clipboard func of stage module 183 | 184 | > 🔙: Empty 185 | 186 | > 🛒: 187 | * c `CString` 188 | 189 | 190 | ### 20. get_clipboard 191 | 192 | > 📝: get_clipboard func of stage module 193 | 194 | > 🔙: String 195 | 196 | > 🛒: none 197 | 198 | 199 | ### 21. save_screenshot 200 | 201 | > 📝: save_screenshot func of stage module 202 | 203 | > 🔙: Empty 204 | 205 | > 🛒: 206 | * path `CString` 207 | 208 | 209 | --- 210 | > document info [document.md](../README.md) 211 | -------------------------------------------------------------------------------- /documents/internals/README.md: -------------------------------------------------------------------------------- 1 | ## internals Document 2 | 3 | - [global](global.md) 4 | - [number](number.md) 5 | - [string](string.md) 6 | - [list](list.md) 7 | - [dict](dict.md) 8 | - [time](time.md) 9 | - [system](system.md) 10 | - [file](file.md) 11 | - [cipher](cipher.md) 12 | -------------------------------------------------------------------------------- /documents/internals/cipher.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript cipher 3 | 4 | > source code [cipher.c](../../uyghur/internals/cipher.c) 5 | --- 6 | 7 | ### 1. md5 8 | 9 | > 📝: md5 func of cipher module 10 | 11 | > 🔙: String 12 | 13 | > 🛒: 14 | * data `CString` 15 | 16 | 17 | ### 2. base64_encode 18 | 19 | > 📝: base64_encode func of cipher module 20 | 21 | > 🔙: String 22 | 23 | > 🛒: 24 | * data `CString` 25 | 26 | 27 | ### 3. base64_decode 28 | 29 | > 📝: base64_decode func of cipher module 30 | 31 | > 🔙: String 32 | 33 | > 🛒: 34 | * data `CString` 35 | 36 | 37 | ### 4. json_encode 38 | 39 | > 📝: json_encode func of cipher module 40 | 41 | > 🔙: String 42 | 43 | > 🛒: 44 | * value `Value` 45 | 46 | 47 | ### 5. json_decode 48 | 49 | > 📝: json_decode func of cipher module 50 | 51 | > 🔙: Value 52 | 53 | > 🛒: 54 | * json `CString` 55 | 56 | 57 | --- 58 | > document info [document.md](../README.md) 59 | -------------------------------------------------------------------------------- /documents/internals/dict.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript dict 3 | 4 | > source code [dict.c](../../uyghur/internals/dict.c) 5 | --- 6 | 7 | ### 1. count 8 | 9 | > 📝: count given dict size 10 | 11 | > 🔙: Number 12 | 13 | > 🛒: 14 | * dct `Dictable` 15 | 16 | 17 | --- 18 | > document info [document.md](../README.md) 19 | -------------------------------------------------------------------------------- /documents/internals/file.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript file 3 | 4 | > source code [file.c](../../uyghur/internals/file.c) 5 | --- 6 | 7 | ### 1. write 8 | 9 | > 📝: write func of file module 10 | 11 | > 🔙: Boolean 12 | 13 | > 🛒: 14 | * path `CString` 15 | * content `CString` 16 | 17 | 18 | ### 2. read 19 | 20 | > 📝: read func of file module 21 | 22 | > 🔙: String 23 | 24 | > 🛒: 25 | * path `CString` 26 | 27 | 28 | ### 3. copy 29 | 30 | > 📝: copy func of file module 31 | 32 | > 🔙: Boolean 33 | 34 | > 🛒: 35 | * from `CString` 36 | * to `CString` 37 | 38 | 39 | ### 4. rename 40 | 41 | > 📝: rename func of file module 42 | 43 | > 🔙: Number 44 | 45 | > 🛒: 46 | * from `CString` 47 | * to `CString` 48 | 49 | 50 | ### 5. remove 51 | 52 | > 📝: remove func of file module 53 | 54 | > 🔙: Number 55 | 56 | > 🛒: 57 | * path `CString` 58 | 59 | 60 | ### 6. is_exist 61 | 62 | > 📝: is_exist func of file module 63 | 64 | > 🔙: Boolean 65 | 66 | > 🛒: 67 | * path `CString` 68 | 69 | 70 | ### 7. is_file 71 | 72 | > 📝: is_file func of file module 73 | 74 | > 🔙: Boolean 75 | 76 | > 🛒: 77 | * path `CString` 78 | 79 | 80 | ### 8. is_directory 81 | 82 | > 📝: is_directory func of file module 83 | 84 | > 🔙: Boolean 85 | 86 | > 🛒: 87 | * path `CString` 88 | 89 | 90 | ### 9. create_directory 91 | 92 | > 📝: create_directory func of file module 93 | 94 | > 🔙: Number 95 | 96 | > 🛒: 97 | * path `CString` 98 | 99 | 100 | --- 101 | > document info [document.md](../README.md) 102 | -------------------------------------------------------------------------------- /documents/internals/global.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript global 3 | 4 | > source code [global.c](../../uyghur/internals/global.c) 5 | --- 6 | 7 | ### 1. get_language 8 | 9 | > 📝: get the value of current language 10 | 11 | > 🔙: String 12 | 13 | > 🛒: none 14 | 15 | 16 | ### 2. get_name 17 | 18 | > 📝: get the name of current language 19 | 20 | > 🔙: String 21 | 22 | > 🛒: none 23 | 24 | 25 | ### 3. read 26 | 27 | > 📝: input a value from termial 28 | 29 | > 🔙: String 30 | 31 | > 🛒: none 32 | 33 | 34 | ### 4. write 35 | 36 | > 📝: output a value to terminal 37 | 38 | > 🔙: Empty 39 | 40 | > 🛒: none 41 | 42 | 43 | ### 5. trace 44 | 45 | > 📝: print trace of the func call 46 | 47 | > 🔙: Empty 48 | 49 | > 🛒: 50 | * msg `CString` 51 | 52 | 53 | ### 6. import 54 | 55 | > 📝: inport a module and return a box 56 | 57 | > 🔙: Value 58 | 59 | > 🛒: 60 | * path `CString` 61 | 62 | 63 | ### 7. clean 64 | 65 | > 📝: clean a module from module cache 66 | 67 | > 🔙: Empty 68 | 69 | > 🛒: 70 | * path `CString` 71 | 72 | 73 | ### 8. sweep 74 | 75 | > 📝: sweep func of global module 76 | 77 | > 🔙: Empty 78 | 79 | > 🛒: none 80 | 81 | 82 | --- 83 | > document info [document.md](../README.md) 84 | -------------------------------------------------------------------------------- /documents/internals/list.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript list 3 | 4 | > source code [list.c](../../uyghur/internals/list.c) 5 | --- 6 | 7 | ### 1. count 8 | 9 | > 📝: count func of list module 10 | 11 | > 🔙: Number 12 | 13 | > 🛒: 14 | * lst `Listable` 15 | 16 | 17 | --- 18 | > document info [document.md](../README.md) 19 | -------------------------------------------------------------------------------- /documents/internals/string.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript string 3 | 4 | > source code [string.c](../../uyghur/internals/string.c) 5 | --- 6 | 7 | ### 1. replace 8 | 9 | > 📝: replace func of string module 10 | 11 | > 🔙: String 12 | 13 | > 🛒: 14 | * origin `CString` 15 | * fromText `CString` 16 | * toText `CString` 17 | * fromIndex `double` 18 | * toIndex `double` 19 | * replaceCount `double` 20 | 21 | 22 | ### 2. replace_first 23 | 24 | > 📝: replace_first func of string module 25 | 26 | > 🔙: String 27 | 28 | > 🛒: 29 | * origin `CString` 30 | * fromText `CString` 31 | * toText `CString` 32 | 33 | 34 | ### 3. replace_last 35 | 36 | > 📝: replace_last func of string module 37 | 38 | > 🔙: String 39 | 40 | > 🛒: 41 | * origin `CString` 42 | * fromText `CString` 43 | * toText `CString` 44 | 45 | 46 | ### 4. replace_all 47 | 48 | > 📝: replace_all func of string module 49 | 50 | > 🔙: String 51 | 52 | > 🛒: 53 | * origin `CString` 54 | * fromText `CString` 55 | * toText `CString` 56 | 57 | 58 | ### 5. find 59 | 60 | > 📝: find func of string module 61 | 62 | > 🔙: Number 63 | 64 | > 🛒: 65 | * origin `CString` 66 | * fromIndex `double` 67 | * toIndex `double` 68 | * index `double` 69 | 70 | 71 | ### 6. find_first 72 | 73 | > 📝: find_first func of string module 74 | 75 | > 🔙: Number 76 | 77 | > 🛒: 78 | * origin `CString` 79 | 80 | 81 | ### 7. find_last 82 | 83 | > 📝: find_last func of string module 84 | 85 | > 🔙: Number 86 | 87 | > 🛒: 88 | * origin `CString` 89 | 90 | 91 | ### 8. cut 92 | 93 | > 📝: cut func of string module 94 | 95 | > 🔙: String 96 | 97 | > 🛒: 98 | * origin `CString` 99 | * fromIndex `double` 100 | * toIndex `double` 101 | 102 | 103 | ### 9. count 104 | 105 | > 📝: count func of string module 106 | 107 | > 🔙: Number 108 | 109 | > 🛒: 110 | * origin `CString` 111 | 112 | 113 | ### 10. link 114 | 115 | > 📝: link func of string module 116 | 117 | > 🔙: String 118 | 119 | > 🛒: 120 | * origin `CString` 121 | * other `CString` 122 | 123 | 124 | ### 11. format 125 | 126 | > 📝: format func of string module 127 | 128 | > 🔙: String 129 | 130 | > 🛒: 131 | * format `CString` 132 | * value `Value` 133 | 134 | 135 | ### 12. fill 136 | 137 | > 📝: fill func of string module 138 | 139 | > 🔙: String 140 | 141 | > 🛒: 142 | * format `CString` 143 | * value `Value` 144 | 145 | 146 | --- 147 | > document info [document.md](../README.md) 148 | -------------------------------------------------------------------------------- /documents/internals/system.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript system 3 | 4 | > source code [system.c](../../uyghur/internals/system.c) 5 | --- 6 | 7 | ### 1. get_name 8 | 9 | > 📝: get_name func of system module 10 | 11 | > 🔙: String 12 | 13 | > 🛒: none 14 | 15 | 16 | ### 2. get_type 17 | 18 | > 📝: get_type func of system module 19 | 20 | > 🔙: String 21 | 22 | > 🛒: none 23 | 24 | 25 | ### 3. exit_program 26 | 27 | > 📝: exit_program func of system module 28 | 29 | > 🔙: Empty 30 | 31 | > 🛒: 32 | * code `int` 33 | 34 | 35 | ### 4. execute_command 36 | 37 | > 📝: execute_command func of system module 38 | 39 | > 🔙: String 40 | 41 | > 🛒: 42 | * command `CString` 43 | 44 | 45 | ### 5. set_env 46 | 47 | > 📝: set_env func of system module 48 | 49 | > 🔙: Empty 50 | 51 | > 🛒: 52 | * name `CString` 53 | * value `CString` 54 | 55 | 56 | ### 6. get_env 57 | 58 | > 📝: get_env func of system module 59 | 60 | > 🔙: String 61 | 62 | > 🛒: 63 | * name `CString` 64 | 65 | 66 | --- 67 | > document info [document.md](../README.md) 68 | -------------------------------------------------------------------------------- /documents/internals/time.md: -------------------------------------------------------------------------------- 1 | 2 | ## UyghurScript time 3 | 4 | > source code [time.c](../../uyghur/internals/time.c) 5 | --- 6 | 7 | ### 1. get_zone 8 | 9 | > 📝: get_zone func of time module 10 | 11 | > 🔙: Number 12 | 13 | > 🛒: none 14 | 15 | 16 | ### 2. get_seconds 17 | 18 | > 📝: get_seconds func of time module 19 | 20 | > 🔙: Number 21 | 22 | > 🛒: none 23 | 24 | 25 | ### 3. convert_to_seconds 26 | 27 | > 📝: convert_to_seconds func of time module 28 | 29 | > 🔙: Number 30 | 31 | > 🛒: 32 | * str `CString` 33 | 34 | 35 | ### 4. convert_from_seconds 36 | 37 | > 📝: convert_from_seconds func of time module 38 | 39 | > 🔙: String 40 | 41 | > 🛒: 42 | * seconds `int` 43 | * str `CString` 44 | 45 | 46 | ### 5. get_time 47 | 48 | > 📝: get_time func of time module 49 | 50 | > 🔙: String 51 | 52 | > 🛒: none 53 | 54 | 55 | ### 6. get_clock 56 | 57 | > 📝: get_clock func of time module 58 | 59 | > 🔙: Number 60 | 61 | > 🛒: none 62 | 63 | 64 | ### 7. sleep_seconds 65 | 66 | > 📝: sleep_seconds func of time module 67 | 68 | > 🔙: Empty 69 | 70 | > 🛒: none 71 | 72 | 73 | ### 8. delay_call 74 | 75 | > 📝: delay_call func of time module 76 | 77 | > 🔙: Empty 78 | 79 | > 🛒: 80 | * second `VNumber` 81 | * function `VFunction` 82 | 83 | 84 | --- 85 | > document info [document.md](../README.md) 86 | -------------------------------------------------------------------------------- /examples/externals/awaz.ug: -------------------------------------------------------------------------------- 1 | # double sound 2 | 3 | miqdar tag qimmiti quruq bolsun 4 | 5 | xizmetchi @sehne.korsitish bilen -1 -1 "sinaq" -1 ishlitilsun 6 | 7 | xizmetchi @awaz.yuklesh bilen "../resources/road.wav" ishlitilsun we tag elinsun 8 | xizmetchi @awaz.quyush bilen tag ishlitilsun 9 | xizmetchi @awaz.yuklesh bilen "../resources/door.wav" ishlitilsun we tag elinsun 10 | xizmetchi @awaz.quyush bilen tag ishlitilsun 11 | 12 | nawada @sehne.yepilmaqchi bolmisa 13 | # 14 | # 15 | xizmetchi @sehne.yengilash ishlitilsun 16 | tamamlansun 17 | -------------------------------------------------------------------------------- /examples/externals/chember.ug: -------------------------------------------------------------------------------- 1 | # moving circle 2 | 3 | miqdar x qimmiti 0 bolsun 4 | miqdar y qimmiti 0 bolsun 5 | miqdar t1 qimmiti quruq bolsun 6 | miqdar t2 qimmiti quruq bolsun 7 | miqdar d qimmiti 0.1 bolsun 8 | 9 | xizmetchi @sehne.korsitish bilen -1 -1 "sinaq" -1 ishlitilsun 10 | nawada @sehne.yepilmaqchi bolmisa 11 | # t1 = x > 400 12 | t2 = x < 100 13 | eger t1 bolsa 14 | d qimmiti -0.1 bolsun 15 | egerde t2 bolsa 16 | d qimmiti 0.1 bolsun 17 | tamamlansun 18 | x = x + d 19 | y = y + d 20 | xizmetchi @qelem.chemberSizish bilen x y 100 ishlitilsun 21 | # 22 | xizmetchi @sehne.yengilash ishlitilsun 23 | tamamlansun 24 | -------------------------------------------------------------------------------- /examples/externals/muzika.ug: -------------------------------------------------------------------------------- 1 | # playing music 2 | 3 | miqdar tag qimmiti quruq bolsun 4 | 5 | xizmetchi @sehne.korsitish bilen -1 -1 "sinaq" -1 ishlitilsun 6 | 7 | xizmetchi @muzika.yuklesh bilen "../resources/bahar.mp3" ishlitilsun we tag elinsun 8 | xizmetchi @muzika.quyush bilen tag ishlitilsun 9 | xizmetchi @muzika.yuqiriliqiniBikitish bilen tag 1 ishlitilsun 10 | xizmetchi @muzika.orniniBikitish bilen tag 25 ishlitilsun 11 | 12 | nawada @sehne.yepilmaqchi bolmisa 13 | # 14 | xizmetchi @muzika.yengilash bilen tag ishlitilsun 15 | # 16 | xizmetchi @sehne.yengilash ishlitilsun 17 | tamamlansun 18 | 19 | -------------------------------------------------------------------------------- /examples/externals/qeghez.ug: -------------------------------------------------------------------------------- 1 | 2 | xizmetchi @qeghez.qurush bilen 300 300 ishlitilsun we paper elinsun 3 | 4 | # draw a text 5 | xizmetchi @qelem.xaslashturush bilen "aaffaa" ishlitilsun 6 | xizmetchi @qelem.xetYezish bilen 150 150 "abcde" 2 ishlitilsun 7 | 8 | # draw some shape 9 | xizmetchi @qelem.xaslashturush bilen "aa22aa" ishlitilsun 10 | xizmetchi @qelem.uchTereplikToldurush bilen 100 25 200 25 150 125 ishlitilsun 11 | xizmetchi @qelem.chemberSizish bilen 150 225 50 ishlitilsun 12 | 13 | # save as image 14 | miqdar name qimmiti "paper_test.png" bolsun 15 | xizmetchi @qeghez.yezish bilen paper name ishlitilsun 16 | # open saved file 17 | xizmetchi @sestima:ijraQilish bilen name ishlitilsun 18 | -------------------------------------------------------------------------------- /examples/externals/resim.ug: -------------------------------------------------------------------------------- 1 | # rotating image 2 | 3 | miqdar rotation qimmiti 0 bolsun 4 | miqdar r qimmiti quruq bolsun 5 | 6 | xizmetchi @sehne.korsitish bilen -1 -1 "sinaq" -1 ishlitilsun 7 | 8 | xizmetchi @qelem.resimEkirish bilen "../resources/rose.png" 0 0 -1 -1 ishlitilsun we img elinsun 9 | 10 | nawada @sehne.yepilmaqchi bolmisa 11 | # 12 | rotation = rotation + 0.05 13 | xizmetchi @qelem.resimSizish bilen img 250 250 ishlitilsun 14 | # 15 | xizmetchi @sehne.yengilash ishlitilsun 16 | tamamlansun 17 | -------------------------------------------------------------------------------- /examples/externals/ressam.ug: -------------------------------------------------------------------------------- 1 | 2 | miqdar QIZIL qimmiti "ff0000" bolsun 3 | miqdar YESHIL qimmiti "00ff00" bolsun 4 | miqdar KOK qimmiti "0000ff" bolsun 5 | miqdar QARA qimmiti "000000" bolsun 6 | 7 | xizmetchi @sehne.korsitish bilen -1 -1 "sinaq" -1 ishlitilsun 8 | nawada @sehne.yepilmaqchi bolmisa 9 | # 10 | xizmetchi @qelem.xaslashturush bilen "555555" 0 ishlitilsun 11 | xizmetchi @qelem.totTereplikToldurush bilen 250 250 500 500 ishlitilsun 12 | xizmetchi @qelem.xaslashturush bilen "333333" 45 ishlitilsun 13 | xizmetchi @qelem.totTereplikToldurush bilen 250 250 500 500 ishlitilsun 14 | xizmetchi @qelem.xaslashturush bilen "44444433" 45 ishlitilsun 15 | xizmetchi @qelem.totTereplikToldurush bilen 250 250 485 485 ishlitilsun 16 | 17 | xizmetchi @qelem.xaslashturush bilen QIZIL 0 ishlitilsun 18 | xizmetchi @qelem.nuqtaSizish bilen 10 10 ishlitilsun 19 | xizmetchi @qelem.nuqtaSizish bilen 490 10 ishlitilsun 20 | 21 | xizmetchi @qelem.xaslashturush bilen KOK ishlitilsun 22 | # a line no anchor point 23 | xizmetchi @qelem.siziqSizish bilen 20 10 480 10 ishlitilsun 24 | # a curve with one anchor 25 | xizmetchi @qelem.siziqSizish bilen 400 50 400 450 550 250 ishlitilsun 26 | 27 | xizmetchi @qelem.xaslashturush bilen YESHIL ishlitilsun 28 | xizmetchi @qelem.chemberToldurush bilen 75 250 70 50 ishlitilsun 29 | 30 | xizmetchi @qelem.xaslashturush bilen QIZIL ishlitilsun 31 | xizmetchi @qelem.uchTereplikToldurush bilen 100 175 400 175 250 10 ishlitilsun 32 | xizmetchi @qelem.xaslashturush bilen KOK ishlitilsun 33 | xizmetchi @qelem.kopTereplikToldurush bilen 250 420 8 75 ishlitilsun 34 | # 35 | xizmetchi @sehne.yengilash ishlitilsun 36 | tamamlansun 37 | -------------------------------------------------------------------------------- /examples/externals/sohbet.ug: -------------------------------------------------------------------------------- 1 | # dialog 2 | 3 | miqdar r qimmiti quruq bolsun 4 | 5 | xizmetchi @sohbet.bildurush bilen "title" "content..." ishlitilsun 6 | 7 | # plaintext 8 | xizmetchi @sohbet.kirguzush bilen "title" "default..." ishlitilsun we r elinsun 9 | buyruq "\n text:" yezilsun 10 | buyruq r yezilsun 11 | # password 12 | xizmetchi @sohbet.kirguzush bilen "title" ishlitilsun we r elinsun 13 | buyruq "\n pass:" yezilsun 14 | buyruq r yezilsun 15 | 16 | # yes_or_not 17 | xizmetchi @sohbet.testiqlash bilen "title" "content..." ishlitilsun we r elinsun 18 | buyruq "\n confirm:" yezilsun 19 | buyruq r yezilsun 20 | 21 | # to_saving 22 | xizmetchi @sohbet.saqlashTallash bilen "title" "./" "*.txt" ishlitilsun we r elinsun 23 | buyruq "\n save_to:" yezilsun 24 | buyruq r yezilsun 25 | # to_opening 26 | xizmetchi @sohbet.echishTallash bilen "title" "./" "*.txt" ishlitilsun we r elinsun 27 | buyruq "\n open_from:" yezilsun 28 | buyruq r yezilsun 29 | 30 | # chose_folder 31 | xizmetchi @sohbet.qisquchTallash bilen "title" "./" ishlitilsun we r elinsun 32 | buyruq "\n target_folder:" yezilsun 33 | buyruq r yezilsun 34 | # chose_color 35 | xizmetchi @sohbet.rengTallash bilen "title" "#ffffff" ishlitilsun we r elinsun 36 | buyruq "\n selected_folder:" yezilsun 37 | buyruq r yezilsun 38 | 39 | buyruq "\n" yezilsun 40 | -------------------------------------------------------------------------------- /examples/externals/xet.ug: -------------------------------------------------------------------------------- 1 | # scaling text 2 | 3 | miqdar s qimmiti 1 bolsun 4 | miqdar t qimmiti quruq bolsun 5 | miqdar o qimmiti 0 bolsun 6 | 7 | 8 | xizmetchi @sehne.korsitish bilen -1 -1 "sinaq" -1 ishlitilsun 9 | 10 | xizmetchi @qelem.fontEkirish bilen "../resources/ukij.ttf" 36 ishlitilsun we font elinsun 11 | xizmetchi @qelem.fontOlchesh bilen font 36 "SINAQ" ishlitilsun we w elinsun 12 | 13 | nawada @sehne.yepilmaqchi bolmisa 14 | # 15 | t = s > 2 16 | eger t bolsa 17 | s qimmiti 1 bolsun 18 | bolmisa 19 | s = s + 0.0001 20 | tamamlansun 21 | # 22 | o = w / 2 23 | o = 250 - o 24 | xizmetchi @qelem.fontSizish bilen font 36 "SINAQ" o 50 ishlitilsun 25 | # 26 | xizmetchi @sehne.yengilash ishlitilsun 27 | tamamlansun 28 | -------------------------------------------------------------------------------- /examples/externals/yuguresh.ug: -------------------------------------------------------------------------------- 1 | # running men 2 | 3 | miqdar r qimmiti quruq bolsun 4 | miqdar w qimmiti quruq bolsun 5 | 6 | miqdar x qimmiti quruq bolsun 7 | miqdar y qimmiti quruq bolsun 8 | miqdar t qimmiti quruq bolsun 9 | 10 | miqdar n qimmiti 1 bolsun 11 | miqdar m qimmiti 1 bolsun 12 | miqdar text qimmiti "Bir Ikki Bir, Bir Ikki Bir ..." bolsun 13 | 14 | xizmetchi @sehne.korsitish bilen -1 -1 "Yuguresh" -1 ishlitilsun 15 | 16 | xizmetchi @qelem.resimEkirish bilen "../resources/run.png" 0 0 200 260 ishlitilsun we img elinsun 17 | xizmetchi @qelem.fontEkirish bilen "../resources/ukij.ttf" 36 ishlitilsun we font elinsun 18 | 19 | nawada @sehne.yepilmaqchi bolmisa 20 | # 21 | xizmetchi @qelem.resimSizish bilen img 100 300 ishlitilsun 22 | xizmetchi @qelem.fontSizish bilen font 36 text 250 50 ishlitilsun 23 | # 24 | xizmetchi @sehne.yengilash ishlitilsun 25 | tamamlansun 26 | -------------------------------------------------------------------------------- /examples/features/calculation.en: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = right & wrong # wrong 16 | x = right | wrong # right 17 | x = right ~ wrong # right 18 | 19 | # logic 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! num # true 30 | x = 10 ! empty # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/features/calculation/calculation.en: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = right & wrong # wrong 16 | x = right | wrong # right 17 | x = right ~ wrong # right 18 | 19 | # logic 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! num # true 30 | x = 10 ! empty # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/features/calculation/calculation.kz: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = рас & жалған # жалған 16 | x = рас | жалған # рас 17 | x = рас ~ жалған # рас 18 | 19 | # логика 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! сан # true 30 | x = 10 ! бос # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/features/calculation/calculation.tr: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = doğru & yanlış # yanlış 16 | x = doğru | yanlış # doğru 17 | x = doğru ~ yanlış # doğru 18 | 19 | # mantık 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! sayı # true 30 | x = 10 ! boş # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/features/calculation/calculation.ug: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = rast & yalghan # yalghan 16 | x = rast | yalghan # rast 17 | x = rast ~ yalghan # rast 18 | 19 | # logika 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! san # true 30 | x = 10 ! quruq # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/features/calculation/calculation.uy: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = راست & يالغان # يالغان 16 | x = راست | يالغان # راست 17 | x = راست ~ يالغان # راست 18 | 19 | # لوگىكا 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! سان # true 30 | x = 10 ! قۇرۇق # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/features/calculation/calculation.uz: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = rost & yolg'on # yolg'on 16 | x = rost | yolg'on # rost 17 | x = rost ~ yolg'on # rost 18 | 19 | # mantiq 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! son # true 30 | x = 10 ! bo'sh # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/features/closure.en: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | worker make content 4 | 5 | # a var in env 6 | variable x value 0 made 7 | variable r value 0 made 8 | 9 | # a func & env 10 | worker func variable a content 11 | command x write # 0 12 | command y write # 200 13 | r = r + a 14 | result r returned 15 | finish 16 | 17 | # ret the closure func 18 | result func returned 19 | finish 20 | 21 | # some vars in mod 22 | variable x value 100 made 23 | variable y value 200 made 24 | 25 | # make closure 26 | worker make applied and f received 27 | 28 | # print 11 29 | worker f with 11 applied and r received 30 | command r write 31 | 32 | # print 22 33 | worker f with 11 applied and r received 34 | command r write 35 | -------------------------------------------------------------------------------- /examples/features/closure/closure.en: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | worker make content 4 | 5 | # a var in env 6 | variable x value 0 made 7 | variable r value 0 made 8 | 9 | # a func & env 10 | worker func variable a content 11 | command x write # 0 12 | command y write # 200 13 | r = r + a 14 | result r returned 15 | finish 16 | 17 | # ret the closure func 18 | result func returned 19 | finish 20 | 21 | # some vars in mod 22 | variable x value 100 made 23 | variable y value 200 made 24 | 25 | # make closure 26 | worker make applied and f received 27 | 28 | # print 11 29 | worker f with 11 applied and r received 30 | command r write 31 | 32 | # print 22 33 | worker f with 11 applied and r received 34 | command r write -------------------------------------------------------------------------------- /examples/features/closure/closure.kz: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | қызметші make мазмұны 4 | 5 | # a var in env 6 | айнымалы x қимметі 0 болсын 7 | айнымалы r қимметі 0 болсын 8 | 9 | # a func & env 10 | қызметші func айнымалы a мазмұны 11 | бұйрық x жазу # 0 12 | бұйрық y жазу # 200 13 | r = r + a 14 | нәтиже r қайтарылсын 15 | аяқталсын 16 | 17 | # ret the closure func 18 | нәтиже func қайтарылсын 19 | аяқталсын 20 | 21 | # some vars in mod 22 | айнымалы x қимметі 100 болсын 23 | айнымалы y қимметі 200 болсын 24 | 25 | # make closure 26 | қызметші make қолданылсын бен f алынсын 27 | 28 | # print 11 29 | қызметші f бірге 11 қолданылсын бен r алынсын 30 | бұйрық r жазу 31 | 32 | # print 22 33 | қызметші f бірге 11 қолданылсын бен r алынсын 34 | бұйрық r жазу -------------------------------------------------------------------------------- /examples/features/closure/closure.tr: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | hizmetçi make içeriği 4 | 5 | # a var in env 6 | değişken x kıymeti 0 olsun 7 | değişken r kıymeti 0 olsun 8 | 9 | # a func & env 10 | hizmetçi func değişken a içeriği 11 | buyruk x yaz # 0 12 | buyruk y yaz # 200 13 | r = r + a 14 | netice r geriverılsın 15 | tamamlansin 16 | 17 | # ret the closure func 18 | netice func geriverılsın 19 | tamamlansin 20 | 21 | # some vars in mod 22 | değişken x kıymeti 100 olsun 23 | değişken y kıymeti 200 olsun 24 | 25 | # make closure 26 | hizmetçi make kullanılsın ve f alısın 27 | 28 | # print 11 29 | hizmetçi f ile 11 kullanılsın ve r alısın 30 | buyruk r yaz 31 | 32 | # print 22 33 | hizmetçi f ile 11 kullanılsın ve r alısın 34 | buyruk r yaz -------------------------------------------------------------------------------- /examples/features/closure/closure.ug: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | xizmetchi make mezmuni 4 | 5 | # a var in env 6 | miqdar x qimmiti 0 bolsun 7 | miqdar r qimmiti 0 bolsun 8 | 9 | # a func & env 10 | xizmetchi func miqdar a mezmuni 11 | buyruq x yezilsun # 0 12 | buyruq y yezilsun # 200 13 | r = r + a 14 | netije r qayturulsun 15 | tamamlansun 16 | 17 | # ret the closure func 18 | netije func qayturulsun 19 | tamamlansun 20 | 21 | # some vars in mod 22 | miqdar x qimmiti 100 bolsun 23 | miqdar y qimmiti 200 bolsun 24 | 25 | # make closure 26 | xizmetchi make ishlitilsun we f elinsun 27 | 28 | # print 11 29 | xizmetchi f bilen 11 ishlitilsun we r elinsun 30 | buyruq r yezilsun 31 | 32 | # print 22 33 | xizmetchi f bilen 11 ishlitilsun we r elinsun 34 | buyruq r yezilsun -------------------------------------------------------------------------------- /examples/features/closure/closure.uy: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | خىزمەتچى make مەزمۇنى 4 | 5 | # a var in env 6 | مىقدار x قىممىتى 0 بولسۇن 7 | مىقدار r قىممىتى 0 بولسۇن 8 | 9 | # a func & env 10 | خىزمەتچى func مىقدار a مەزمۇنى 11 | بۇيرۇق x يېزىلسۇن # 0 12 | بۇيرۇق y يېزىلسۇن # 200 13 | r = r + a 14 | نەتىجە r قايتۇرۇلسۇن 15 | تاماملانسۇن 16 | 17 | # ret the closure func 18 | نەتىجە func قايتۇرۇلسۇن 19 | تاماملانسۇن 20 | 21 | # some vars in mod 22 | مىقدار x قىممىتى 100 بولسۇن 23 | مىقدار y قىممىتى 200 بولسۇن 24 | 25 | # make closure 26 | خىزمەتچى make ئىشلىتىلسۇن ۋە f ئېلىنسۇن 27 | 28 | # print 11 29 | خىزمەتچى f بىلەن 11 ئىشلىتىلسۇن ۋە r ئېلىنسۇن 30 | بۇيرۇق r يېزىلسۇن 31 | 32 | # print 22 33 | خىزمەتچى f بىلەن 11 ئىشلىتىلسۇن ۋە r ئېلىنسۇن 34 | بۇيرۇق r يېزىلسۇن -------------------------------------------------------------------------------- /examples/features/closure/closure.uz: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | xizmatchi make mazmuni 4 | 5 | # a var in env 6 | o'zgaruvch x qiymati 0 bo'lsin 7 | o'zgaruvch r qiymati 0 bo'lsin 8 | 9 | # a func & env 10 | xizmatchi func o'zgaruvch a mazmuni 11 | buyruq x yozilsin # 0 12 | buyruq y yozilsin # 200 13 | r = r + a 14 | natija r qaytarilsin 15 | tamomlansin 16 | 17 | # ret the closure func 18 | natija func qaytarilsin 19 | tamomlansin 20 | 21 | # some vars in mod 22 | o'zgaruvch x qiymati 100 bo'lsin 23 | o'zgaruvch y qiymati 200 bo'lsin 24 | 25 | # make closure 26 | xizmatchi make ishlatilsin va f olinsin 27 | 28 | # print 11 29 | xizmatchi f bilan 11 ishlatilsin va r olinsin 30 | buyruq r yozilsin 31 | 32 | # print 22 33 | xizmatchi f bilan 11 ishlatilsin va r olinsin 34 | buyruq r yozilsin -------------------------------------------------------------------------------- /examples/features/command.en: -------------------------------------------------------------------------------- 1 | 2 | # read a val 3 | command a read 4 | 5 | # print a val 6 | command a write -------------------------------------------------------------------------------- /examples/features/command/command.en: -------------------------------------------------------------------------------- 1 | 2 | # read a val 3 | command a read 4 | 5 | # print a val 6 | command a write -------------------------------------------------------------------------------- /examples/features/command/command.kz: -------------------------------------------------------------------------------- 1 | 2 | # оқу a val 3 | бұйрық a оқу 4 | 5 | # print a val 6 | бұйрық a жазу -------------------------------------------------------------------------------- /examples/features/command/command.tr: -------------------------------------------------------------------------------- 1 | 2 | # oku a val 3 | buyruk a oku 4 | 5 | # print a val 6 | buyruk a yaz -------------------------------------------------------------------------------- /examples/features/command/command.ug: -------------------------------------------------------------------------------- 1 | 2 | # oqulsun a val 3 | buyruq a oqulsun 4 | 5 | # print a val 6 | buyruq a yezilsun -------------------------------------------------------------------------------- /examples/features/command/command.uy: -------------------------------------------------------------------------------- 1 | 2 | # ئوقۇلسۇن a val 3 | بۇيرۇق a ئوقۇلسۇن 4 | 5 | # print a val 6 | بۇيرۇق a يېزىلسۇن -------------------------------------------------------------------------------- /examples/features/command/command.uz: -------------------------------------------------------------------------------- 1 | 2 | # o'qisin a val 3 | buyruq a o'qisin 4 | 5 | # print a val 6 | buyruq a yozilsin -------------------------------------------------------------------------------- /examples/features/container.en: -------------------------------------------------------------------------------- 1 | 2 | # declare a list 3 | t value list made 4 | # declare a dict 5 | s value dict made 6 | 7 | # generate a list 8 | t = [11, 22, "abc"] 9 | # generate a dict 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a num key 13 | @t.1 = 456 14 | # put a str key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * global 20 | 21 | # check type 22 | b = t ! list -------------------------------------------------------------------------------- /examples/features/container/container.en: -------------------------------------------------------------------------------- 1 | 2 | # declare a list 3 | t value list made 4 | # declare a dict 5 | s value dict made 6 | 7 | # generate a list 8 | t = [11, 22, "abc"] 9 | # generate a dict 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a num key 13 | @t.1 = 456 14 | # put a str key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * global 20 | 21 | # check type 22 | b = t ! list -------------------------------------------------------------------------------- /examples/features/container/container.kz: -------------------------------------------------------------------------------- 1 | 2 | # declare a тертіп 3 | t қимметі тертіп болсын 4 | # declare a сандық 5 | s қимметі сандық болсын 6 | 7 | # generate a тертіп 8 | t = [11, 22, "abc"] 9 | # generate a сандық 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a сан key 13 | @t.1 = 456 14 | # put a хат key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * дүние 20 | 21 | # check түр 22 | b = t ! тертіп -------------------------------------------------------------------------------- /examples/features/container/container.tr: -------------------------------------------------------------------------------- 1 | 2 | # declare a tertip 3 | t kıymeti tertip olsun 4 | # declare a sandık 5 | s kıymeti sandık olsun 6 | 7 | # generate a tertip 8 | t = [11, 22, "abc"] 9 | # generate a sandık 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a sayı key 13 | @t.1 = 456 14 | # put a dize key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * dünya 20 | 21 | # check tür 22 | b = t ! tertip -------------------------------------------------------------------------------- /examples/features/container/container.ug: -------------------------------------------------------------------------------- 1 | 2 | # declare a tertip 3 | t qimmiti tertip bolsun 4 | # declare a sanduq 5 | s qimmiti sanduq bolsun 6 | 7 | # generate a tertip 8 | t = [11, 22, "abc"] 9 | # generate a sanduq 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a san key 13 | @t.1 = 456 14 | # put a xet key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * dunya 20 | 21 | # check tip 22 | b = t ! tertip -------------------------------------------------------------------------------- /examples/features/container/container.uy: -------------------------------------------------------------------------------- 1 | 2 | # declare a تەرتىپ 3 | t قىممىتى تەرتىپ بولسۇن 4 | # declare a ساندۇق 5 | s قىممىتى ساندۇق بولسۇن 6 | 7 | # generate a تەرتىپ 8 | t = [11, 22, "abc"] 9 | # generate a ساندۇق 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a سان key 13 | @t.1 = 456 14 | # put a خەت key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * دۇنيا 20 | 21 | # check تىپ 22 | b = t ! تەرتىپ -------------------------------------------------------------------------------- /examples/features/container/container.uz: -------------------------------------------------------------------------------- 1 | 2 | # declare a tartib 3 | t qiymati tartib bo'lsin 4 | # declare a sandiq 5 | s qiymati sandiq bo'lsin 6 | 7 | # generate a tartib 8 | t = [11, 22, "abc"] 9 | # generate a sandiq 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a son key 13 | @t.1 = 456 14 | # put a xat key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * dunyo 20 | 21 | # check tur 22 | b = t ! tartib -------------------------------------------------------------------------------- /examples/features/exception.en: -------------------------------------------------------------------------------- 1 | 2 | variable x value empty made 3 | 4 | # try block 5 | exception e become 6 | x = 3 / 0 7 | finish 8 | 9 | # catch block 10 | if e then 11 | command "exception:\n" write 12 | command e write 13 | command "\n" write 14 | else 15 | command "successful!\n" write 16 | finish -------------------------------------------------------------------------------- /examples/features/exception/exception.en: -------------------------------------------------------------------------------- 1 | 2 | variable x value empty made 3 | 4 | # try block 5 | exception e become 6 | x = 3 / 0 7 | finish 8 | 9 | # catch block 10 | if e then 11 | command "exception:\n" write 12 | command e write 13 | command "\n" write 14 | else 15 | command "successful!\n" write 16 | finish -------------------------------------------------------------------------------- /examples/features/exception/exception.kz: -------------------------------------------------------------------------------- 1 | 2 | айнымалы x қимметі бос болсын 3 | 4 | # try block 5 | қателік e болу 6 | x = 3 / 0 7 | аяқталсын 8 | 9 | # catch block 10 | егер e болса 11 | бұйрық "exception:\n" жазу 12 | бұйрық e жазу 13 | бұйрық "\n" жазу 14 | болмаса 15 | бұйрық "successful!\n" жазу 16 | аяқталсын -------------------------------------------------------------------------------- /examples/features/exception/exception.tr: -------------------------------------------------------------------------------- 1 | 2 | değişken x kıymeti boş olsun 3 | 4 | # try block 5 | hatalık e olup 6 | x = 3 / 0 7 | tamamlansin 8 | 9 | # catch block 10 | eğer e olsa 11 | buyruk "exception:\n" yaz 12 | buyruk e yaz 13 | buyruk "\n" yaz 14 | olmasa 15 | buyruk "successful!\n" yaz 16 | tamamlansin -------------------------------------------------------------------------------- /examples/features/exception/exception.ug: -------------------------------------------------------------------------------- 1 | 2 | miqdar x qimmiti quruq bolsun 3 | 4 | # try block 5 | xataliq e bulup 6 | x = 3 / 0 7 | tamamlansun 8 | 9 | # catch block 10 | eger e bolsa 11 | buyruq "exception:\n" yezilsun 12 | buyruq e yezilsun 13 | buyruq "\n" yezilsun 14 | bolmisa 15 | buyruq "successful!\n" yezilsun 16 | tamamlansun -------------------------------------------------------------------------------- /examples/features/exception/exception.uy: -------------------------------------------------------------------------------- 1 | 2 | مىقدار x قىممىتى قۇرۇق بولسۇن 3 | 4 | # try block 5 | خاتالىق e بۇلۇپ 6 | x = 3 / 0 7 | تاماملانسۇن 8 | 9 | # catch block 10 | ئەگەر e بولسا 11 | بۇيرۇق "exception:\n" يېزىلسۇن 12 | بۇيرۇق e يېزىلسۇن 13 | بۇيرۇق "\n" يېزىلسۇن 14 | بولمىسا 15 | بۇيرۇق "successful!\n" يېزىلسۇن 16 | تاماملانسۇن -------------------------------------------------------------------------------- /examples/features/exception/exception.uz: -------------------------------------------------------------------------------- 1 | 2 | o'zgaruvch x qiymati bo'sh bo'lsin 3 | 4 | # try block 5 | xatolik e bo'lib 6 | x = 3 / 0 7 | tamomlansin 8 | 9 | # catch block 10 | agar e bo'lsa 11 | buyruq "exception:\n" yozilsin 12 | buyruq e yozilsin 13 | buyruq "\n" yozilsin 14 | bo'lmasa 15 | buyruq "successful!\n" yozilsin 16 | tamomlansin -------------------------------------------------------------------------------- /examples/features/hello.en: -------------------------------------------------------------------------------- 1 | 2 | variable i value 0 made 3 | while i < 9 then 4 | command "👀👋\n" write 5 | i = i + 1 6 | finish -------------------------------------------------------------------------------- /examples/features/hello/hello.en: -------------------------------------------------------------------------------- 1 | 2 | variable i value 0 made 3 | while i < 9 then 4 | command "👀👋\n" write 5 | i = i + 1 6 | finish -------------------------------------------------------------------------------- /examples/features/hello/hello.kz: -------------------------------------------------------------------------------- 1 | 2 | айнымалы i қимметі 0 болсын 3 | солайда i < 9 болса 4 | бұйрық "👀👋\n" жазу 5 | i = i + 1 6 | аяқталсын -------------------------------------------------------------------------------- /examples/features/hello/hello.tr: -------------------------------------------------------------------------------- 1 | 2 | değişken i kıymeti 0 olsun 3 | böyleyse i < 9 olsa 4 | buyruk "👀👋\n" yaz 5 | i = i + 1 6 | tamamlansin -------------------------------------------------------------------------------- /examples/features/hello/hello.ug: -------------------------------------------------------------------------------- 1 | 2 | miqdar i qimmiti 0 bolsun 3 | nawada i < 9 bolsa 4 | buyruq "👀👋\n" yezilsun 5 | i = i + 1 6 | tamamlansun -------------------------------------------------------------------------------- /examples/features/hello/hello.uy: -------------------------------------------------------------------------------- 1 | 2 | مىقدار i قىممىتى 0 بولسۇن 3 | ناۋادا i < 9 بولسا 4 | بۇيرۇق "👀👋\n" يېزىلسۇن 5 | i = i + 1 6 | تاماملانسۇن -------------------------------------------------------------------------------- /examples/features/hello/hello.uz: -------------------------------------------------------------------------------- 1 | 2 | o'zgaruvch i qiymati 0 bo'lsin 3 | shundayda i < 9 bo'lsa 4 | buyruq "👀👋\n" yozilsin 5 | i = i + 1 6 | tamomlansin -------------------------------------------------------------------------------- /examples/features/if.en: -------------------------------------------------------------------------------- 1 | 2 | if 0 then 3 | command "if" write 4 | elif right then 5 | command "elif" write 6 | else 7 | command "else" write 8 | finish -------------------------------------------------------------------------------- /examples/features/if/if.en: -------------------------------------------------------------------------------- 1 | 2 | if 0 then 3 | command "if" write 4 | elif right then 5 | command "elif" write 6 | else 7 | command "else" write 8 | finish -------------------------------------------------------------------------------- /examples/features/if/if.kz: -------------------------------------------------------------------------------- 1 | 2 | егер 0 болса 3 | бұйрық "if" жазу 4 | егерде рас болса 5 | бұйрық "elif" жазу 6 | болмаса 7 | бұйрық "else" жазу 8 | аяқталсын -------------------------------------------------------------------------------- /examples/features/if/if.tr: -------------------------------------------------------------------------------- 1 | 2 | eğer 0 olsa 3 | buyruk "if" yaz 4 | eğerde doğru olsa 5 | buyruk "elif" yaz 6 | olmasa 7 | buyruk "else" yaz 8 | tamamlansin -------------------------------------------------------------------------------- /examples/features/if/if.ug: -------------------------------------------------------------------------------- 1 | 2 | eger 0 bolsa 3 | buyruq "if" yezilsun 4 | egerde rast bolsa 5 | buyruq "elif" yezilsun 6 | bolmisa 7 | buyruq "else" yezilsun 8 | tamamlansun -------------------------------------------------------------------------------- /examples/features/if/if.uy: -------------------------------------------------------------------------------- 1 | 2 | ئەگەر 0 بولسا 3 | بۇيرۇق "if" يېزىلسۇن 4 | ئەگەردە راست بولسا 5 | بۇيرۇق "elif" يېزىلسۇن 6 | بولمىسا 7 | بۇيرۇق "else" يېزىلسۇن 8 | تاماملانسۇن -------------------------------------------------------------------------------- /examples/features/if/if.uz: -------------------------------------------------------------------------------- 1 | 2 | agar 0 bo'lsa 3 | buyruq "if" yozilsin 4 | egerda rost bo'lsa 5 | buyruq "elif" yozilsin 6 | bo'lmasa 7 | buyruq "else" yozilsin 8 | tamomlansin -------------------------------------------------------------------------------- /examples/features/import.en: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | variable x value "other..." made 4 | 5 | # main.xx 6 | worker ekirish with "../other.xx" applied and m received 7 | command @m.x write 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/features/import/import.en: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | variable x value "other..." made 4 | 5 | # main.xx 6 | worker ekirish with "../other.xx" applied and m received 7 | command @m.x write 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/features/import/import.kz: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | айнымалы x қимметі "other..." болсын 4 | 5 | # main.xx 6 | қызметші ekirish бірге "../other.xx" қолданылсын бен m алынсын 7 | бұйрық @m.x жазу 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/features/import/import.tr: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | değişken x kıymeti "other..." olsun 4 | 5 | # main.xx 6 | hizmetçi ekirish ile "../other.xx" kullanılsın ve m alısın 7 | buyruk @m.x yaz 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/features/import/import.ug: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | miqdar x qimmiti "other..." bolsun 4 | 5 | # main.xx 6 | xizmetchi ekirish bilen "../other.xx" ishlitilsun we m elinsun 7 | buyruq @m.x yezilsun 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/features/import/import.uy: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | مىقدار x قىممىتى "other..." بولسۇن 4 | 5 | # main.xx 6 | خىزمەتچى ekirish بىلەن "../other.xx" ئىشلىتىلسۇن ۋە m ئېلىنسۇن 7 | بۇيرۇق @m.x يېزىلسۇن 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/features/import/import.uz: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | o'zgaruvch x qiymati "other..." bo'lsin 4 | 5 | # main.xx 6 | xizmatchi ekirish bilan "../other.xx" ishlatilsin va m olinsin 7 | buyruq @m.x yozilsin 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/features/objective.en: -------------------------------------------------------------------------------- 1 | 2 | # an assister with one argument 3 | assister X variable x content 4 | @-.x = x 5 | finish 6 | 7 | # assister func 8 | worker @X.test content 9 | command "X.test...\n" write 10 | finish 11 | 12 | # a creator with one arguments 13 | creator Y variable y content 14 | creator X with "arg xxx ...\n" applied 15 | @-.y = y 16 | finish 17 | 18 | # creator func 19 | worker @Y.test content 20 | worker @X.test applied 21 | command "Y.test...\n" write 22 | finish 23 | 24 | # call creator using an assister and receive object 25 | creator Y with "arg yyy ...\n" applied and r received 26 | 27 | # print the object val received 28 | command @r.x write # arg xxx ... 29 | command @r.y write # arg yyy ... 30 | 31 | # call creator func which calling assister func inside 32 | worker @r.test applied 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | if r ! X then 38 | command "yes\n" write 39 | finish 40 | # yes -------------------------------------------------------------------------------- /examples/features/objective/objective.en: -------------------------------------------------------------------------------- 1 | 2 | # an assister with one argument 3 | assister X variable x content 4 | @-.x = x 5 | finish 6 | 7 | # assister func 8 | worker @X.test content 9 | command "X.test...\n" write 10 | finish 11 | 12 | # a creator with one arguments 13 | creator Y variable y content 14 | creator X with "arg xxx ...\n" applied 15 | @-.y = y 16 | finish 17 | 18 | # creator func 19 | worker @Y.test content 20 | worker @X.test applied 21 | command "Y.test...\n" write 22 | finish 23 | 24 | # call creator using an assister and receive object 25 | creator Y with "arg yyy ...\n" applied and r received 26 | 27 | # print the object val received 28 | command @r.x write # arg xxx ... 29 | command @r.y write # arg yyy ... 30 | 31 | # call creator func which calling assister func inside 32 | worker @r.test applied 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | if r ! X then 38 | command "yes\n" write 39 | finish 40 | # yes -------------------------------------------------------------------------------- /examples/features/objective/objective.kz: -------------------------------------------------------------------------------- 1 | 2 | # an жәрдемшы бірге one argument 3 | жәрдемшы X айнымалы x мазмұны 4 | @-.x = x 5 | аяқталсын 6 | 7 | # жәрдемшы func 8 | қызметші @X.test мазмұны 9 | бұйрық "X.test...\n" жазу 10 | аяқталсын 11 | 12 | # a жасаушы бірге one arguments 13 | жасаушы Y айнымалы y мазмұны 14 | жасаушы X бірге "arg xxx ...\n" қолданылсын 15 | @-.y = y 16 | аяқталсын 17 | 18 | # жасаушы func 19 | қызметші @Y.test мазмұны 20 | қызметші @X.test қолданылсын 21 | бұйрық "Y.test...\n" жазу 22 | аяқталсын 23 | 24 | # call жасаушы using an жәрдемшы бен receive объект 25 | жасаушы Y бірге "arg yyy ...\n" қолданылсын бен r алынсын 26 | 27 | # print the объект val алынсын 28 | бұйрық @r.x жазу # arg xxx ... 29 | бұйрық @r.y жазу # arg yyy ... 30 | 31 | # call жасаушы func which calling жәрдемшы func inside 32 | қызметші @r.test қолданылсын 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | егер r ! X болса 38 | бұйрық "yes\n" жазу 39 | аяқталсын 40 | # yes -------------------------------------------------------------------------------- /examples/features/objective/objective.tr: -------------------------------------------------------------------------------- 1 | 2 | # an yardımcı ile one argument 3 | yardımcı X değişken x içeriği 4 | @-.x = x 5 | tamamlansin 6 | 7 | # yardımcı func 8 | hizmetçi @X.test içeriği 9 | buyruk "X.test...\n" yaz 10 | tamamlansin 11 | 12 | # a oluşturucu ile one arguments 13 | oluşturucu Y değişken y içeriği 14 | oluşturucu X ile "arg xxx ...\n" kullanılsın 15 | @-.y = y 16 | tamamlansin 17 | 18 | # oluşturucu func 19 | hizmetçi @Y.test içeriği 20 | hizmetçi @X.test kullanılsın 21 | buyruk "Y.test...\n" yaz 22 | tamamlansin 23 | 24 | # call oluşturucu using an yardımcı ve receive obekit 25 | oluşturucu Y ile "arg yyy ...\n" kullanılsın ve r alısın 26 | 27 | # print the obekit val alısın 28 | buyruk @r.x yaz # arg xxx ... 29 | buyruk @r.y yaz # arg yyy ... 30 | 31 | # call oluşturucu func which calling yardımcı func inside 32 | hizmetçi @r.test kullanılsın 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | eğer r ! X olsa 38 | buyruk "yes\n" yaz 39 | tamamlansin 40 | # yes -------------------------------------------------------------------------------- /examples/features/objective/objective.ug: -------------------------------------------------------------------------------- 1 | 2 | # an yardemchi bilen one argument 3 | yardemchi X miqdar x mezmuni 4 | @-.x = x 5 | tamamlansun 6 | 7 | # yardemchi func 8 | xizmetchi @X.test mezmuni 9 | buyruq "X.test...\n" yezilsun 10 | tamamlansun 11 | 12 | # a yasighuchi bilen one arguments 13 | yasighuchi Y miqdar y mezmuni 14 | yasighuchi X bilen "arg xxx ...\n" ishlitilsun 15 | @-.y = y 16 | tamamlansun 17 | 18 | # yasighuchi func 19 | xizmetchi @Y.test mezmuni 20 | xizmetchi @X.test ishlitilsun 21 | buyruq "Y.test...\n" yezilsun 22 | tamamlansun 23 | 24 | # call yasighuchi using an yardemchi we receive obekit 25 | yasighuchi Y bilen "arg yyy ...\n" ishlitilsun we r elinsun 26 | 27 | # print the obekit val elinsun 28 | buyruq @r.x yezilsun # arg xxx ... 29 | buyruq @r.y yezilsun # arg yyy ... 30 | 31 | # call yasighuchi func which calling yardemchi func inside 32 | xizmetchi @r.test ishlitilsun 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | eger r ! X bolsa 38 | buyruq "yes\n" yezilsun 39 | tamamlansun 40 | # yes -------------------------------------------------------------------------------- /examples/features/objective/objective.uy: -------------------------------------------------------------------------------- 1 | 2 | # an ياردەمچى بىلەن one argument 3 | ياردەمچى X مىقدار x مەزمۇنى 4 | @-.x = x 5 | تاماملانسۇن 6 | 7 | # ياردەمچى func 8 | خىزمەتچى @X.test مەزمۇنى 9 | بۇيرۇق "X.test...\n" يېزىلسۇن 10 | تاماملانسۇن 11 | 12 | # a ياسىغۇچى بىلەن one arguments 13 | ياسىغۇچى Y مىقدار y مەزمۇنى 14 | ياسىغۇچى X بىلەن "arg xxx ...\n" ئىشلىتىلسۇن 15 | @-.y = y 16 | تاماملانسۇن 17 | 18 | # ياسىغۇچى func 19 | خىزمەتچى @Y.test مەزمۇنى 20 | خىزمەتچى @X.test ئىشلىتىلسۇن 21 | بۇيرۇق "Y.test...\n" يېزىلسۇن 22 | تاماملانسۇن 23 | 24 | # call ياسىغۇچى using an ياردەمچى ۋە receive ئوبېكىت 25 | ياسىغۇچى Y بىلەن "arg yyy ...\n" ئىشلىتىلسۇن ۋە r ئېلىنسۇن 26 | 27 | # print the ئوبېكىت val ئېلىنسۇن 28 | بۇيرۇق @r.x يېزىلسۇن # arg xxx ... 29 | بۇيرۇق @r.y يېزىلسۇن # arg yyy ... 30 | 31 | # call ياسىغۇچى func which calling ياردەمچى func inside 32 | خىزمەتچى @r.test ئىشلىتىلسۇن 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | ئەگەر r ! X بولسا 38 | بۇيرۇق "yes\n" يېزىلسۇن 39 | تاماملانسۇن 40 | # yes -------------------------------------------------------------------------------- /examples/features/objective/objective.uz: -------------------------------------------------------------------------------- 1 | 2 | # an yordamchi bilan one argument 3 | yordamchi X o'zgaruvch x mazmuni 4 | @-.x = x 5 | tamomlansin 6 | 7 | # yordamchi func 8 | xizmatchi @X.test mazmuni 9 | buyruq "X.test...\n" yozilsin 10 | tamomlansin 11 | 12 | # a yasag'uchi bilan one arguments 13 | yasag'uchi Y o'zgaruvch y mazmuni 14 | yasag'uchi X bilan "arg xxx ...\n" ishlatilsin 15 | @-.y = y 16 | tamomlansin 17 | 18 | # yasag'uchi func 19 | xizmatchi @Y.test mazmuni 20 | xizmatchi @X.test ishlatilsin 21 | buyruq "Y.test...\n" yozilsin 22 | tamomlansin 23 | 24 | # call yasag'uchi using an yordamchi va receive obekit 25 | yasag'uchi Y bilan "arg yyy ...\n" ishlatilsin va r olinsin 26 | 27 | # print the obekit val olinsin 28 | buyruq @r.x yozilsin # arg xxx ... 29 | buyruq @r.y yozilsin # arg yyy ... 30 | 31 | # call yasag'uchi func which calling yordamchi func inside 32 | xizmatchi @r.test ishlatilsin 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | agar r ! X bo'lsa 38 | buyruq "yes\n" yozilsin 39 | tamomlansin 40 | # yes -------------------------------------------------------------------------------- /examples/features/spread.en: -------------------------------------------------------------------------------- 1 | 2 | speaded "abc..." variable k v become 3 | command k write 4 | command "\t" write 5 | command v write 6 | command "\n" write 7 | finish -------------------------------------------------------------------------------- /examples/features/spread/spread.en: -------------------------------------------------------------------------------- 1 | 2 | speaded "abc..." variable k v become 3 | command k write 4 | command "\t" write 5 | command v write 6 | command "\n" write 7 | finish -------------------------------------------------------------------------------- /examples/features/spread/spread.kz: -------------------------------------------------------------------------------- 1 | 2 | жайылған "abc..." айнымалы k v болу 3 | бұйрық k жазу 4 | бұйрық "\t" жазу 5 | бұйрық v жазу 6 | бұйрық "\n" жазу 7 | аяқталсын -------------------------------------------------------------------------------- /examples/features/spread/spread.tr: -------------------------------------------------------------------------------- 1 | 2 | yayılan "abc..." değişken k v olup 3 | buyruk k yaz 4 | buyruk "\t" yaz 5 | buyruk v yaz 6 | buyruk "\n" yaz 7 | tamamlansin -------------------------------------------------------------------------------- /examples/features/spread/spread.ug: -------------------------------------------------------------------------------- 1 | 2 | yeyilghan "abc..." miqdar k v bulup 3 | buyruq k yezilsun 4 | buyruq "\t" yezilsun 5 | buyruq v yezilsun 6 | buyruq "\n" yezilsun 7 | tamamlansun -------------------------------------------------------------------------------- /examples/features/spread/spread.uy: -------------------------------------------------------------------------------- 1 | 2 | يېيىلغان "abc..." مىقدار k v بۇلۇپ 3 | بۇيرۇق k يېزىلسۇن 4 | بۇيرۇق "\t" يېزىلسۇن 5 | بۇيرۇق v يېزىلسۇن 6 | بۇيرۇق "\n" يېزىلسۇن 7 | تاماملانسۇن -------------------------------------------------------------------------------- /examples/features/spread/spread.uz: -------------------------------------------------------------------------------- 1 | 2 | yoyilgan "abc..." o'zgaruvch k v bo'lib 3 | buyruq k yozilsin 4 | buyruq "\t" yozilsin 5 | buyruq v yozilsin 6 | buyruq "\n" yozilsin 7 | tamomlansin -------------------------------------------------------------------------------- /examples/features/type.en: -------------------------------------------------------------------------------- 1 | 2 | variable m value "yezish" made 3 | 4 | # convert to func 5 | m value worker made 6 | command m write 7 | 8 | # convert to bool 9 | m value logic made 10 | command m write -------------------------------------------------------------------------------- /examples/features/type/type.en: -------------------------------------------------------------------------------- 1 | 2 | variable m value "yezish" made 3 | 4 | # convert to func 5 | m value worker made 6 | command m write 7 | 8 | # convert to bool 9 | m value logic made 10 | command m write -------------------------------------------------------------------------------- /examples/features/type/type.kz: -------------------------------------------------------------------------------- 1 | 2 | айнымалы m қимметі "yezish" болсын 3 | 4 | # convert to func 5 | m қимметі қызметші болсын 6 | бұйрық m жазу 7 | 8 | # convert to bool 9 | m қимметі логика болсын 10 | бұйрық m жазу -------------------------------------------------------------------------------- /examples/features/type/type.tr: -------------------------------------------------------------------------------- 1 | 2 | değişken m kıymeti "yezish" olsun 3 | 4 | # convert to func 5 | m kıymeti hizmetçi olsun 6 | buyruk m yaz 7 | 8 | # convert to bool 9 | m kıymeti mantık olsun 10 | buyruk m yaz -------------------------------------------------------------------------------- /examples/features/type/type.ug: -------------------------------------------------------------------------------- 1 | 2 | miqdar m qimmiti "yezish" bolsun 3 | 4 | # convert to func 5 | m qimmiti xizmetchi bolsun 6 | buyruq m yezilsun 7 | 8 | # convert to bool 9 | m qimmiti logika bolsun 10 | buyruq m yezilsun -------------------------------------------------------------------------------- /examples/features/type/type.uy: -------------------------------------------------------------------------------- 1 | 2 | مىقدار m قىممىتى "yezish" بولسۇن 3 | 4 | # convert to func 5 | m قىممىتى خىزمەتچى بولسۇن 6 | بۇيرۇق m يېزىلسۇن 7 | 8 | # convert to bool 9 | m قىممىتى لوگىكا بولسۇن 10 | بۇيرۇق m يېزىلسۇن -------------------------------------------------------------------------------- /examples/features/type/type.uz: -------------------------------------------------------------------------------- 1 | 2 | o'zgaruvch m qiymati "yezish" bo'lsin 3 | 4 | # convert to func 5 | m qiymati xizmatchi bo'lsin 6 | buyruq m yozilsin 7 | 8 | # convert to bool 9 | m qiymati mantiq bo'lsin 10 | buyruq m yozilsin -------------------------------------------------------------------------------- /examples/features/variable.en: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | variable m value empty made 4 | 5 | # a static var 6 | variable n value num made 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m value empty made 13 | 14 | # type error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/features/variable/variable.en: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | variable m value empty made 4 | 5 | # a static var 6 | variable n value num made 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m value empty made 13 | 14 | # type error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/features/variable/variable.kz: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | айнымалы m қимметі бос болсын 4 | 5 | # a static var 6 | айнымалы n қимметі сан болсын 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m қимметі бос болсын 13 | 14 | # түр error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/features/variable/variable.tr: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | değişken m kıymeti boş olsun 4 | 5 | # a static var 6 | değişken n kıymeti sayı olsun 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m kıymeti boş olsun 13 | 14 | # tür error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/features/variable/variable.ug: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | miqdar m qimmiti quruq bolsun 4 | 5 | # a static var 6 | miqdar n qimmiti san bolsun 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m qimmiti quruq bolsun 13 | 14 | # tip error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/features/variable/variable.uy: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | مىقدار m قىممىتى قۇرۇق بولسۇن 4 | 5 | # a static var 6 | مىقدار n قىممىتى سان بولسۇن 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m قىممىتى قۇرۇق بولسۇن 13 | 14 | # تىپ error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/features/variable/variable.uz: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | o'zgaruvch m qiymati bo'sh bo'lsin 4 | 5 | # a static var 6 | o'zgaruvch n qiymati son bo'lsin 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m qiymati bo'sh bo'lsin 13 | 14 | # tur error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/features/while.en: -------------------------------------------------------------------------------- 1 | 2 | variable i value 0 made 3 | while i < 9 then 4 | command "while\n" write 5 | i = i + 1 6 | finish -------------------------------------------------------------------------------- /examples/features/while/while.en: -------------------------------------------------------------------------------- 1 | 2 | variable i value 0 made 3 | while i < 9 then 4 | command "while\n" write 5 | i = i + 1 6 | finish -------------------------------------------------------------------------------- /examples/features/while/while.kz: -------------------------------------------------------------------------------- 1 | 2 | айнымалы i қимметі 0 болсын 3 | солайда i < 9 болса 4 | бұйрық "while\n" жазу 5 | i = i + 1 6 | аяқталсын -------------------------------------------------------------------------------- /examples/features/while/while.tr: -------------------------------------------------------------------------------- 1 | 2 | değişken i kıymeti 0 olsun 3 | böyleyse i < 9 olsa 4 | buyruk "while\n" yaz 5 | i = i + 1 6 | tamamlansin -------------------------------------------------------------------------------- /examples/features/while/while.ug: -------------------------------------------------------------------------------- 1 | 2 | miqdar i qimmiti 0 bolsun 3 | nawada i < 9 bolsa 4 | buyruq "while\n" yezilsun 5 | i = i + 1 6 | tamamlansun -------------------------------------------------------------------------------- /examples/features/while/while.uy: -------------------------------------------------------------------------------- 1 | 2 | مىقدار i قىممىتى 0 بولسۇن 3 | ناۋادا i < 9 بولسا 4 | بۇيرۇق "while\n" يېزىلسۇن 5 | i = i + 1 6 | تاماملانسۇن -------------------------------------------------------------------------------- /examples/features/while/while.uz: -------------------------------------------------------------------------------- 1 | 2 | o'zgaruvch i qiymati 0 bo'lsin 3 | shundayda i < 9 bo'lsa 4 | buyruq "while\n" yozilsin 5 | i = i + 1 6 | tamomlansin -------------------------------------------------------------------------------- /examples/features/worker.en: -------------------------------------------------------------------------------- 1 | 2 | # a func with two args 3 | worker f variable x y content 4 | variable t value 0 made 5 | t = x + y 6 | result t returned 7 | finish 8 | 9 | # call func and receive rsp 10 | worker f with 10 20 applied and r received 11 | 12 | # print the val received 13 | command r write 14 | -------------------------------------------------------------------------------- /examples/features/worker/worker.en: -------------------------------------------------------------------------------- 1 | 2 | # a func with two args 3 | worker f variable x y content 4 | variable t value 0 made 5 | t = x + y 6 | result t returned 7 | finish 8 | 9 | # call func and receive rsp 10 | worker f with 10 20 applied and r received 11 | 12 | # print the val received 13 | command r write -------------------------------------------------------------------------------- /examples/features/worker/worker.kz: -------------------------------------------------------------------------------- 1 | 2 | # a func бірге two args 3 | қызметші f айнымалы x y мазмұны 4 | айнымалы t қимметі 0 болсын 5 | t = x + y 6 | нәтиже t қайтарылсын 7 | аяқталсын 8 | 9 | # call func бен receive rsp 10 | қызметші f бірге 10 20 қолданылсын бен r алынсын 11 | 12 | # print the val алынсын 13 | бұйрық r жазу -------------------------------------------------------------------------------- /examples/features/worker/worker.tr: -------------------------------------------------------------------------------- 1 | 2 | # a func ile two args 3 | hizmetçi f değişken x y içeriği 4 | değişken t kıymeti 0 olsun 5 | t = x + y 6 | netice t geriverılsın 7 | tamamlansin 8 | 9 | # call func ve receive rsp 10 | hizmetçi f ile 10 20 kullanılsın ve r alısın 11 | 12 | # print the val alısın 13 | buyruk r yaz -------------------------------------------------------------------------------- /examples/features/worker/worker.ug: -------------------------------------------------------------------------------- 1 | 2 | # a func bilen two args 3 | xizmetchi f miqdar x y mezmuni 4 | miqdar t qimmiti 0 bolsun 5 | t = x + y 6 | netije t qayturulsun 7 | tamamlansun 8 | 9 | # call func we receive rsp 10 | xizmetchi f bilen 10 20 ishlitilsun we r elinsun 11 | 12 | # print the val elinsun 13 | buyruq r yezilsun -------------------------------------------------------------------------------- /examples/features/worker/worker.uy: -------------------------------------------------------------------------------- 1 | 2 | # a func بىلەن two args 3 | خىزمەتچى f مىقدار x y مەزمۇنى 4 | مىقدار t قىممىتى 0 بولسۇن 5 | t = x + y 6 | نەتىجە t قايتۇرۇلسۇن 7 | تاماملانسۇن 8 | 9 | # call func ۋە receive rsp 10 | خىزمەتچى f بىلەن 10 20 ئىشلىتىلسۇن ۋە r ئېلىنسۇن 11 | 12 | # print the val ئېلىنسۇن 13 | بۇيرۇق r يېزىلسۇن -------------------------------------------------------------------------------- /examples/features/worker/worker.uz: -------------------------------------------------------------------------------- 1 | 2 | # a func bilan two args 3 | xizmatchi f o'zgaruvch x y mazmuni 4 | o'zgaruvch t qiymati 0 bo'lsin 5 | t = x + y 6 | natija t qaytarilsin 7 | tamomlansin 8 | 9 | # call func va receive rsp 10 | xizmatchi f bilan 10 20 ishlatilsin va r olinsin 11 | 12 | # print the val olinsin 13 | buyruq r yozilsin -------------------------------------------------------------------------------- /examples/help.ug: -------------------------------------------------------------------------------- 1 | # yardem 2 | buyruq "\n" yezilsun 3 | buyruq "👋 Welcome!\n" yezilsun 4 | buyruq "🪪 {} \n" yezilsun # [M[ PROJECT_NAME ]M] 5 | buyruq "😼 {} \n" yezilsun # [M[ PROJECT_REPO ]M] 6 | buyruq "🚨 run -h command for help\n" yezilsun 7 | buyruq "👀 enjoy it\n" yezilsun 8 | buyruq "\n" yezilsun 9 | -------------------------------------------------------------------------------- /examples/internals/box.ug: -------------------------------------------------------------------------------- 1 | 2 | miqdar s qimmiti sanduq bolsun 3 | miqdar k qimmiti "key" bolsun 4 | 5 | @s.abc = "str..." 6 | @s.123 = 456 7 | @s{k} = "val..." 8 | 9 | buyruq s yezilsun 10 | -------------------------------------------------------------------------------- /examples/internals/file.ug: -------------------------------------------------------------------------------- 1 | 2 | xizmetchi @xojjet:oqush bilen "../resources/test.txt" ishlitilsun we r elinsun 3 | buyruq r yezilsun 4 | buyruq "\n" yezilsun 5 | -------------------------------------------------------------------------------- /examples/internals/global.ug: -------------------------------------------------------------------------------- 1 | 2 | xizmetchi @*.izlash ishlitilsun 3 | -------------------------------------------------------------------------------- /examples/internals/number.ug: -------------------------------------------------------------------------------- 1 | 2 | xizmetchi @san.logarifma10Hisablash bilen 1000 ishlitilsun we r elinsun 3 | buyruq r yezilsun 4 | buyruq "\n" yezilsun 5 | -------------------------------------------------------------------------------- /examples/internals/string.ug: -------------------------------------------------------------------------------- 1 | 2 | xizmetchi @xet.formatlash bilen "%.5f" 12.5 ishlitilsun we r elinsun 3 | buyruq r yezilsun 4 | buyruq "\n" yezilsun 5 | -------------------------------------------------------------------------------- /examples/internals/system.ug: -------------------------------------------------------------------------------- 1 | 2 | xizmetchi @sestima:isminiElish ishlitilsun we r elinsun 3 | buyruq r yezilsun 4 | buyruq "\n" yezilsun 5 | -------------------------------------------------------------------------------- /examples/internals/time.ug: -------------------------------------------------------------------------------- 1 | # print date 2 | 3 | # varibale 4 | miqdar hazirqiWaqit qimmiti quruq bolsun 5 | miqdar hazirqiChisla qimmiti quruq bolsun 6 | 7 | # get time 8 | xizmetchi @waqit.sikuntElish ishlitilsun we hazirqiWaqit elinsun 9 | 10 | # convert to date 11 | xizmetchi @waqit.sikuntniAylandurush bilen hazirqiWaqit "%Y-%m-%d %H:%M:%S" ishlitilsun we hazirqiChisla elinsun 12 | 13 | # print to cosole 14 | buyruq hazirqiChisla yezilsun 15 | buyruq "\n" yezilsun 16 | -------------------------------------------------------------------------------- /examples/language/en/calculation.en: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = right & wrong # wrong 16 | x = right | wrong # right 17 | x = right ~ wrong # right 18 | 19 | # logic 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! num # true 30 | x = 10 ! empty # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/language/en/closure.en: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | worker make content 4 | 5 | # a var in env 6 | variable x value 0 made 7 | variable r value 0 made 8 | 9 | # a func & env 10 | worker func variable a content 11 | command x write # 0 12 | command y write # 200 13 | r = r + a 14 | result r returned 15 | finish 16 | 17 | # ret the closure func 18 | result func returned 19 | finish 20 | 21 | # some vars in mod 22 | variable x value 100 made 23 | variable y value 200 made 24 | 25 | # make closure 26 | worker make applied and f received 27 | 28 | # print 11 29 | worker f with 11 applied and r received 30 | command r write 31 | 32 | # print 22 33 | worker f with 11 applied and r received 34 | command r write -------------------------------------------------------------------------------- /examples/language/en/command.en: -------------------------------------------------------------------------------- 1 | 2 | # read a val 3 | command a read 4 | 5 | # print a val 6 | command a write -------------------------------------------------------------------------------- /examples/language/en/container.en: -------------------------------------------------------------------------------- 1 | 2 | # declare a list 3 | t value list made 4 | # declare a dict 5 | s value dict made 6 | 7 | # generate a list 8 | t = [11, 22, "abc"] 9 | # generate a dict 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a num key 13 | @t.1 = 456 14 | # put a str key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * global 20 | 21 | # check type 22 | b = t ! list -------------------------------------------------------------------------------- /examples/language/en/exception.en: -------------------------------------------------------------------------------- 1 | 2 | variable x value empty made 3 | 4 | # try block 5 | exception e become 6 | x = 3 / 0 7 | finish 8 | 9 | # catch block 10 | if e then 11 | command "exception:\n" write 12 | command e write 13 | command "\n" write 14 | else 15 | command "successful!\n" write 16 | finish -------------------------------------------------------------------------------- /examples/language/en/hello.en: -------------------------------------------------------------------------------- 1 | 2 | variable i value 0 made 3 | while i < 9 then 4 | command "👀👋\n" write 5 | i = i + 1 6 | finish -------------------------------------------------------------------------------- /examples/language/en/if.en: -------------------------------------------------------------------------------- 1 | 2 | if 0 then 3 | command "if" write 4 | elif right then 5 | command "elif" write 6 | else 7 | command "else" write 8 | finish -------------------------------------------------------------------------------- /examples/language/en/import.en: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | variable x value "other..." made 4 | 5 | # main.xx 6 | worker ekirish with "../other.xx" applied and m received 7 | command @m.x write 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/language/en/objective.en: -------------------------------------------------------------------------------- 1 | 2 | # an assister with one argument 3 | assister X variable x content 4 | @-.x = x 5 | finish 6 | 7 | # assister func 8 | worker @X.test content 9 | command "X.test...\n" write 10 | finish 11 | 12 | # a creator with one arguments 13 | creator Y variable y content 14 | creator X with "arg xxx ...\n" applied 15 | @-.y = y 16 | finish 17 | 18 | # creator func 19 | worker @Y.test content 20 | worker @X.test applied 21 | command "Y.test...\n" write 22 | finish 23 | 24 | # call creator using an assister and receive object 25 | creator Y with "arg yyy ...\n" applied and r received 26 | 27 | # print the object val received 28 | command @r.x write # arg xxx ... 29 | command @r.y write # arg yyy ... 30 | 31 | # call creator func which calling assister func inside 32 | worker @r.test applied 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | if r ! X then 38 | command "yes\n" write 39 | finish 40 | # yes -------------------------------------------------------------------------------- /examples/language/en/spread.en: -------------------------------------------------------------------------------- 1 | 2 | speaded "abc..." variable k v become 3 | command k write 4 | command "\t" write 5 | command v write 6 | command "\n" write 7 | finish -------------------------------------------------------------------------------- /examples/language/en/type.en: -------------------------------------------------------------------------------- 1 | 2 | variable m value "yezish" made 3 | 4 | # convert to func 5 | m value worker made 6 | command m write 7 | 8 | # convert to bool 9 | m value logic made 10 | command m write -------------------------------------------------------------------------------- /examples/language/en/variable.en: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | variable m value empty made 4 | 5 | # a static var 6 | variable n value num made 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m value empty made 13 | 14 | # type error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/language/en/while.en: -------------------------------------------------------------------------------- 1 | 2 | variable i value 0 made 3 | while i < 9 then 4 | command "while\n" write 5 | i = i + 1 6 | finish -------------------------------------------------------------------------------- /examples/language/en/worker.en: -------------------------------------------------------------------------------- 1 | 2 | # a func with two args 3 | worker f variable x y content 4 | variable t value 0 made 5 | t = x + y 6 | result t returned 7 | finish 8 | 9 | # call func and receive rsp 10 | worker f with 10 20 applied and r received 11 | 12 | # print the val received 13 | command r write -------------------------------------------------------------------------------- /examples/language/kz/calculation.kz: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = рас & жалған # жалған 16 | x = рас | жалған # рас 17 | x = рас ~ жалған # рас 18 | 19 | # логика 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! сан # true 30 | x = 10 ! бос # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/language/kz/closure.kz: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | қызметші make мазмұны 4 | 5 | # a var in env 6 | айнымалы x қимметі 0 болсын 7 | айнымалы r қимметі 0 болсын 8 | 9 | # a func & env 10 | қызметші func айнымалы a мазмұны 11 | бұйрық x жазу # 0 12 | бұйрық y жазу # 200 13 | r = r + a 14 | нәтиже r қайтарылсын 15 | аяқталсын 16 | 17 | # ret the closure func 18 | нәтиже func қайтарылсын 19 | аяқталсын 20 | 21 | # some vars in mod 22 | айнымалы x қимметі 100 болсын 23 | айнымалы y қимметі 200 болсын 24 | 25 | # make closure 26 | қызметші make қолданылсын бен f алынсын 27 | 28 | # print 11 29 | қызметші f бірге 11 қолданылсын бен r алынсын 30 | бұйрық r жазу 31 | 32 | # print 22 33 | қызметші f бірге 11 қолданылсын бен r алынсын 34 | бұйрық r жазу -------------------------------------------------------------------------------- /examples/language/kz/command.kz: -------------------------------------------------------------------------------- 1 | 2 | # оқу a val 3 | бұйрық a оқу 4 | 5 | # print a val 6 | бұйрық a жазу -------------------------------------------------------------------------------- /examples/language/kz/container.kz: -------------------------------------------------------------------------------- 1 | 2 | # declare a тертіп 3 | t қимметі тертіп болсын 4 | # declare a сандық 5 | s қимметі сандық болсын 6 | 7 | # generate a тертіп 8 | t = [11, 22, "abc"] 9 | # generate a сандық 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a сан key 13 | @t.1 = 456 14 | # put a хат key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * дүние 20 | 21 | # check түр 22 | b = t ! тертіп -------------------------------------------------------------------------------- /examples/language/kz/exception.kz: -------------------------------------------------------------------------------- 1 | 2 | айнымалы x қимметі бос болсын 3 | 4 | # try block 5 | қателік e болу 6 | x = 3 / 0 7 | аяқталсын 8 | 9 | # catch block 10 | егер e болса 11 | бұйрық "exception:\n" жазу 12 | бұйрық e жазу 13 | бұйрық "\n" жазу 14 | болмаса 15 | бұйрық "successful!\n" жазу 16 | аяқталсын -------------------------------------------------------------------------------- /examples/language/kz/hello.kz: -------------------------------------------------------------------------------- 1 | 2 | айнымалы i қимметі 0 болсын 3 | солайда i < 9 болса 4 | бұйрық "👀👋\n" жазу 5 | i = i + 1 6 | аяқталсын -------------------------------------------------------------------------------- /examples/language/kz/if.kz: -------------------------------------------------------------------------------- 1 | 2 | егер 0 болса 3 | бұйрық "if" жазу 4 | егерде рас болса 5 | бұйрық "elif" жазу 6 | болмаса 7 | бұйрық "else" жазу 8 | аяқталсын -------------------------------------------------------------------------------- /examples/language/kz/import.kz: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | айнымалы x қимметі "other..." болсын 4 | 5 | # main.xx 6 | қызметші ekirish бірге "../other.xx" қолданылсын бен m алынсын 7 | бұйрық @m.x жазу 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/language/kz/objective.kz: -------------------------------------------------------------------------------- 1 | 2 | # an жәрдемшы бірге one argument 3 | жәрдемшы X айнымалы x мазмұны 4 | @-.x = x 5 | аяқталсын 6 | 7 | # жәрдемшы func 8 | қызметші @X.test мазмұны 9 | бұйрық "X.test...\n" жазу 10 | аяқталсын 11 | 12 | # a жасаушы бірге one arguments 13 | жасаушы Y айнымалы y мазмұны 14 | жасаушы X бірге "arg xxx ...\n" қолданылсын 15 | @-.y = y 16 | аяқталсын 17 | 18 | # жасаушы func 19 | қызметші @Y.test мазмұны 20 | қызметші @X.test қолданылсын 21 | бұйрық "Y.test...\n" жазу 22 | аяқталсын 23 | 24 | # call жасаушы using an жәрдемшы бен receive объект 25 | жасаушы Y бірге "arg yyy ...\n" қолданылсын бен r алынсын 26 | 27 | # print the объект val алынсын 28 | бұйрық @r.x жазу # arg xxx ... 29 | бұйрық @r.y жазу # arg yyy ... 30 | 31 | # call жасаушы func which calling жәрдемшы func inside 32 | қызметші @r.test қолданылсын 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | егер r ! X болса 38 | бұйрық "yes\n" жазу 39 | аяқталсын 40 | # yes -------------------------------------------------------------------------------- /examples/language/kz/spread.kz: -------------------------------------------------------------------------------- 1 | 2 | жайылған "abc..." айнымалы k v болу 3 | бұйрық k жазу 4 | бұйрық "\t" жазу 5 | бұйрық v жазу 6 | бұйрық "\n" жазу 7 | аяқталсын -------------------------------------------------------------------------------- /examples/language/kz/type.kz: -------------------------------------------------------------------------------- 1 | 2 | айнымалы m қимметі "yezish" болсын 3 | 4 | # convert to func 5 | m қимметі қызметші болсын 6 | бұйрық m жазу 7 | 8 | # convert to bool 9 | m қимметі логика болсын 10 | бұйрық m жазу -------------------------------------------------------------------------------- /examples/language/kz/variable.kz: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | айнымалы m қимметі бос болсын 4 | 5 | # a static var 6 | айнымалы n қимметі сан болсын 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m қимметі бос болсын 13 | 14 | # түр error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/language/kz/while.kz: -------------------------------------------------------------------------------- 1 | 2 | айнымалы i қимметі 0 болсын 3 | солайда i < 9 болса 4 | бұйрық "while\n" жазу 5 | i = i + 1 6 | аяқталсын -------------------------------------------------------------------------------- /examples/language/kz/worker.kz: -------------------------------------------------------------------------------- 1 | 2 | # a func бірге two args 3 | қызметші f айнымалы x y мазмұны 4 | айнымалы t қимметі 0 болсын 5 | t = x + y 6 | нәтиже t қайтарылсын 7 | аяқталсын 8 | 9 | # call func бен receive rsp 10 | қызметші f бірге 10 20 қолданылсын бен r алынсын 11 | 12 | # print the val алынсын 13 | бұйрық r жазу -------------------------------------------------------------------------------- /examples/language/tr/calculation.tr: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = doğru & yanlış # yanlış 16 | x = doğru | yanlış # doğru 17 | x = doğru ~ yanlış # doğru 18 | 19 | # mantık 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! sayı # true 30 | x = 10 ! boş # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/language/tr/closure.tr: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | hizmetçi make içeriği 4 | 5 | # a var in env 6 | değişken x kıymeti 0 olsun 7 | değişken r kıymeti 0 olsun 8 | 9 | # a func & env 10 | hizmetçi func değişken a içeriği 11 | buyruk x yaz # 0 12 | buyruk y yaz # 200 13 | r = r + a 14 | netice r geriverılsın 15 | tamamlansin 16 | 17 | # ret the closure func 18 | netice func geriverılsın 19 | tamamlansin 20 | 21 | # some vars in mod 22 | değişken x kıymeti 100 olsun 23 | değişken y kıymeti 200 olsun 24 | 25 | # make closure 26 | hizmetçi make kullanılsın ve f alısın 27 | 28 | # print 11 29 | hizmetçi f ile 11 kullanılsın ve r alısın 30 | buyruk r yaz 31 | 32 | # print 22 33 | hizmetçi f ile 11 kullanılsın ve r alısın 34 | buyruk r yaz -------------------------------------------------------------------------------- /examples/language/tr/command.tr: -------------------------------------------------------------------------------- 1 | 2 | # oku a val 3 | buyruk a oku 4 | 5 | # print a val 6 | buyruk a yaz -------------------------------------------------------------------------------- /examples/language/tr/container.tr: -------------------------------------------------------------------------------- 1 | 2 | # declare a tertip 3 | t kıymeti tertip olsun 4 | # declare a sandık 5 | s kıymeti sandık olsun 6 | 7 | # generate a tertip 8 | t = [11, 22, "abc"] 9 | # generate a sandık 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a sayı key 13 | @t.1 = 456 14 | # put a dize key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * dünya 20 | 21 | # check tür 22 | b = t ! tertip -------------------------------------------------------------------------------- /examples/language/tr/exception.tr: -------------------------------------------------------------------------------- 1 | 2 | değişken x kıymeti boş olsun 3 | 4 | # try block 5 | hatalık e olup 6 | x = 3 / 0 7 | tamamlansin 8 | 9 | # catch block 10 | eğer e olsa 11 | buyruk "exception:\n" yaz 12 | buyruk e yaz 13 | buyruk "\n" yaz 14 | olmasa 15 | buyruk "successful!\n" yaz 16 | tamamlansin -------------------------------------------------------------------------------- /examples/language/tr/hello.tr: -------------------------------------------------------------------------------- 1 | 2 | değişken i kıymeti 0 olsun 3 | böyleyse i < 9 olsa 4 | buyruk "👀👋\n" yaz 5 | i = i + 1 6 | tamamlansin -------------------------------------------------------------------------------- /examples/language/tr/if.tr: -------------------------------------------------------------------------------- 1 | 2 | eğer 0 olsa 3 | buyruk "if" yaz 4 | eğerde doğru olsa 5 | buyruk "elif" yaz 6 | olmasa 7 | buyruk "else" yaz 8 | tamamlansin -------------------------------------------------------------------------------- /examples/language/tr/import.tr: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | değişken x kıymeti "other..." olsun 4 | 5 | # main.xx 6 | hizmetçi ekirish ile "../other.xx" kullanılsın ve m alısın 7 | buyruk @m.x yaz 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/language/tr/objective.tr: -------------------------------------------------------------------------------- 1 | 2 | # an yardımcı ile one argument 3 | yardımcı X değişken x içeriği 4 | @-.x = x 5 | tamamlansin 6 | 7 | # yardımcı func 8 | hizmetçi @X.test içeriği 9 | buyruk "X.test...\n" yaz 10 | tamamlansin 11 | 12 | # a oluşturucu ile one arguments 13 | oluşturucu Y değişken y içeriği 14 | oluşturucu X ile "arg xxx ...\n" kullanılsın 15 | @-.y = y 16 | tamamlansin 17 | 18 | # oluşturucu func 19 | hizmetçi @Y.test içeriği 20 | hizmetçi @X.test kullanılsın 21 | buyruk "Y.test...\n" yaz 22 | tamamlansin 23 | 24 | # call oluşturucu using an yardımcı ve receive obekit 25 | oluşturucu Y ile "arg yyy ...\n" kullanılsın ve r alısın 26 | 27 | # print the obekit val alısın 28 | buyruk @r.x yaz # arg xxx ... 29 | buyruk @r.y yaz # arg yyy ... 30 | 31 | # call oluşturucu func which calling yardımcı func inside 32 | hizmetçi @r.test kullanılsın 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | eğer r ! X olsa 38 | buyruk "yes\n" yaz 39 | tamamlansin 40 | # yes -------------------------------------------------------------------------------- /examples/language/tr/spread.tr: -------------------------------------------------------------------------------- 1 | 2 | yayılan "abc..." değişken k v olup 3 | buyruk k yaz 4 | buyruk "\t" yaz 5 | buyruk v yaz 6 | buyruk "\n" yaz 7 | tamamlansin -------------------------------------------------------------------------------- /examples/language/tr/type.tr: -------------------------------------------------------------------------------- 1 | 2 | değişken m kıymeti "yezish" olsun 3 | 4 | # convert to func 5 | m kıymeti hizmetçi olsun 6 | buyruk m yaz 7 | 8 | # convert to bool 9 | m kıymeti mantık olsun 10 | buyruk m yaz -------------------------------------------------------------------------------- /examples/language/tr/variable.tr: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | değişken m kıymeti boş olsun 4 | 5 | # a static var 6 | değişken n kıymeti sayı olsun 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m kıymeti boş olsun 13 | 14 | # tür error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/language/tr/while.tr: -------------------------------------------------------------------------------- 1 | 2 | değişken i kıymeti 0 olsun 3 | böyleyse i < 9 olsa 4 | buyruk "while\n" yaz 5 | i = i + 1 6 | tamamlansin -------------------------------------------------------------------------------- /examples/language/tr/worker.tr: -------------------------------------------------------------------------------- 1 | 2 | # a func ile two args 3 | hizmetçi f değişken x y içeriği 4 | değişken t kıymeti 0 olsun 5 | t = x + y 6 | netice t geriverılsın 7 | tamamlansin 8 | 9 | # call func ve receive rsp 10 | hizmetçi f ile 10 20 kullanılsın ve r alısın 11 | 12 | # print the val alısın 13 | buyruk r yaz -------------------------------------------------------------------------------- /examples/language/ug/calculation.ug: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = rast & yalghan # yalghan 16 | x = rast | yalghan # rast 17 | x = rast ~ yalghan # rast 18 | 19 | # logika 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! san # true 30 | x = 10 ! quruq # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/language/ug/closure.ug: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | xizmetchi make mezmuni 4 | 5 | # a var in env 6 | miqdar x qimmiti 0 bolsun 7 | miqdar r qimmiti 0 bolsun 8 | 9 | # a func & env 10 | xizmetchi func miqdar a mezmuni 11 | buyruq x yezilsun # 0 12 | buyruq y yezilsun # 200 13 | r = r + a 14 | netije r qayturulsun 15 | tamamlansun 16 | 17 | # ret the closure func 18 | netije func qayturulsun 19 | tamamlansun 20 | 21 | # some vars in mod 22 | miqdar x qimmiti 100 bolsun 23 | miqdar y qimmiti 200 bolsun 24 | 25 | # make closure 26 | xizmetchi make ishlitilsun we f elinsun 27 | 28 | # print 11 29 | xizmetchi f bilen 11 ishlitilsun we r elinsun 30 | buyruq r yezilsun 31 | 32 | # print 22 33 | xizmetchi f bilen 11 ishlitilsun we r elinsun 34 | buyruq r yezilsun -------------------------------------------------------------------------------- /examples/language/ug/command.ug: -------------------------------------------------------------------------------- 1 | 2 | # oqulsun a val 3 | buyruq a oqulsun 4 | 5 | # print a val 6 | buyruq a yezilsun -------------------------------------------------------------------------------- /examples/language/ug/container.ug: -------------------------------------------------------------------------------- 1 | 2 | # declare a tertip 3 | t qimmiti tertip bolsun 4 | # declare a sanduq 5 | s qimmiti sanduq bolsun 6 | 7 | # generate a tertip 8 | t = [11, 22, "abc"] 9 | # generate a sanduq 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a san key 13 | @t.1 = 456 14 | # put a xet key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * dunya 20 | 21 | # check tip 22 | b = t ! tertip -------------------------------------------------------------------------------- /examples/language/ug/exception.ug: -------------------------------------------------------------------------------- 1 | 2 | miqdar x qimmiti quruq bolsun 3 | 4 | # try block 5 | xataliq e bulup 6 | x = 3 / 0 7 | tamamlansun 8 | 9 | # catch block 10 | eger e bolsa 11 | buyruq "exception:\n" yezilsun 12 | buyruq e yezilsun 13 | buyruq "\n" yezilsun 14 | bolmisa 15 | buyruq "successful!\n" yezilsun 16 | tamamlansun -------------------------------------------------------------------------------- /examples/language/ug/hello.ug: -------------------------------------------------------------------------------- 1 | 2 | miqdar i qimmiti 0 bolsun 3 | nawada i < 9 bolsa 4 | buyruq "👀👋\n" yezilsun 5 | i = i + 1 6 | tamamlansun -------------------------------------------------------------------------------- /examples/language/ug/if.ug: -------------------------------------------------------------------------------- 1 | 2 | eger 0 bolsa 3 | buyruq "if" yezilsun 4 | egerde rast bolsa 5 | buyruq "elif" yezilsun 6 | bolmisa 7 | buyruq "else" yezilsun 8 | tamamlansun -------------------------------------------------------------------------------- /examples/language/ug/import.ug: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | miqdar x qimmiti "other..." bolsun 4 | 5 | # main.xx 6 | xizmetchi ekirish bilen "../other.xx" ishlitilsun we m elinsun 7 | buyruq @m.x yezilsun 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/language/ug/objective.ug: -------------------------------------------------------------------------------- 1 | 2 | # an yardemchi bilen one argument 3 | yardemchi X miqdar x mezmuni 4 | @-.x = x 5 | tamamlansun 6 | 7 | # yardemchi func 8 | xizmetchi @X.test mezmuni 9 | buyruq "X.test...\n" yezilsun 10 | tamamlansun 11 | 12 | # a yasighuchi bilen one arguments 13 | yasighuchi Y miqdar y mezmuni 14 | yasighuchi X bilen "arg xxx ...\n" ishlitilsun 15 | @-.y = y 16 | tamamlansun 17 | 18 | # yasighuchi func 19 | xizmetchi @Y.test mezmuni 20 | xizmetchi @X.test ishlitilsun 21 | buyruq "Y.test...\n" yezilsun 22 | tamamlansun 23 | 24 | # call yasighuchi using an yardemchi we receive obekit 25 | yasighuchi Y bilen "arg yyy ...\n" ishlitilsun we r elinsun 26 | 27 | # print the obekit val elinsun 28 | buyruq @r.x yezilsun # arg xxx ... 29 | buyruq @r.y yezilsun # arg yyy ... 30 | 31 | # call yasighuchi func which calling yardemchi func inside 32 | xizmetchi @r.test ishlitilsun 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | eger r ! X bolsa 38 | buyruq "yes\n" yezilsun 39 | tamamlansun 40 | # yes -------------------------------------------------------------------------------- /examples/language/ug/spread.ug: -------------------------------------------------------------------------------- 1 | 2 | yeyilghan "abc..." miqdar k v bulup 3 | buyruq k yezilsun 4 | buyruq "\t" yezilsun 5 | buyruq v yezilsun 6 | buyruq "\n" yezilsun 7 | tamamlansun -------------------------------------------------------------------------------- /examples/language/ug/type.ug: -------------------------------------------------------------------------------- 1 | 2 | miqdar m qimmiti "yezish" bolsun 3 | 4 | # convert to func 5 | m qimmiti xizmetchi bolsun 6 | buyruq m yezilsun 7 | 8 | # convert to bool 9 | m qimmiti logika bolsun 10 | buyruq m yezilsun -------------------------------------------------------------------------------- /examples/language/ug/variable.ug: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | miqdar m qimmiti quruq bolsun 4 | 5 | # a static var 6 | miqdar n qimmiti san bolsun 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m qimmiti quruq bolsun 13 | 14 | # tip error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/language/ug/while.ug: -------------------------------------------------------------------------------- 1 | 2 | miqdar i qimmiti 0 bolsun 3 | nawada i < 9 bolsa 4 | buyruq "while\n" yezilsun 5 | i = i + 1 6 | tamamlansun -------------------------------------------------------------------------------- /examples/language/ug/worker.ug: -------------------------------------------------------------------------------- 1 | 2 | # a func bilen two args 3 | xizmetchi f miqdar x y mezmuni 4 | miqdar t qimmiti 0 bolsun 5 | t = x + y 6 | netije t qayturulsun 7 | tamamlansun 8 | 9 | # call func we receive rsp 10 | xizmetchi f bilen 10 20 ishlitilsun we r elinsun 11 | 12 | # print the val elinsun 13 | buyruq r yezilsun -------------------------------------------------------------------------------- /examples/language/uy/calculation.uy: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = راست & يالغان # يالغان 16 | x = راست | يالغان # راست 17 | x = راست ~ يالغان # راست 18 | 19 | # لوگىكا 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! سان # true 30 | x = 10 ! قۇرۇق # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/language/uy/closure.uy: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | خىزمەتچى make مەزمۇنى 4 | 5 | # a var in env 6 | مىقدار x قىممىتى 0 بولسۇن 7 | مىقدار r قىممىتى 0 بولسۇن 8 | 9 | # a func & env 10 | خىزمەتچى func مىقدار a مەزمۇنى 11 | بۇيرۇق x يېزىلسۇن # 0 12 | بۇيرۇق y يېزىلسۇن # 200 13 | r = r + a 14 | نەتىجە r قايتۇرۇلسۇن 15 | تاماملانسۇن 16 | 17 | # ret the closure func 18 | نەتىجە func قايتۇرۇلسۇن 19 | تاماملانسۇن 20 | 21 | # some vars in mod 22 | مىقدار x قىممىتى 100 بولسۇن 23 | مىقدار y قىممىتى 200 بولسۇن 24 | 25 | # make closure 26 | خىزمەتچى make ئىشلىتىلسۇن ۋە f ئېلىنسۇن 27 | 28 | # print 11 29 | خىزمەتچى f بىلەن 11 ئىشلىتىلسۇن ۋە r ئېلىنسۇن 30 | بۇيرۇق r يېزىلسۇن 31 | 32 | # print 22 33 | خىزمەتچى f بىلەن 11 ئىشلىتىلسۇن ۋە r ئېلىنسۇن 34 | بۇيرۇق r يېزىلسۇن -------------------------------------------------------------------------------- /examples/language/uy/command.uy: -------------------------------------------------------------------------------- 1 | 2 | # ئوقۇلسۇن a val 3 | بۇيرۇق a ئوقۇلسۇن 4 | 5 | # print a val 6 | بۇيرۇق a يېزىلسۇن -------------------------------------------------------------------------------- /examples/language/uy/container.uy: -------------------------------------------------------------------------------- 1 | 2 | # declare a تەرتىپ 3 | t قىممىتى تەرتىپ بولسۇن 4 | # declare a ساندۇق 5 | s قىممىتى ساندۇق بولسۇن 6 | 7 | # generate a تەرتىپ 8 | t = [11, 22, "abc"] 9 | # generate a ساندۇق 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a سان key 13 | @t.1 = 456 14 | # put a خەت key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * دۇنيا 20 | 21 | # check تىپ 22 | b = t ! تەرتىپ -------------------------------------------------------------------------------- /examples/language/uy/exception.uy: -------------------------------------------------------------------------------- 1 | 2 | مىقدار x قىممىتى قۇرۇق بولسۇن 3 | 4 | # try block 5 | خاتالىق e بۇلۇپ 6 | x = 3 / 0 7 | تاماملانسۇن 8 | 9 | # catch block 10 | ئەگەر e بولسا 11 | بۇيرۇق "exception:\n" يېزىلسۇن 12 | بۇيرۇق e يېزىلسۇن 13 | بۇيرۇق "\n" يېزىلسۇن 14 | بولمىسا 15 | بۇيرۇق "successful!\n" يېزىلسۇن 16 | تاماملانسۇن -------------------------------------------------------------------------------- /examples/language/uy/hello.uy: -------------------------------------------------------------------------------- 1 | 2 | مىقدار i قىممىتى 0 بولسۇن 3 | ناۋادا i < 9 بولسا 4 | بۇيرۇق "👀👋\n" يېزىلسۇن 5 | i = i + 1 6 | تاماملانسۇن -------------------------------------------------------------------------------- /examples/language/uy/if.uy: -------------------------------------------------------------------------------- 1 | 2 | ئەگەر 0 بولسا 3 | بۇيرۇق "if" يېزىلسۇن 4 | ئەگەردە راست بولسا 5 | بۇيرۇق "elif" يېزىلسۇن 6 | بولمىسا 7 | بۇيرۇق "else" يېزىلسۇن 8 | تاماملانسۇن -------------------------------------------------------------------------------- /examples/language/uy/import.uy: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | مىقدار x قىممىتى "other..." بولسۇن 4 | 5 | # main.xx 6 | خىزمەتچى ekirish بىلەن "../other.xx" ئىشلىتىلسۇن ۋە m ئېلىنسۇن 7 | بۇيرۇق @m.x يېزىلسۇن 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/language/uy/objective.uy: -------------------------------------------------------------------------------- 1 | 2 | # an ياردەمچى بىلەن one argument 3 | ياردەمچى X مىقدار x مەزمۇنى 4 | @-.x = x 5 | تاماملانسۇن 6 | 7 | # ياردەمچى func 8 | خىزمەتچى @X.test مەزمۇنى 9 | بۇيرۇق "X.test...\n" يېزىلسۇن 10 | تاماملانسۇن 11 | 12 | # a ياسىغۇچى بىلەن one arguments 13 | ياسىغۇچى Y مىقدار y مەزمۇنى 14 | ياسىغۇچى X بىلەن "arg xxx ...\n" ئىشلىتىلسۇن 15 | @-.y = y 16 | تاماملانسۇن 17 | 18 | # ياسىغۇچى func 19 | خىزمەتچى @Y.test مەزمۇنى 20 | خىزمەتچى @X.test ئىشلىتىلسۇن 21 | بۇيرۇق "Y.test...\n" يېزىلسۇن 22 | تاماملانسۇن 23 | 24 | # call ياسىغۇچى using an ياردەمچى ۋە receive ئوبېكىت 25 | ياسىغۇچى Y بىلەن "arg yyy ...\n" ئىشلىتىلسۇن ۋە r ئېلىنسۇن 26 | 27 | # print the ئوبېكىت val ئېلىنسۇن 28 | بۇيرۇق @r.x يېزىلسۇن # arg xxx ... 29 | بۇيرۇق @r.y يېزىلسۇن # arg yyy ... 30 | 31 | # call ياسىغۇچى func which calling ياردەمچى func inside 32 | خىزمەتچى @r.test ئىشلىتىلسۇن 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | ئەگەر r ! X بولسا 38 | بۇيرۇق "yes\n" يېزىلسۇن 39 | تاماملانسۇن 40 | # yes -------------------------------------------------------------------------------- /examples/language/uy/spread.uy: -------------------------------------------------------------------------------- 1 | 2 | يېيىلغان "abc..." مىقدار k v بۇلۇپ 3 | بۇيرۇق k يېزىلسۇن 4 | بۇيرۇق "\t" يېزىلسۇن 5 | بۇيرۇق v يېزىلسۇن 6 | بۇيرۇق "\n" يېزىلسۇن 7 | تاماملانسۇن -------------------------------------------------------------------------------- /examples/language/uy/type.uy: -------------------------------------------------------------------------------- 1 | 2 | مىقدار m قىممىتى "yezish" بولسۇن 3 | 4 | # convert to func 5 | m قىممىتى خىزمەتچى بولسۇن 6 | بۇيرۇق m يېزىلسۇن 7 | 8 | # convert to bool 9 | m قىممىتى لوگىكا بولسۇن 10 | بۇيرۇق m يېزىلسۇن -------------------------------------------------------------------------------- /examples/language/uy/variable.uy: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | مىقدار m قىممىتى قۇرۇق بولسۇن 4 | 5 | # a static var 6 | مىقدار n قىممىتى سان بولسۇن 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m قىممىتى قۇرۇق بولسۇن 13 | 14 | # تىپ error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/language/uy/while.uy: -------------------------------------------------------------------------------- 1 | 2 | مىقدار i قىممىتى 0 بولسۇن 3 | ناۋادا i < 9 بولسا 4 | بۇيرۇق "while\n" يېزىلسۇن 5 | i = i + 1 6 | تاماملانسۇن -------------------------------------------------------------------------------- /examples/language/uy/worker.uy: -------------------------------------------------------------------------------- 1 | 2 | # a func بىلەن two args 3 | خىزمەتچى f مىقدار x y مەزمۇنى 4 | مىقدار t قىممىتى 0 بولسۇن 5 | t = x + y 6 | نەتىجە t قايتۇرۇلسۇن 7 | تاماملانسۇن 8 | 9 | # call func ۋە receive rsp 10 | خىزمەتچى f بىلەن 10 20 ئىشلىتىلسۇن ۋە r ئېلىنسۇن 11 | 12 | # print the val ئېلىنسۇن 13 | بۇيرۇق r يېزىلسۇن -------------------------------------------------------------------------------- /examples/language/uz/calculation.uz: -------------------------------------------------------------------------------- 1 | 2 | # arthimetic 3 | x = 1 + 2 # 3 4 | x = 1 + 2 * 3 # 9 5 | x = 1 + (2 * 3) # 7 6 | x = 64 ^ (1 / 3) # 4 7 | x = 10 % 7 # 3 8 | 9 | # bitwise 10 | x = 3 & 2 # 2 11 | x = 3 | 2 # 3 12 | x = 3 ~ 2 # 1 13 | 14 | # boolean 15 | x = rost & yolg'on # yolg'on 16 | x = rost | yolg'on # rost 17 | x = rost ~ yolg'on # rost 18 | 19 | # mantiq 20 | x = "2" ? 2 # false 21 | x = 2 < 3 # true 22 | x = "ab" > "ac" # false 23 | 24 | # string 25 | x = "ab" + "cd" # abcd 26 | x = "ab" * 2 # abab 27 | 28 | # check 29 | x = 10 ! son # true 30 | x = 10 ! bo'sh # false 31 | x = 3 ! 1 # true 32 | x = "abc" ! "b" # true -------------------------------------------------------------------------------- /examples/language/uz/closure.uz: -------------------------------------------------------------------------------- 1 | 2 | # a closure maker func 3 | xizmatchi make mazmuni 4 | 5 | # a var in env 6 | o'zgaruvch x qiymati 0 bo'lsin 7 | o'zgaruvch r qiymati 0 bo'lsin 8 | 9 | # a func & env 10 | xizmatchi func o'zgaruvch a mazmuni 11 | buyruq x yozilsin # 0 12 | buyruq y yozilsin # 200 13 | r = r + a 14 | natija r qaytarilsin 15 | tamomlansin 16 | 17 | # ret the closure func 18 | natija func qaytarilsin 19 | tamomlansin 20 | 21 | # some vars in mod 22 | o'zgaruvch x qiymati 100 bo'lsin 23 | o'zgaruvch y qiymati 200 bo'lsin 24 | 25 | # make closure 26 | xizmatchi make ishlatilsin va f olinsin 27 | 28 | # print 11 29 | xizmatchi f bilan 11 ishlatilsin va r olinsin 30 | buyruq r yozilsin 31 | 32 | # print 22 33 | xizmatchi f bilan 11 ishlatilsin va r olinsin 34 | buyruq r yozilsin -------------------------------------------------------------------------------- /examples/language/uz/command.uz: -------------------------------------------------------------------------------- 1 | 2 | # o'qisin a val 3 | buyruq a o'qisin 4 | 5 | # print a val 6 | buyruq a yozilsin -------------------------------------------------------------------------------- /examples/language/uz/container.uz: -------------------------------------------------------------------------------- 1 | 2 | # declare a tartib 3 | t qiymati tartib bo'lsin 4 | # declare a sandiq 5 | s qiymati sandiq bo'lsin 6 | 7 | # generate a tartib 8 | t = [11, 22, "abc"] 9 | # generate a sandiq 10 | s = {a: "aa", b: "bb", c: 123} 11 | 12 | # put a son key 13 | @t.1 = 456 14 | # put a xat key 15 | @s.k = "abc" 16 | # put a var key 17 | @s{v} = val 18 | 19 | # alias: this: - bu, module: + bolek, global: * dunyo 20 | 21 | # check tur 22 | b = t ! tartib -------------------------------------------------------------------------------- /examples/language/uz/exception.uz: -------------------------------------------------------------------------------- 1 | 2 | o'zgaruvch x qiymati bo'sh bo'lsin 3 | 4 | # try block 5 | xatolik e bo'lib 6 | x = 3 / 0 7 | tamomlansin 8 | 9 | # catch block 10 | agar e bo'lsa 11 | buyruq "exception:\n" yozilsin 12 | buyruq e yozilsin 13 | buyruq "\n" yozilsin 14 | bo'lmasa 15 | buyruq "successful!\n" yozilsin 16 | tamomlansin -------------------------------------------------------------------------------- /examples/language/uz/hello.uz: -------------------------------------------------------------------------------- 1 | 2 | o'zgaruvch i qiymati 0 bo'lsin 3 | shundayda i < 9 bo'lsa 4 | buyruq "👀👋\n" yozilsin 5 | i = i + 1 6 | tamomlansin -------------------------------------------------------------------------------- /examples/language/uz/if.uz: -------------------------------------------------------------------------------- 1 | 2 | agar 0 bo'lsa 3 | buyruq "if" yozilsin 4 | egerda rost bo'lsa 5 | buyruq "elif" yozilsin 6 | bo'lmasa 7 | buyruq "else" yozilsin 8 | tamomlansin -------------------------------------------------------------------------------- /examples/language/uz/import.uz: -------------------------------------------------------------------------------- 1 | 2 | # other.xx 3 | o'zgaruvch x qiymati "other..." bo'lsin 4 | 5 | # main.xx 6 | xizmatchi ekirish bilan "../other.xx" ishlatilsin va m olinsin 7 | buyruq @m.x yozilsin 8 | 9 | # run the program 10 | `.uyghur.exe ./main.xx` 11 | 12 | # get the rsp 13 | other... -------------------------------------------------------------------------------- /examples/language/uz/objective.uz: -------------------------------------------------------------------------------- 1 | 2 | # an yordamchi bilan one argument 3 | yordamchi X o'zgaruvch x mazmuni 4 | @-.x = x 5 | tamomlansin 6 | 7 | # yordamchi func 8 | xizmatchi @X.test mazmuni 9 | buyruq "X.test...\n" yozilsin 10 | tamomlansin 11 | 12 | # a yasag'uchi bilan one arguments 13 | yasag'uchi Y o'zgaruvch y mazmuni 14 | yasag'uchi X bilan "arg xxx ...\n" ishlatilsin 15 | @-.y = y 16 | tamomlansin 17 | 18 | # yasag'uchi func 19 | xizmatchi @Y.test mazmuni 20 | xizmatchi @X.test ishlatilsin 21 | buyruq "Y.test...\n" yozilsin 22 | tamomlansin 23 | 24 | # call yasag'uchi using an yordamchi va receive obekit 25 | yasag'uchi Y bilan "arg yyy ...\n" ishlatilsin va r olinsin 26 | 27 | # print the obekit val olinsin 28 | buyruq @r.x yozilsin # arg xxx ... 29 | buyruq @r.y yozilsin # arg yyy ... 30 | 31 | # call yasag'uchi func which calling yordamchi func inside 32 | xizmatchi @r.test ishlatilsin 33 | # X.test... 34 | # Y.test... 35 | 36 | # check obj is created by or assisted by 37 | agar r ! X bo'lsa 38 | buyruq "yes\n" yozilsin 39 | tamomlansin 40 | # yes -------------------------------------------------------------------------------- /examples/language/uz/spread.uz: -------------------------------------------------------------------------------- 1 | 2 | yoyilgan "abc..." o'zgaruvch k v bo'lib 3 | buyruq k yozilsin 4 | buyruq "\t" yozilsin 5 | buyruq v yozilsin 6 | buyruq "\n" yozilsin 7 | tamomlansin -------------------------------------------------------------------------------- /examples/language/uz/type.uz: -------------------------------------------------------------------------------- 1 | 2 | o'zgaruvch m qiymati "yezish" bo'lsin 3 | 4 | # convert to func 5 | m qiymati xizmatchi bo'lsin 6 | buyruq m yozilsin 7 | 8 | # convert to bool 9 | m qiymati mantiq bo'lsin 10 | buyruq m yozilsin -------------------------------------------------------------------------------- /examples/language/uz/variable.uz: -------------------------------------------------------------------------------- 1 | 2 | # a dynamic var 3 | o'zgaruvch m qiymati bo'sh bo'lsin 4 | 5 | # a static var 6 | o'zgaruvch n qiymati son bo'lsin 7 | 8 | # set val 9 | m = "salam dunya!" 10 | 11 | # free val 12 | m qiymati bo'sh bo'lsin 13 | 14 | # tur error 15 | n = "sinaq..." -------------------------------------------------------------------------------- /examples/language/uz/while.uz: -------------------------------------------------------------------------------- 1 | 2 | o'zgaruvch i qiymati 0 bo'lsin 3 | shundayda i < 9 bo'lsa 4 | buyruq "while\n" yozilsin 5 | i = i + 1 6 | tamomlansin -------------------------------------------------------------------------------- /examples/language/uz/worker.uz: -------------------------------------------------------------------------------- 1 | 2 | # a func bilan two args 3 | xizmatchi f o'zgaruvch x y mazmuni 4 | o'zgaruvch t qiymati 0 bo'lsin 5 | t = x + y 6 | natija t qaytarilsin 7 | tamomlansin 8 | 9 | # call func va receive rsp 10 | xizmatchi f bilan 10 20 ishlatilsin va r olinsin 11 | 12 | # print the val olinsin 13 | buyruq r yozilsin -------------------------------------------------------------------------------- /examples/merhaba.ug: -------------------------------------------------------------------------------- 1 | # hello world 2 | 3 | buyruq "merhaba uyghur script!" yezilsun 4 | -------------------------------------------------------------------------------- /examples/snippets/apply_assister.en: -------------------------------------------------------------------------------- 1 | assister f$1 with a$2 applied -------------------------------------------------------------------------------- /examples/snippets/apply_creator.en: -------------------------------------------------------------------------------- 1 | creator f$1 with a$2 applied and r$3 received -------------------------------------------------------------------------------- /examples/snippets/apply_worker.en: -------------------------------------------------------------------------------- 1 | worker f$1 with a$2 applied and r$3 received -------------------------------------------------------------------------------- /examples/snippets/assister.en: -------------------------------------------------------------------------------- 1 | assister Y$1 variable a$1 content 2 | # 3 | finish -------------------------------------------------------------------------------- /examples/snippets/creator.en: -------------------------------------------------------------------------------- 1 | creator Y$1 variable a$1 content 2 | # 3 | finish -------------------------------------------------------------------------------- /examples/snippets/exception.en: -------------------------------------------------------------------------------- 1 | exception e become 2 | $1 3 | finish 4 | if e then 5 | command e write 6 | else 7 | # 8 | finish -------------------------------------------------------------------------------- /examples/snippets/hello.en: -------------------------------------------------------------------------------- 1 | 2 | # declare variables 3 | variable s value dict made 4 | variable m value empty made 5 | 6 | # while loop 7 | variable i value 0 made 8 | while i < 9 then 9 | i = i + 1 10 | @s{i} = i * i 11 | finish 12 | 13 | # expand box 14 | speaded variable k v become 15 | command k write 16 | command " * " write 17 | command k write 18 | command " = " write 19 | command v write 20 | command "\n" write 21 | finish 22 | worker @sanduq.dewriylesh with s func applied 23 | 24 | # get language 25 | worker @*.isminiElish applied and n received 26 | 27 | # concat string 28 | m = n + " salam!\n" 29 | 30 | # print message 31 | command m write -------------------------------------------------------------------------------- /examples/snippets/if.en: -------------------------------------------------------------------------------- 1 | if a$1 value empty then 2 | # 3 | elif a$1 value right then 4 | # 5 | else 6 | # 7 | finish -------------------------------------------------------------------------------- /examples/snippets/import.en: -------------------------------------------------------------------------------- 1 | worker ekirish with "$1" applied and m$2 received -------------------------------------------------------------------------------- /examples/snippets/iterate.en: -------------------------------------------------------------------------------- 1 | worker func variable k v content 2 | # 3 | finish 4 | worker @sanduq.dewriylesh with *$1 func applied -------------------------------------------------------------------------------- /examples/snippets/read.en: -------------------------------------------------------------------------------- 1 | command $1 read -------------------------------------------------------------------------------- /examples/snippets/spread.en: -------------------------------------------------------------------------------- 1 | speaded $1 variable k become 2 | # 3 | finish -------------------------------------------------------------------------------- /examples/snippets/value.en: -------------------------------------------------------------------------------- 1 | $1 value empty made -------------------------------------------------------------------------------- /examples/snippets/variable.en: -------------------------------------------------------------------------------- 1 | variable $1 value empty made -------------------------------------------------------------------------------- /examples/snippets/while.en: -------------------------------------------------------------------------------- 1 | while $1 value right then 2 | # 3 | finish -------------------------------------------------------------------------------- /examples/snippets/worker.en: -------------------------------------------------------------------------------- 1 | worker f$1 variable a$2 content 2 | # 3 | result r$3 returned 4 | finish -------------------------------------------------------------------------------- /examples/snippets/write.en: -------------------------------------------------------------------------------- 1 | command "$1" write -------------------------------------------------------------------------------- /examples/test.en: -------------------------------------------------------------------------------- 1 | 2 | command "OK!" write 3 | -------------------------------------------------------------------------------- /examples/test.ug: -------------------------------------------------------------------------------- 1 | 2 | yeyilghan xojjet miqdar k bulup 3 | buyruq k yezilsun 4 | buyruq "\n" yezilsun 5 | tamamlansun 6 | 7 | 8 | xizmetchi @qeghez.oqush bilen "../resources/rose.png" ishlitilsun we p elinsun 9 | xizmetchi @sehne.korsitish bilen -1 -1 "Yuguresh" -1 ishlitilsun 10 | 11 | xizmetchi @qelem.fontEkirish bilen "../resources/ukij.ttf" 36 ishlitilsun we font elinsun 12 | 13 | miqdar x qimmiti 250 bolsun 14 | 15 | nawada @sehne.yepilmaqchi bolmisa 16 | # 17 | eger @taxta.besilghan ("f") bolsa 18 | buyruq "f!\n" yezilsun 19 | x = x + 2 20 | tamamlansun 21 | eger @taxta.besilghan ("s") bolsa 22 | buyruq "s!\n" yezilsun 23 | x = x - 2 24 | tamamlansun 25 | # 26 | xizmetchi @qelem.totTereplikSizish bilen 250 250 250 250 ishlitilsun 27 | xizmetchi @qelem.qeghezSizish bilen 250 350 p 200 200 ishlitilsun 28 | xizmetchi @qelem.chemberSizish bilen 250 250 70 ishlitilsun 29 | xizmetchi @qelem.xetYezish bilen 250 250 "A" 10 ishlitilsun 30 | # 31 | xizmetchi @qelem.yultuzToldurush bilen 75 60 5 20 20 ishlitilsun 32 | # 33 | # xizmetchi @qelem.fontSizish bilen font 36 "SINAQ" 250 100 ishlitilsun 34 | # 35 | # x = x + 1 36 | # yeyilghan 1 miqdar k bulup 37 | xizmetchi @qelem.chemberToldurush bilen x 60 35 ishlitilsun 38 | # tamamlansun 39 | # 40 | xizmetchi @sehne.yengilash ishlitilsun 41 | tamamlansun 42 | -------------------------------------------------------------------------------- /examples/todo.ug: -------------------------------------------------------------------------------- 1 | # todo 2 | 3 | # bind cursor with container 4 | # freeze values like 01 5 | 6 | # ######################################################### const 7 | 8 | # variable 9 | # miqdar x tipi turaqliq/turaqsiz bolsun 10 | # turaqliq x qimmiti quruq bolsun 11 | # turaqsiz x qimmiti quruq bolsun 12 | 13 | # ######################################################### other 14 | 15 | @?{key} # recursive search 16 | 17 | miqdar a qimmiti tiziq bolsun 18 | miqdar b qimmiti lughet bolsun 19 | miqdar c qimmiti sanduq bolsun 20 | 21 | a = [123, 345, 567, "abc"] 22 | b = { 23 | a: 123, 24 | b: 'abc', 25 | } 26 | 27 | c = {123, "abc"} 28 | c = { 29 | a: 123, 30 | b: "abc", 31 | } 32 | 33 | # arr = [] 34 | # map = {} 35 | 36 | # @tab:123 37 | # @tab:abc 38 | # @tab{key} 39 | 40 | 41 | # ######################################################### exception 42 | 43 | xataliq e mezmuni 44 | tamamlansun 45 | 46 | sinaq 47 | sinalsun we e elinsun 48 | 49 | # ######################################################### lambda 50 | 51 | xizmetchi f miqdar a mezmuni 52 | netije r qayturulsun 53 | tamamlansun 54 | 55 | f = () => { 56 | 57 | } 58 | 59 | xizmetchi f bilen a b (a b c) => { 60 | 61 | } c () => { 62 | 63 | } d e () => { 64 | 65 | } ishlitilsun we r elinsun 66 | 67 | 68 | xizmetchi f bilen a { 69 | 70 | } ishlitilsun we r elinsun 71 | -------------------------------------------------------------------------------- /extension/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behavior to automatically normalize line endings. 2 | * text=auto 3 | 4 | -------------------------------------------------------------------------------- /extension/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.vsix 3 | package.json 4 | *.tmLanguage.json 5 | snippets/ -------------------------------------------------------------------------------- /extension/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ] 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /extension/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | vsc-extension-quickstart.md 5 | -------------------------------------------------------------------------------- /extension/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to the "uyghurscript" extension will be documented in this file. 4 | 5 | Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file. 6 | 7 | ## [Unreleased] 8 | 9 | - Initial release -------------------------------------------------------------------------------- /extension/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Alimjan Yusan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /extension/README.md: -------------------------------------------------------------------------------- 1 | # uyghurscript README 2 | 3 | This is vscode extension for [UyghurScript](https://github.com/Atypicalim/UyghurScript) language. with this extension you can develop programs in languages like uyghur, kazakh, uzbek and turkish. 4 | 5 | ![screenshot](https://Atypicalim.github.io/images/function.png) 6 | 7 | ## Features 8 | 9 | * syntax highlighting 10 | * snippets autocompletion 11 | 12 | ## Release Notes 13 | 14 | ### 1.0.0 15 | 16 | Initial release of uyghur script vscode extension. 17 | 18 | ### 1.0.x 19 | 20 | Added features X, Y, and Z. 21 | 22 | ## How to use 23 | 24 | > just search `uyghur` keyword in vscode, after installation create a file with `.ug` extension, after that you can use the features of this extension. 25 | 26 | ## For more information 27 | 28 | > you need to downlaod uyghur script binary to execute programs, please visit [UyghurScript](https://github.com/Atypicalim/UyghurScript) for more information about uyghurscript, u can see some examples in `./examples/` folder and documents in `./document/` folder ... 29 | 30 | **Enjoy!** 31 | -------------------------------------------------------------------------------- /extension/language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | // symbol used for single line comment. Remove this entry if your language does not support line comments 4 | "lineComment": "#", 5 | // symbols used for start and end a block comment. Remove this entry if your language does not support block comments 6 | // "blockComment": [ "/*", "*/" ] 7 | }, 8 | // symbols used as brackets 9 | "brackets": [ 10 | ["{", "}"], 11 | ["[", "]"], 12 | ["(", ")"] 13 | ], 14 | // symbols that are auto closed when typing 15 | "autoClosingPairs": [ 16 | ["{", "}"], 17 | ["[", "]"], 18 | ["(", ")"], 19 | ["\"", "\""], 20 | ["'", "'"] 21 | ], 22 | // symbols that can be used to surround a selection 23 | "surroundingPairs": [ 24 | ["{", "}"], 25 | ["[", "]"], 26 | ["(", ")"], 27 | ["\"", "\""], 28 | ["'", "'"] 29 | ] 30 | } -------------------------------------------------------------------------------- /extension/others/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/extension/others/icon.png -------------------------------------------------------------------------------- /extension/others/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/extension/others/screenshot.png -------------------------------------------------------------------------------- /extension/package.tpl.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "uighurscript", 3 | "displayName": "UighurScript", 4 | "publisher": "Atypicalim", 5 | "description": "uyghur script language extension ...", 6 | "icon": "others/icon.png", 7 | "version": "{}", // [M[ EXT_VERSION ]M] 8 | "engines": { 9 | "vscode": "^1.69.0" 10 | }, 11 | "keywords": [ 12 | "uighurscript", 13 | "language", 14 | "" // [M[ EXT_KEYWORDS ]M] 15 | ], 16 | "categories": [ 17 | "Programming Languages", 18 | "Snippets" 19 | ], 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/Atypicalim/UyghurScript/" 23 | }, 24 | "homepage": "https://Atypicalim.github.io/", 25 | "bugs": { 26 | "url": "https://github.com/Atypicalim/UyghurScript/issues", 27 | "email": "Atypicalim@163.com" 28 | }, 29 | "contributes": { 30 | "languages": [ 31 | "" // [M[ EXT_LANGUAGES ]M] 32 | ], 33 | "grammars": [ 34 | "" // [M[ EXT_GRAMMARS ]M] 35 | ], 36 | "snippets": [ 37 | "" // [M[ EXT_SNIPPETS ]M] 38 | ] 39 | }, 40 | "__metadata": { 41 | "id": "8ab59741-be9e-4fa6-8bd5-68019f3112ca", 42 | "publisherDisplayName": "Atypicalim", 43 | "publisherId": "58c399a3-8bbb-644f-b31f-f49df9108a1b", 44 | "isPreReleaseVersion": false 45 | } 46 | } -------------------------------------------------------------------------------- /extension/vsc-extension-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your VS Code Extension 2 | 3 | ## What's in the folder 4 | 5 | * This folder contains all of the files necessary for your extension. 6 | * `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension. 7 | * `syntaxes/ug.tmLanguage.json` - this is the Text mate grammar file that is used for tokenization. 8 | * `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets. 9 | 10 | ## Get up and running straight away 11 | 12 | * Make sure the language configuration settings in `language-configuration.json` are accurate. 13 | * Press `F5` to open a new window with your extension loaded. 14 | * Create a new file with a file name suffix matching your language. 15 | * Verify that syntax highlighting works and that the language configuration settings are working. 16 | 17 | ## Make changes 18 | 19 | * You can relaunch the extension from the debug toolbar after making changes to the files listed above. 20 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. 21 | 22 | ## Add more language features 23 | 24 | * To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs 25 | 26 | ## Install your extension 27 | 28 | * To start using your extension with Visual Studio Code copy it into the `/.vscode/extensions` folder and restart Code. 29 | * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension. 30 | -------------------------------------------------------------------------------- /others/convert.js: -------------------------------------------------------------------------------- 1 | // convert 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | require('../build/translate.js'); 6 | require('../build/colorize.js'); 7 | console.log("converter:"); 8 | // 9 | const fromFile = process.argv[2] || null; 10 | let transDir = process.argv[3] || null; 11 | let colorDir = process.argv[4] || null; 12 | // 13 | console.log("converting:", fromFile); 14 | const pathInfo = path.parse(fromFile); 15 | if (!transDir) transDir = pathInfo.dir; 16 | if (!colorDir) colorDir = transDir; 17 | // console.log(`converting.transDir:[${transDir}]`); 18 | // console.log(`converting.colorDir:[${colorDir}]`); 19 | // 20 | const fromName = pathInfo.name; 21 | const fromLang = pathInfo.ext.substring(1); 22 | // console.log(`converting.fromName:[${fromName}]`); 23 | // console.log(`converting.fromLang:[${fromLang}]`); 24 | // 25 | if (fromLang.length <= 0 || !TRANSLATE_LANGS_ARR.includes(fromLang)) { 26 | throw new Error("script lang not valid:" + fromLang); 27 | } 28 | if (!fromFile || !fs.existsSync(fromFile)) { 29 | throw new Error("script file not found:" + fromFile); 30 | } 31 | // 32 | let code = fs.readFileSync(fromFile, 'utf8'); 33 | let langues = []; 34 | let codes = translate_ug_code(langues, code); 35 | for (let lang in codes) { 36 | let transFile = path.join(transDir, fromName) + "." + lang; 37 | let colorFile = path.join(colorDir, fromName) + "." + lang + ".html"; 38 | let _code = codes[lang]; 39 | let _html = colorize_ug_code(_code); 40 | fs.writeFileSync(transFile, _code, 'utf8'); 41 | fs.writeFileSync(colorFile, _html, 'utf8'); 42 | console.log("converted:", lang); 43 | } 44 | // 45 | console.log("converted!"); 46 | -------------------------------------------------------------------------------- /others/converter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | 10 | 51 | 52 | 53 |

54 | Converter 55 | for 56 | UyghurScript 57 |

58 | 59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /others/document.tpl.md: -------------------------------------------------------------------------------- 1 | ## {document} Document // [M[ DOCUMENT_NAME ]M] 2 | // [M[ MD_LIBRARIES ]M] 3 | -------------------------------------------------------------------------------- /others/documents.tpl.md: -------------------------------------------------------------------------------- 1 | ## {project} Documents // [M[ MD_PROJECT ]M] 2 | 3 | ### 1. Types 4 | 5 | * CString 6 | * float 7 | * int 8 | * Color 9 | * Vector2 10 | * Rectangle 11 | * ... 12 | 13 | ### 2. Internals 14 | 15 | // [M[ MD_INTERNALS ]M] 16 | 17 | ### 3. Externals 18 | 19 | // [M[ MD_EXTERNALS ]M] 20 | 21 | ### 4. Others 22 | 23 | > ... 24 | -------------------------------------------------------------------------------- /others/empty.tpl.txt: -------------------------------------------------------------------------------- 1 | // [M[ EMPTY_CONTENT ]M] -------------------------------------------------------------------------------- /others/features.yml: -------------------------------------------------------------------------------- 1 | 2 | hello: 3 | variable: 4 | type: 5 | calculation: 6 | command: 7 | if: 8 | while: 9 | spread: 10 | worker: 11 | closure: 12 | exception: 13 | container: 14 | objective: 15 | import: 16 | -------------------------------------------------------------------------------- /others/grammars.yml: -------------------------------------------------------------------------------- 1 | 2 | # to colorize 3 | 4 | GRAMMAR_COLORS: 5 | GRAMMAR_TYPES: green 6 | GRAMMAR_ACCOUNTCE: blue 7 | GRAMMAR_KEYWORD: red 8 | GRAMMAR_BLOCKS: red 9 | GRAMMAR_EVENTS: red 10 | 11 | # to extension 12 | 13 | GRAMMAR_TYPES: 14 | - LETTER_NIL 15 | - LETTER_BOL 16 | - LETTER_NUM 17 | - LETTER_STR 18 | - LETTER_LST 19 | - LETTER_DCT 20 | - LETTER_TRUE 21 | - LETTER_FALSE 22 | - LETTER_OPPOSITE 23 | - LETTER_THIS 24 | - LETTER_PROXY 25 | - LETTER_SCOPE 26 | - LETTER_MODULE 27 | - LETTER_GLOBAL 28 | 29 | GRAMMAR_ACCOUNTCE: 30 | - LETTER_VARIABLE 31 | - LETTER_FURTHER 32 | 33 | GRAMMAR_KEYWORD: 34 | - LETTER_VALUE 35 | - LETTER_MADE 36 | - LETTER_WHILE 37 | - LETTER_SPREAD 38 | - LETTER_IF 39 | - LETTER_ELIF 40 | - LETTER_EXCEPTION 41 | - LETTER_NATIVE 42 | - LETTER_WORKER 43 | - LETTER_CREATOR 44 | - LETTER_ASSISTER 45 | - LETTER_OBJECT 46 | - LETTER_WITH 47 | - LETTER_APPLY 48 | - LETTER_RESULT 49 | - LETTER_RETURNED 50 | - LETTER_RECIEVED 51 | 52 | GRAMMAR_BLOCKS: 53 | - LETTER_CONTENT 54 | - LETTER_THEN 55 | - LETTER_ELSE 56 | - LETTER_BECOME 57 | - LETTER_END 58 | 59 | GRAMMAR_EVENTS: 60 | - LETTER_COMMAND 61 | - LETTER_CMD_OUTPUT 62 | - LETTER_CMD_INPUT 63 | -------------------------------------------------------------------------------- /others/readme.tpl.md: -------------------------------------------------------------------------------- 1 | # UyghurScript 2 | 3 | ## 0. description 4 | 5 | > a toy script interpreter written in c, u can write & run your script written in uyghur language grammar with it ... 6 | 7 | > 8 | 9 | * read [documents](./documents/) for more informations 10 | 11 | 12 | * run `./release/uyghur.exe` to get help content 13 | 14 | * cick `./release/yuguresh.exe` to run raylib example 15 | 16 | ![example](./resources/examples/running.png) 17 | 18 | ## 1. multiple langauge 19 | 20 | // [M[ MD_LANGUAGES ]M] 21 | 22 | ## 2. highlight & translating 23 | 24 | * vscode [extension](https://marketplace.visualstudio.com/publishers/Atypicalim) for highlighting and autocompleting. 25 | 26 | * language [converter](https://Atypicalim.github.io/others/converter.html) for translating different languages. 27 | 28 | ## 3. supported features 29 | 30 | // [M[ MD_REATURES ]M] 31 | 32 | -------------------------------- 33 | 34 | ## 4. supported libraries 35 | 36 | * [internals](./documents/internals) 37 | 38 | * [externals](./documents/externals) 39 | 40 | ## 5. bridge interfaces 41 | 42 | > u can get the bridge objet and communicate between c and script, just check `bridge.c` for more information 43 | 44 | * register a box to script (with some keys of different types) 45 | ```c++ 46 | Bridge_startBox(bridge); 47 | Bridge_bindBoolean(bridge, "bol", false); 48 | Bridge_bindNumber(bridge, "num", 123); 49 | Bridge_bindString(bridge, "str", "abc..."); 50 | Bridge_register(bridge, "boxName"); // NULL 51 | ``` 52 | 53 | * call script function from c (giving one argument and receiving result) 54 | ```c++ 55 | Bridge_startFunc(bridge); 56 | Bridge_pushValue(bridge, Value_newNumber(123)); 57 | Bridge_pushValue(bridge, Value_newString("")); 58 | Bridge_call(bridge, "funcName"); 59 | char resultType = Bridge_topType(bridge); 60 | void *resultValue = Bridge_receiveValue(bridge); 61 | ``` 62 | 63 | * register c function for script (receiving two argument and giving result) 64 | ```c++ 65 | void testFunc(Bridge *bridge) 66 | { 67 | int a = Bridge_receiveNumber(bridge); 68 | char *b = Bridge_receiveString(bridge); 69 | Bridge_returnBoolean(bridge, false); 70 | } 71 | Bridge_startBox(bridge); 72 | Bridge_bindNative(bridge, "testFunc", testFunc); 73 | Bridge_register(bridge, NULL); 74 | ``` 75 | 76 | ## 6. todo 77 | 78 | * libraries 79 | * ... 80 | 81 | ## 7. others 82 | 83 | > i am still working on it ... 84 | -------------------------------------------------------------------------------- /release/uyghur.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/release/uyghur.exe -------------------------------------------------------------------------------- /release/yuguresh.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/release/yuguresh.exe -------------------------------------------------------------------------------- /resources/bahar.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/bahar.mp3 -------------------------------------------------------------------------------- /resources/door.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/door.wav -------------------------------------------------------------------------------- /resources/examples/deaw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/examples/deaw.png -------------------------------------------------------------------------------- /resources/examples/function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/examples/function.png -------------------------------------------------------------------------------- /resources/examples/running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/examples/running.png -------------------------------------------------------------------------------- /resources/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/icon.ico -------------------------------------------------------------------------------- /resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/icon.png -------------------------------------------------------------------------------- /resources/languages/hello.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/languages/hello.en.png -------------------------------------------------------------------------------- /resources/languages/hello.kz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/languages/hello.kz.png -------------------------------------------------------------------------------- /resources/languages/hello.tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/languages/hello.tr.png -------------------------------------------------------------------------------- /resources/languages/hello.ug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/languages/hello.ug.png -------------------------------------------------------------------------------- /resources/languages/hello.uy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/languages/hello.uy.png -------------------------------------------------------------------------------- /resources/languages/hello.uz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/languages/hello.uz.png -------------------------------------------------------------------------------- /resources/road.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/road.wav -------------------------------------------------------------------------------- /resources/rose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/rose.png -------------------------------------------------------------------------------- /resources/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/run.png -------------------------------------------------------------------------------- /resources/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/screenshot.png -------------------------------------------------------------------------------- /resources/test.txt: -------------------------------------------------------------------------------- 1 | test... -------------------------------------------------------------------------------- /resources/ukij.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Atypicalim/UyghurScript/60128b044b9dcf18c1bb1d9c59599593825870bb/resources/ukij.ttf -------------------------------------------------------------------------------- /run.py: -------------------------------------------------------------------------------- 1 | 2 | import os 3 | import sys 4 | import subprocess 5 | 6 | ################################################################ 7 | 8 | __arg1 = sys.argv[1] if len(sys.argv) > 1 else "" 9 | __arg2 = sys.argv[2] if len(sys.argv) > 2 else "" 10 | __workingDir = os.path.dirname(os.path.abspath(__file__)) 11 | 12 | class Run: 13 | pass 14 | Run.workingDir = __workingDir 15 | Run.arg1 = __arg1 16 | Run.arg2 = __arg2 17 | Run.needUpdate = __arg1 == "--update" or __arg1 == "-u" 18 | Run.needGenerate = __arg1 == "--generate" or __arg1 == "-g" 19 | Run.isRelease = __arg1 == "--release" or __arg1 == "-r" 20 | 21 | ################################################################ 22 | 23 | try: 24 | import yaml 25 | except ModuleNotFoundError: 26 | os.system("pip3 install PyYAML") 27 | 28 | ################################################################ 29 | 30 | def downloadGitTo(url, path): 31 | print("\ndownload:", url) 32 | if os.path.isdir(path): 33 | if Run.needUpdate: 34 | os.chdir(path) 35 | subprocess.run(['git', 'pull'], check=True) 36 | else: 37 | print("exist!") 38 | else: 39 | try: 40 | subprocess.run(['git', 'clone', url, path], check=True) 41 | print("Git clone completed successfully.") 42 | except subprocess.CalledProcessError as e: 43 | print(f"An error occurred while cloning: {e}") 44 | pass 45 | 46 | ################################################################ 47 | 48 | downloadGitTo("git@github.com:Atypicalim/my-build-tools.git", "../my-build-tools") 49 | downloadGitTo("git@github.com:Atypicalim/pure-js-tools.git", "../pure-js-tools") 50 | downloadGitTo("git@github.com:Atypicalim/c-pure-tools.git", "../c-pure-tools") 51 | downloadGitTo("git@github.com:Atypicalim/c-xtra-tools.git", "../c-xtra-tools") 52 | downloadGitTo("git@github.com:Atypicalim/replay.git", "../c-replay-library") 53 | downloadGitTo("git@github.com:Atypicalim/replot.git", "../c-replot-library") 54 | 55 | ################################################################ 56 | 57 | os.chdir(__workingDir) 58 | if Run.needUpdate: 59 | print("\nupdateing self:") 60 | subprocess.run(['git', 'pull'], check=True) 61 | print("updated!\n") 62 | sys.exit(0) 63 | 64 | ################################################################ 65 | 66 | from scripts.base import * 67 | import scripts.bind 68 | if Run.needGenerate: 69 | import scripts.converter 70 | import scripts.converting 71 | import scripts.extension 72 | import scripts.readme 73 | import scripts.document 74 | else: 75 | import scripts.interpreter 76 | -------------------------------------------------------------------------------- /scripts/README.MD: -------------------------------------------------------------------------------- 1 | ## build scripts 2 | 3 | * base script for initialize 4 | * other scripts for building 5 | 6 | > please run `python run.py` on root directory. 7 | -------------------------------------------------------------------------------- /scripts/converter.py: -------------------------------------------------------------------------------- 1 | 2 | from scripts.base import * 3 | 4 | ############################################################################### translate 5 | 6 | letterArray = [] 7 | for name, infos in mapName2LangLetters.items(): 8 | lines = "" 9 | for lang, value in infos.items(): 10 | lines = lines + "{}:\"{}\",".format(lang, value) 11 | letterArray.append(name + ":{"+ lines + "},") 12 | letterText = "\n".join(letterArray) 13 | # 14 | langArray = [] 15 | for lang in langsArrConfigs: 16 | langArray.append("'" + lang + "'") 17 | langText = ", ".join(langArray) 18 | 19 | # translate 20 | def _onMacro(code, command, argument = None): 21 | if command == "PROJECT_REPO": 22 | return code.format(PROJECT_REPO) 23 | elif command == "LETTERS_MAP": 24 | return letterText 25 | elif command == "LANGS_ARR": 26 | return langText 27 | bldr = builder.code() 28 | bldr.setName("TRANSLATE") 29 | bldr.setInput("./others/translate.tpl.js") 30 | bldr.setComment("//") 31 | bldr.setOutput(DIR_BUILD + "translate.js") 32 | bldr.onMacro(_onMacro) 33 | bldr.onLine(lambda line: line) 34 | bldr.start() 35 | 36 | ############################################################################### colorize 37 | 38 | colorMap = grammars["GRAMMAR_COLORS"] 39 | 40 | def getColor(name): 41 | for typ in grammars: 42 | names = grammars[typ] 43 | if name in names: 44 | return colorMap[typ] 45 | return "black" 46 | # 47 | colorArray = [] 48 | for name, infos in mapName2LangLetters.items(): 49 | lines = "" 50 | for lang, value in infos.items(): 51 | color = getColor(name) 52 | line = "\"{}\":\"{}\",".format(value, color) 53 | colorArray.append(line) 54 | colorText = "\n".join(colorArray) 55 | # 56 | langArray = [] 57 | for lang in langsArrConfigs: 58 | langArray.append("'" + lang + "'") 59 | langText = ", ".join(langArray) 60 | 61 | # colorize 62 | def _onMacro(code, command, argument = None): 63 | if command == "PROJECT_REPO": 64 | return code.format(PROJECT_REPO) 65 | elif command == "COLORS_MAP": 66 | return colorText 67 | elif command == "LANGS_ARR": 68 | return langText 69 | bldr = builder.code() 70 | bldr.setName("COLORIZE") 71 | bldr.setInput("./others/colorize.tpl.js") 72 | bldr.setComment("//", False) 73 | bldr.setOutput(DIR_BUILD + "colorize.js") 74 | bldr.onMacro(_onMacro) 75 | bldr.onLine(lambda line: line) 76 | bldr.start() 77 | 78 | ############################################################################### converter 79 | 80 | bldr = builder.html() 81 | bldr.setName("CONVERTER") 82 | bldr.setInput("./others/converter.html") 83 | bldr.containScript() 84 | bldr.containStyle() 85 | bldr.containImage() 86 | bldr.setOutput(DIR_BUILD + "converter.html") 87 | bldr.start() 88 | -------------------------------------------------------------------------------- /scripts/converting.py: -------------------------------------------------------------------------------- 1 | 2 | from scripts.base import * 3 | 4 | ############################################################################### 5 | 6 | DIR_TEMPORARY = tools.tools.append_path(DIR_BUILD, "temporary") 7 | tools.files.delete(DIR_TEMPORARY) 8 | tools.files.mk_folder(DIR_TEMPORARY) 9 | 10 | ############################################################################### convert 11 | 12 | print("CONVERT_SNIPPETS:") 13 | for name in snippets: 14 | fromPath = tools.tools.append_path(DIR_SNIPPETS, name) + "." + EXAMPLE_LANG 15 | result = subprocess.run([ 16 | "node", "./others/convert.js", fromPath, DIR_SNIPPET_TRANS, DIR_SNIPPET_COLOR 17 | ], capture_output=True, text=True) 18 | print("translate:", name, "OK" if result.returncode == 0 else result.stderr) 19 | print("CONVERTED!\n") 20 | 21 | print("CONVERT_FEATURES:") 22 | for name in features: 23 | fromPath = tools.tools.append_path(DIR_FEATURES, name) + "." + EXAMPLE_LANG 24 | toPath = tools.tools.append_path(DIR_FEATURES, name) 25 | tools.files.delete(toPath) 26 | tools.files.mk_folder(toPath) 27 | result = subprocess.run([ 28 | "node", "./others/convert.js", fromPath, toPath, DIR_TEMPORARY 29 | ], capture_output=True, text=True) 30 | print("translate:", name, "OK" if result.returncode == 0 else result.stderr) 31 | # 32 | for lang in langsArrConfigs: 33 | fPath = tools.tools.append_path(toPath, name) + "." + lang 34 | tPath = tools.tools.append_path(DIR_LANGUAGE, lang) 35 | tools.files.mk_folder(tPath) 36 | shutil.copy(fPath, tPath) 37 | print("movement:", name) 38 | 39 | print("CONVERTED!\n") 40 | -------------------------------------------------------------------------------- /scripts/readme.py: -------------------------------------------------------------------------------- 1 | 2 | from scripts.base import * 3 | 4 | ############################################################################### readme 5 | 6 | tplMdLangauge = ''' 7 | * {alpha}. [{tran}]({path}) 8 | 9 | ![](./resources/languages/hello.{lang}.png) 10 | ''' 11 | 12 | tplMdFeature = '''* [{name}]({path}) 13 | 14 | ```powershell 15 | {code} 16 | ``` 17 | ''' 18 | 19 | print("README:") 20 | 21 | mdLangaugesArray = [] 22 | i = 0 23 | for lang in langTrans: 24 | tran = langTrans[lang] 25 | i = i + 1 26 | alpha = chr(ord('a') + i - 1) 27 | path = tools.tools.append_path(DIR_LANGUAGE, lang).replace("\\", "/") 28 | text = tplMdLangauge.format(alpha=alpha, lang=lang, tran=tran, path=path) 29 | mdLangaugesArray.append(text) 30 | mdLanguagesText = "\n".join(mdLangaugesArray) 31 | 32 | mdfeaturesArray = [] 33 | for name in features: 34 | if name == "hello": 35 | continue 36 | path = tools.tools.append_path("./examples/features/", name) + ".en" 37 | code = tools.files.read(path, 'utf-8').strip() 38 | path = tools.tools.append_path(DIR_FEATURES, name).replace("\\", "/") 39 | text = tplMdFeature.format(name=name, code=code, path=path) 40 | mdfeaturesArray.append(text) 41 | mdFeaturesText = "\n".join(mdfeaturesArray) 42 | 43 | def _onMacro(code, command, argument = None): 44 | if command == "MD_LANGUAGES": 45 | return mdLanguagesText 46 | elif command == "MD_REATURES": 47 | return mdFeaturesText 48 | bldr = builder.code() 49 | bldr.setName("README") 50 | bldr.setInput("./others/readme.tpl.md") 51 | bldr.setComment("//", False) 52 | bldr.setOutput("./README.md") 53 | bldr.onMacro(_onMacro) 54 | bldr.onLine(lambda line: line) 55 | bldr.start() 56 | -------------------------------------------------------------------------------- /uyghur/debug.c: -------------------------------------------------------------------------------- 1 | // debug 2 | 3 | #include "others/header.h" 4 | 5 | void Debug_reset(Debug *this) 6 | { 7 | Object_release(this->trace); 8 | } 9 | 10 | Debug *Debug_new(Uyghur *uyghur) 11 | { 12 | Debug *debug = malloc(sizeof(Debug)); 13 | debug->uyghur = uyghur; 14 | debug->trace = Array_new(false); 15 | return debug; 16 | } 17 | 18 | void Debug_pushTrace(Debug *this, Token *element) 19 | { 20 | Token *last = Array_getLast(this->trace); 21 | if (last != NULL && last == element) { 22 | return; 23 | } 24 | Array_push(this->trace, element); 25 | if (this->trace->length > MAX_TRACE_SIZE) { 26 | Array_delFirst(this->trace); 27 | } 28 | } 29 | 30 | void Debug_popTrace(Debug *this, Token *element) 31 | { 32 | Array_pop(this->trace); 33 | } 34 | 35 | void Debug_writeTrace(Debug *this) 36 | { 37 | for (int i = this->trace->length - 1; i >= 0; i--) { 38 | Token *t = Array_get(this->trace, i); 39 | char *s = format_some_place(t); 40 | printf("[%s] %s %s\n", UG_TAG_TRACE, s, t->value); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /uyghur/delegates/delegates.h: -------------------------------------------------------------------------------- 1 | 2 | #include "../include.h" 3 | #include "../externals/externals.h" 4 | 5 | void stage_on_show(); 6 | 7 | void stage_on_hide(); 8 | 9 | void stage_on_focus(); 10 | 11 | void stage_on_resize(); 12 | 13 | void stage_on_drop(); 14 | -------------------------------------------------------------------------------- /uyghur/delegates/header.h: -------------------------------------------------------------------------------- 1 | // callbacks 2 | 3 | #ifndef UG_DELEGATE_HEADER 4 | #define UG_DELEGATE_HEADER 5 | 6 | #ifdef USTAGE_USE_RAYSAN 7 | #include "../delegates/raysan_lib.h" 8 | #endif 9 | 10 | #ifdef USTAGE_USE_RILEY 11 | #include "../delegates/riley_lib.h" 12 | #endif 13 | 14 | #ifdef USTAGE_USE_TIGR 15 | #include "../delegates/tigr_lib.h" 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /uyghur/externals/board.c: -------------------------------------------------------------------------------- 1 | // mouse 2 | 3 | #include "./externals.h" 4 | #include "../delegates/header.h" 5 | 6 | int __board_get_code_from_number(double num) { 7 | if (num <= 0) return 0; 8 | return num; 9 | } 10 | 11 | int __board_get_code_from_string(CString str) { 12 | if (strlen(str) < 1) return 0; 13 | char first = str[0]; 14 | if (isdigit(first)) return (int)first; 15 | if (isalpha(first)) return (~0x20) & first; 16 | return 0; 17 | } 18 | 19 | int __board_get_code_from_value(Value *value) { 20 | if (Value_isNumber(value)) { 21 | return __board_get_code_from_number(value->number); 22 | } else if (Value_isString(value)) { 23 | return __board_get_code_from_string(value->string); 24 | } else { 25 | return 0; 26 | } 27 | } 28 | 29 | int __board_get_delegate_button(int keyCode) { 30 | int _keyCode = delegate_board_code_swap(keyCode, true); 31 | int keyState = delegate_get_board_state(_keyCode); 32 | return keyState; 33 | } 34 | 35 | int __board_get_key_state(Value *keyCodeOrName) { 36 | int keyCode = __board_get_code_from_value(keyCodeOrName); 37 | int currState = __board_get_delegate_button(keyCode); 38 | return currState; 39 | } 40 | 41 | int __board_get_key_action(Value *keyCodeOrName) { 42 | int keyCode = __board_get_code_from_value(keyCodeOrName); 43 | int currState = __board_get_delegate_button(keyCode); 44 | return externals_get_button_action(false, keyCode, currState); 45 | } 46 | 47 | void native_board_get_key_action(Bridge *bridge) 48 | { 49 | Value *keyCodeOrName = Bridge_receiveValue(bridge, UG_TYPE_NON); 50 | int action = __board_get_key_action(keyCodeOrName); 51 | Bridge_returnNumber(bridge, action); 52 | } 53 | 54 | void native_board_get_key_state(Bridge *bridge) 55 | { 56 | Value *keyCodeOrName = Bridge_receiveValue(bridge, UG_TYPE_NON); 57 | int state = __board_get_key_state(keyCodeOrName); 58 | Bridge_returnNumber(bridge, state); 59 | } 60 | 61 | void native_board_is_pressed(Bridge *bridge) 62 | { 63 | Value *keyCodeOrName = Bridge_receiveValue(bridge, UG_TYPE_NON); 64 | int action = __board_get_key_action(keyCodeOrName); 65 | bool pressed = action == UG_BUTTON_ACTION_PRESS; 66 | Bridge_returnBoolean(bridge, pressed); 67 | } 68 | 69 | void native_board_is_pressing(Bridge *bridge) 70 | { 71 | Value *keyCodeOrName = Bridge_receiveValue(bridge, UG_TYPE_NON); 72 | int state = __board_get_key_state(keyCodeOrName); 73 | bool down = state == UG_BUTTON_STATE_DOWN; 74 | Bridge_returnBoolean(bridge, down); 75 | } 76 | 77 | void native_board_is_released(Bridge *bridge) 78 | { 79 | Value *keyCodeOrName = Bridge_receiveValue(bridge, UG_TYPE_NON); 80 | int action = __board_get_key_action(keyCodeOrName); 81 | bool released = action == UG_BUTTON_ACTION_RELEASE; 82 | Bridge_returnBoolean(bridge, released); 83 | } 84 | -------------------------------------------------------------------------------- /uyghur/externals/control.c: -------------------------------------------------------------------------------- 1 | // control 2 | 3 | #include "raylib.h" 4 | #include "../uyghur.c" 5 | 6 | void native_control_show_button(Bridge *bridge) 7 | { 8 | Rectangle rectangle = rect_from_bridge(bridge); 9 | CString text = Bridge_receiveString(bridge); 10 | bool r = GuiButton(rectangle, text); 11 | Bridge_returnBoolean(bridge, r); 12 | } 13 | 14 | void native_control_show_label(Bridge *bridge) 15 | { 16 | Rectangle rectangle = rect_from_bridge(bridge); 17 | CString text = Bridge_receiveString(bridge); 18 | GuiLabel(rectangle, text); 19 | Bridge_returnEmpty(bridge); 20 | } 21 | -------------------------------------------------------------------------------- /uyghur/externals/dialog.c: -------------------------------------------------------------------------------- 1 | // dialog 2 | 3 | #include "../uyghur.c" 4 | 5 | void native_dialog_inform(Bridge *bridge) { 6 | CString dialogTitle = Bridge_receiveString(bridge); 7 | CString messageContent = Bridge_receiveStringWithDefault(bridge, ""); 8 | tinyfd_messageBox(dialogTitle, messageContent, "yes", "info", 0); 9 | Bridge_returnEmpty(bridge); 10 | } 11 | 12 | bool native_dialog_confirm(Bridge *bridge) { 13 | CString dialogTitle = Bridge_receiveString(bridge); 14 | CString messageContent = Bridge_receiveStringWithDefault(bridge, ""); 15 | bool isYes = tinyfd_messageBox(dialogTitle, messageContent, "yesno", "question", 0) == 1; 16 | Bridge_returnBoolean(bridge, isYes); 17 | } 18 | 19 | void native_dialog_input(Bridge *bridge) { 20 | CString dialogTitle = Bridge_receiveString(bridge); 21 | CString defaultText = Bridge_receiveStringWithDefault(bridge, NULL); 22 | CString resultText = tinyfd_inputBox(dialogTitle, "", defaultText); 23 | Bridge_returnString(bridge, resultText); 24 | } 25 | 26 | CString native_dialog_select_save(Bridge *bridge) { 27 | CString dialogTitle = Bridge_receiveString(bridge); 28 | CString defaultPath = Bridge_receiveStringWithDefault(bridge, "./"); 29 | CString filterRule = Bridge_receiveStringWithDefault(bridge, "*.*"); 30 | char const * filterArray[1] = {filterRule}; 31 | CString resultPath = tinyfd_saveFileDialog(dialogTitle, defaultPath, 1, filterArray, NULL); 32 | Bridge_returnString(bridge, resultPath); 33 | } 34 | 35 | CString native_dialog_select_open(Bridge *bridge) { 36 | CString dialogTitle = Bridge_receiveString(bridge); 37 | CString defaultPath = Bridge_receiveStringWithDefault(bridge, "./"); 38 | CString filterRule = Bridge_receiveStringWithDefault(bridge, "*.*"); 39 | char const * filterArray[1] = {filterRule}; 40 | CString resultPath = tinyfd_openFileDialog(dialogTitle, defaultPath, 1, filterArray, NULL, false); 41 | Bridge_returnString(bridge, resultPath); 42 | } 43 | 44 | CString native_dialog_select_folder(Bridge *bridge) { 45 | CString dialogTitle = Bridge_receiveString(bridge); 46 | CString defaultPath = Bridge_receiveStringWithDefault(bridge, "./"); 47 | CString resultPath = tinyfd_selectFolderDialog(dialogTitle, defaultPath); 48 | Bridge_returnString(bridge, resultPath); 49 | } 50 | 51 | CString native_dialog_select_color(Bridge *bridge) { 52 | CString dialogTitle = Bridge_receiveString(bridge); 53 | CString defaultColor = Bridge_receiveStringWithDefault(bridge, NULL); 54 | unsigned char const _chars[3] = ""; 55 | CString resultColor = tinyfd_colorChooser(dialogTitle, defaultColor, _chars, _chars); 56 | Bridge_returnString(bridge, resultColor); 57 | } 58 | -------------------------------------------------------------------------------- /uyghur/externals/header.h: -------------------------------------------------------------------------------- 1 | // header 2 | 3 | #ifndef H_LIB_EXTERNAL_HEADER 4 | #define H_LIB_EXTERNAL_HEADER 5 | 6 | #ifndef BUILDER_NO_BACKEND 7 | #include "../../build/bind/externals/stage.c" 8 | #include "../../build/bind/externals/mouse.c" 9 | #include "../../build/bind/externals/board.c" 10 | #endif 11 | #include "../../build/bind/externals/paper.c" 12 | #include "../../build/bind/externals/pencil.c" 13 | #include "../../build/bind/externals/music.c" 14 | #include "../../build/bind/externals/sound.c" 15 | #include "../../build/bind/externals/dialog.c" 16 | // #include "../../build/bind/externals/control.c" 17 | // #include "../../build/bind/externals/voyager.c" 18 | 19 | 20 | void cFuncTest(Bridge *bridge) 21 | { 22 | // // get arguments 23 | // printf("\n\n--c func arguments--\n"); 24 | // printf("%s\n", Bridge_topType(bridge)); 25 | // printf("%s\n", Bridge_receiveBoolean(bridge) ? "yes" : "no"); 26 | // printf("%f\n", Bridge_receiveNumber(bridge)); 27 | // printf("%s\n", Bridge_receiveString(bridge)); 28 | // printf("%s\n", Bridge_topType(bridge)); 29 | // // do something 30 | // printf("\nc function body from bridge\n"); 31 | // Bridge_returnNumbers(bridge, 2, 111, 222); 32 | Bridge_returnString(bridge, "abc..."); 33 | } 34 | 35 | void lib_test_func(Bridge *bridge) 36 | { 37 | // // register variables from c (NUll to register globals, name to register a box) 38 | Bridge_startBox(bridge); 39 | // Bridge_bindString(bridge, "cString", "c value from bridge!"); 40 | // Bridge_bindBoolean(bridge, "cBoolean", true); 41 | // Bridge_bindNumber(bridge, "cNumber", 123); 42 | Bridge_bindNative(bridge, "cFuncTest", cFuncTest); 43 | Bridge_register(bridge, NULL); 44 | } 45 | 46 | void lib_test_call(Bridge *bridge) 47 | { 48 | // // use values from c 49 | // Bridge_startFunc(bridge); 50 | // Bridge_pushNumber(bridge, 333); 51 | // Bridge_pushNumber(bridge, 222); 52 | // Bridge_pushBoolean(bridge, true); 53 | // Bridge_pushString(bridge, "c value from bridge!"); 54 | // Bridge_call(bridge, "uyghurFuncTest"); 55 | // // get result 56 | // printf("\n\n--uyghur func result--\n"); 57 | // printf("%s\n", Bridge_topType(bridge)); 58 | // printf("%f\n", Bridge_receiveNumber(bridge)); 59 | } 60 | 61 | void register_external_libraries(Bridge *bridge) 62 | { 63 | // 64 | #ifndef BUILDER_NO_BACKEND 65 | lib_stage_register(bridge); 66 | lib_mouse_register(bridge); 67 | lib_board_register(bridge); 68 | #endif 69 | lib_paper_register(bridge); 70 | lib_pencil_register(bridge); 71 | lib_music_register(bridge); 72 | lib_sound_register(bridge); 73 | lib_dialog_register(bridge); 74 | // lib_control_register(bridge); 75 | // lib_voyager_register(bridge); 76 | } 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /uyghur/externals/paper.c: -------------------------------------------------------------------------------- 1 | // paper 2 | 3 | #include "./externals.h" 4 | #include "../delegates/header.h" 5 | 6 | ///////////////////////////////////////////////// 7 | 8 | void native_paper_create(Bridge *bridge) 9 | { 10 | int w = Bridge_receiveNumber(bridge); 11 | int h = Bridge_receiveNumber(bridge); 12 | ECanvas canvas = Replot_new(w, h); 13 | Loadable *loadable = Loadable_newStuf(canvas, ALIAS_paper, "~", __release_paper); 14 | pencil_focus_to(UG_PENCIL_FOCUS_PAPER, canvas); 15 | Bridge_returnValue(bridge, loadable); 16 | } 17 | 18 | void native_paper_copy(Bridge *bridge) 19 | { 20 | ECanvas canvas = paper_from_bridge(bridge); 21 | UGPoint point = point_from_bridge(bridge); 22 | UGSize size = size_from_bridge(bridge); 23 | UGRect _rect = UG_RECT_GENERATE(&point, &size); 24 | ECanvas _canvas = Replot_copy(canvas, RPOINT(_rect.x, _rect.y), RSIZE(_rect.w, _rect.h)); 25 | Loadable *loadable = Loadable_newStuf(_canvas, ALIAS_paper, "~", __release_paper); 26 | Bridge_returnValue(bridge, loadable); 27 | } 28 | 29 | void native_paper_crop(Bridge *bridge) 30 | { 31 | ECanvas canvas = paper_from_bridge(bridge); 32 | UGPoint point = point_from_bridge(bridge); 33 | UGSize size = size_from_bridge(bridge); 34 | UGRect _rect = UG_RECT_GENERATE(&point, &size); 35 | Replot_crop(canvas, RPOINT(_rect.x, _rect.y), RSIZE(_rect.w, _rect.h)); 36 | Bridge_returnEmpty(bridge); 37 | } 38 | 39 | void native_paper_flip(Bridge *bridge) 40 | { 41 | ECanvas canvas = paper_from_bridge(bridge); 42 | bool xFlip = Bridge_receiveBoolean(bridge); 43 | bool yFlip = Bridge_receiveBoolean(bridge); 44 | Replot_flip(canvas, xFlip, yFlip); 45 | Bridge_returnEmpty(bridge); 46 | } 47 | 48 | void native_paper_invert(Bridge *bridge) 49 | { 50 | ECanvas canvas = paper_from_bridge(bridge); 51 | Replot_invert(canvas); 52 | Bridge_returnEmpty(bridge); 53 | } 54 | 55 | void native_paper_tint(Bridge *bridge) 56 | { 57 | ECanvas canvas = paper_from_bridge(bridge); 58 | UGColor color = color_from_bridge(bridge); 59 | float intensity = Bridge_receiveNumber(bridge); 60 | Replot_tint(canvas, RCOLOR(color.r, color.g, color.b, color.a), intensity); 61 | Bridge_returnEmpty(bridge); 62 | } 63 | 64 | void native_paper_fade(Bridge *bridge) 65 | { 66 | ECanvas canvas = paper_from_bridge(bridge); 67 | float intensity = Bridge_receiveNumber(bridge); 68 | Replot_fade(canvas, intensity); 69 | Bridge_returnEmpty(bridge); 70 | } 71 | 72 | void native_paper_blur(Bridge *bridge) 73 | { 74 | ECanvas canvas = paper_from_bridge(bridge); 75 | int radius = Bridge_receiveNumber(bridge); 76 | Replot_blur(canvas, radius); 77 | Bridge_returnEmpty(bridge); 78 | } 79 | 80 | void native_paper_read(Bridge *bridge) 81 | { 82 | CString path = Bridge_receiveString(bridge); 83 | ECanvas canvas = Replot_read(path); 84 | Loadable *loadable = Loadable_newStuf(canvas, ALIAS_paper, path, __release_paper); 85 | pencil_focus_to(UG_PENCIL_FOCUS_PAPER, canvas); 86 | Bridge_returnValue(bridge, loadable); 87 | } 88 | 89 | void native_paper_write(Bridge *bridge) 90 | { 91 | ECanvas canvas = paper_from_bridge(bridge); 92 | CString path = Bridge_receiveString(bridge); 93 | Replot_write(canvas, path); 94 | Bridge_returnEmpty(bridge); 95 | } 96 | -------------------------------------------------------------------------------- /uyghur/externals/sound.c: -------------------------------------------------------------------------------- 1 | // sound 2 | 3 | #include "./externals.h" 4 | #include "../delegates/header.h" 5 | RSound __defaulRSound; 6 | 7 | // tool 8 | 9 | RSound *_load_rsound_by_path(CString path) 10 | { 11 | RSound s = replay_LoadSound(path); 12 | RSound *sound = (RSound *)malloc(sizeof(s)); 13 | sound[0] = s; 14 | return sound; 15 | } 16 | 17 | void __release_rsound(Loadable *loadable) { 18 | if (loadable->obj) { 19 | RSound *sound = loadable->obj; 20 | RSound s = sound[0]; 21 | replay_UnloadSound(s); 22 | pct_free(sound); 23 | loadable->obj = NULL; 24 | } 25 | } 26 | 27 | RSound sound_from_bridge(Bridge *bridge) 28 | { 29 | Loadable *loadable = Bridge_receiveValue(bridge, UG_TYPE_STF); 30 | RSound *sound = loadable->obj; 31 | RSound s = sound != NULL ? sound[0] : __defaulRSound; 32 | return s; 33 | } 34 | 35 | // api 36 | 37 | void native_sound_load(Bridge *bridge) 38 | { 39 | CString path = Bridge_receiveString(bridge); 40 | RSound *sound = _load_rsound_by_path(path); 41 | Loadable *loadable = Loadable_newStuf(sound, ALIAS_sound, path, __release_rsound); 42 | Bridge_returnValue(bridge, loadable); 43 | } 44 | 45 | void native_sound_play(Bridge *bridge) 46 | { 47 | RSound sound = sound_from_bridge(bridge); 48 | replay_PlaySound(sound); 49 | Bridge_returnEmpty(bridge); 50 | } 51 | 52 | void native_sound_stop(Bridge *bridge) 53 | { 54 | RSound sound = sound_from_bridge(bridge); 55 | replay_StopSound(sound); 56 | Bridge_returnEmpty(bridge); 57 | } 58 | 59 | void native_sound_resume(Bridge *bridge) 60 | { 61 | RSound sound = sound_from_bridge(bridge); 62 | replay_ResumeSound(sound); 63 | Bridge_returnEmpty(bridge); 64 | } 65 | 66 | void native_sound_pause(Bridge *bridge) 67 | { 68 | RSound sound = sound_from_bridge(bridge); 69 | replay_PauseSound(sound); 70 | Bridge_returnEmpty(bridge); 71 | } 72 | 73 | void native_sound_is_playing(Bridge *bridge) 74 | { 75 | RSound sound = sound_from_bridge(bridge); 76 | bool r = replay_IsSoundPlaying(sound); 77 | Bridge_returnBoolean(bridge, r); 78 | } 79 | 80 | void native_sound_set_volume(Bridge *bridge) 81 | { 82 | RSound sound = sound_from_bridge(bridge); 83 | float volume = Bridge_receiveNumber(bridge); 84 | replay_SetSoundVolume(sound, volume); 85 | Bridge_returnEmpty(bridge); 86 | } 87 | -------------------------------------------------------------------------------- /uyghur/externals/voyager.c: -------------------------------------------------------------------------------- 1 | // voyager 2 | 3 | #include "../uyghur.c" 4 | 5 | // do http request 6 | void native_voyager_request(Bridge *bridge) 7 | { 8 | CString toUrl = Bridge_receiveString(bridge); 9 | CString method = Bridge_receiveString(bridge); 10 | 11 | Waitable *task = Waitable_newTask(NULL, "http.get", toUrl, NULL); 12 | 13 | Bridge_returnValue(bridge, task); 14 | } 15 | -------------------------------------------------------------------------------- /uyghur/include.h: -------------------------------------------------------------------------------- 1 | // uyghur 2 | 3 | #ifndef H_UG_INCLUDE 4 | #define H_UG_INCLUDE 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include "utf8.h" 21 | #include "tinyfiledialogs.h" 22 | 23 | #define MD5_IMPLEMENTATION 24 | #include "../../c-pure-tools/test.h" 25 | 26 | #define CARGS_IMPLEMENTATION 27 | #include "../../c-xtra-tools/cargs/cargs.h" 28 | 29 | #include "../../c-xtra-tools/utf8iter/utf8iter.h" 30 | #include "../../c-xtra-tools/utf8iter/utf8iter.c" 31 | #include "../../c-xtra-tools/utf8string/utf8string.h" 32 | #include "../../c-xtra-tools/utf8string/utf8string.c" 33 | 34 | #ifndef USTAGE_NONE_RAYSAN 35 | #define REPLAY_NO_IMLEMENT 36 | #define RAYGUI_IMPLEMENTATION 37 | #include "../../my-build-tools/build/c_libs/raylib/raylib-4.0.0_win64_mingw-w64/include/raylib.h" 38 | #include "../../my-build-tools/build/c_libs/raylib/raylib-4.0.0_win64_mingw-w64/include/raygui.h" 39 | #endif 40 | 41 | #ifndef USTAGE_NONE_RILEY 42 | #define RILEY_EXT_NO_WIDGETS 43 | #include "../../c-xtra-tools/riley4ext/riley4ext.h" 44 | #endif 45 | 46 | #ifdef USTAGE_USE_TIGR 47 | #define USTAGE_USE_SOFT true 48 | #else 49 | #define USTAGE_USE_SOFT false 50 | #define TIGR_EXT_NO_DESKTOP 51 | #endif 52 | 53 | #undef __IOS__ 54 | #undef __ANDROID__ 55 | #define TIGR_EXT_NO_MOBILE 56 | #include "../../c-xtra-tools/tigr4ext/tigr4ext.h" 57 | 58 | #define REPLAY_WIN_NO_EXTRA 59 | #include "../../c-replay-library/replay.h" 60 | 61 | #define REPLOT_WIN_NO_EXTRA 62 | #include "../../c-replot-library/replot.h" 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /uyghur/internals/dict.c: -------------------------------------------------------------------------------- 1 | // dict 2 | 3 | #include "../uyghur.c" 4 | 5 | // count given dict size 6 | void native_dict_count(Bridge *bridge) 7 | { 8 | Dictable *dct = Bridge_receiveValue(bridge, UG_TYPE_DCT); 9 | int count = Dictable_getCount(dct); 10 | Bridge_returnNumber(bridge, count); 11 | } 12 | -------------------------------------------------------------------------------- /uyghur/internals/file.c: -------------------------------------------------------------------------------- 1 | // file 2 | 3 | #include "../uyghur.c" 4 | 5 | void native_file_write(Bridge *bridge) 6 | { 7 | CString path = Bridge_receiveString(bridge); 8 | CString content = Bridge_receiveString(bridge); 9 | bool r = file_write(path, content); 10 | Bridge_returnBoolean(bridge, r); 11 | } 12 | 13 | void native_file_read(Bridge *bridge) 14 | { 15 | CString path = Bridge_receiveString(bridge); 16 | CString r = file_read(path); 17 | if (r != NULL) { 18 | Bridge_returnString(bridge, r); 19 | pct_free(r); 20 | } else { 21 | Bridge_returnEmpty(bridge); 22 | } 23 | } 24 | 25 | void native_file_copy(Bridge *bridge) 26 | { 27 | CString from = Bridge_receiveString(bridge); 28 | CString to = Bridge_receiveString(bridge); 29 | bool r = file_copy(from, to); 30 | Bridge_returnBoolean(bridge, r); 31 | } 32 | 33 | void native_file_rename(Bridge *bridge) 34 | { 35 | CString from = Bridge_receiveString(bridge); 36 | CString to = Bridge_receiveString(bridge); 37 | double r = file_rename(from, to); 38 | Bridge_returnNumber(bridge, r); 39 | } 40 | 41 | void native_file_remove(Bridge *bridge) 42 | { 43 | CString path = Bridge_receiveString(bridge); 44 | double r = file_remove(path); 45 | Bridge_returnNumber(bridge, r); 46 | } 47 | 48 | void native_file_is_exist(Bridge *bridge) 49 | { 50 | CString path = Bridge_receiveString(bridge); 51 | bool r = file_exist(path); 52 | Bridge_returnBoolean(bridge, r); 53 | } 54 | 55 | void native_file_is_file(Bridge *bridge) 56 | { 57 | CString path = Bridge_receiveString(bridge); 58 | bool r = file_is_file(path); 59 | Bridge_returnBoolean(bridge, r); 60 | } 61 | 62 | void native_file_is_directory(Bridge *bridge) 63 | { 64 | CString path = Bridge_receiveString(bridge); 65 | bool r = file_is_directory(path); 66 | Bridge_returnBoolean(bridge, r); 67 | } 68 | 69 | void native_file_create_directory(Bridge *bridge) 70 | { 71 | CString path = Bridge_receiveString(bridge); 72 | int r = file_create_directory(path); 73 | Bridge_returnNumber(bridge, r); 74 | } 75 | -------------------------------------------------------------------------------- /uyghur/internals/global.c: -------------------------------------------------------------------------------- 1 | // global 2 | 3 | #include "../uyghur.c" 4 | 5 | // get the value of current language 6 | void native_get_language(Bridge *bridge) 7 | { 8 | CString r = bridge->uyghur->language; 9 | Bridge_returnString(bridge, r); 10 | } 11 | 12 | // get the name of current language 13 | void native_get_name(Bridge *bridge) 14 | { 15 | CString lang = bridge->uyghur->language; 16 | int size = configs_get_size_by_name(LANG_LANGUAGE_TRANSLATION); 17 | PAIR_CONFIGS *conf = configs_get_conf_by_name(LANG_LANGUAGE_TRANSLATION); 18 | CString trans = helper_filter_multilang_by_key(lang, size, conf); 19 | Bridge_returnString(bridge, trans); 20 | } 21 | 22 | // input a value from termial 23 | void native_read(Bridge *bridge) 24 | { 25 | CString r = system_scanf(); 26 | Bridge_returnString(bridge, r); 27 | pct_free(r); 28 | } 29 | 30 | // output a value to terminal 31 | void native_write(Bridge *bridge) 32 | { 33 | Value *v = Bridge_nextValue(bridge); 34 | while (v != NULL) 35 | { 36 | printf("%s ", Value_toString(v)); 37 | v = Bridge_nextValue(bridge); 38 | } 39 | Bridge_returnEmpty(bridge); 40 | } 41 | 42 | // print trace of the func call 43 | void native_trace(Bridge *bridge) 44 | { 45 | CString _msg = "TRACE"; 46 | if (Bridge_topType(bridge) == UG_TYPE_STR) { 47 | CString msg = Bridge_receiveString(bridge); 48 | _msg = msg; 49 | } 50 | printf("\n[%s] %s\n", UG_TAG_LOG, _msg); 51 | Debug_writeTrace(bridge->uyghur->debug); 52 | Bridge_returnEmpty(bridge); 53 | } 54 | 55 | // inport a module and return a box 56 | void native_import(Bridge *bridge) 57 | { 58 | CString path = Bridge_receiveString(bridge); 59 | Uyghur *uyghur = bridge->uyghur; 60 | Holdable *global = uyghur->executer->globalScope; 61 | Value *box = Dictable_getLocation(global, path); 62 | if (box == NULL) box = Uyghur_runModule(uyghur, path); 63 | if (box == NULL) box = Value_newEmpty(NULL); 64 | Bridge_returnValue(bridge, box); 65 | } 66 | 67 | // clean a module from module cache 68 | void native_clean(Bridge *bridge) 69 | { 70 | CString path = Bridge_receiveString(bridge); 71 | Dictable_delLocation(bridge->uyghur->executer->globalScope, path); 72 | Bridge_returnEmpty(bridge); 73 | } 74 | 75 | void native_sweep(Bridge *bridge) 76 | { 77 | Machine_runGC(__uyghur->machine); 78 | Bridge_returnEmpty(bridge); 79 | } 80 | -------------------------------------------------------------------------------- /uyghur/internals/header.h: -------------------------------------------------------------------------------- 1 | // header 2 | 3 | #ifndef H_LIB_INNERNAL_HEADER 4 | #define H_LIB_INNERNAL_HEADER 5 | 6 | #include "../../build/bind/internals/global.c" 7 | #include "../../build/bind/internals/number.c" 8 | #include "../../build/bind/internals/string.c" 9 | #include "../../build/bind/internals/list.c" 10 | #include "../../build/bind/internals/dict.c" 11 | #include "../../build/bind/internals/time.c" 12 | #include "../../build/bind/internals/system.c" 13 | #include "../../build/bind/internals/file.c" 14 | #include "../../build/bind/internals/cipher.c" 15 | // #include "../../build/bind/internals/stuf.c" 16 | // #include "../../build/bind/internals/task.c" 17 | 18 | void register_internal_libraries(Bridge *bridge) 19 | { 20 | 21 | // 22 | // Bridge_bindString(bridge, "NESHIR_ISMI", UG_VERSION_NAME); 23 | // Bridge_bindNumber(bridge, "NESHIR_NUMIRI", UG_VERSION_CODE); 24 | // 25 | // Bridge_bindNumber(bridge, "pi", acos(-1)); 26 | // Bridge_bindNumber(bridge, "e", exp(1)); 27 | // 28 | lib_global_register(bridge); 29 | // 30 | // TODO:set proxies as fixed features 31 | Bridge_startBox(bridge); 32 | Bridge_bindString(bridge, "NESHIR_ISMI", UG_VERSION_NAME); 33 | Bridge_register(bridge, NULL); 34 | Bridge_startBox(bridge); 35 | Bridge_bindString(bridge, "NESHIR_ISMI", UG_VERSION_NAME); 36 | Bridge_register(bridge, NULL); 37 | // 38 | lib_number_register(bridge); 39 | lib_string_register(bridge); 40 | lib_list_register(bridge); 41 | lib_dict_register(bridge); 42 | lib_time_register(bridge); 43 | lib_system_register(bridge); 44 | lib_file_register(bridge); 45 | lib_cipher_register(bridge); 46 | // lib_stuf_register(bridge); 47 | // lib_task_register(bridge); 48 | 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /uyghur/internals/list.c: -------------------------------------------------------------------------------- 1 | // list 2 | 3 | #include "../uyghur.c" 4 | 5 | void native_list_count(Bridge *bridge) 6 | { 7 | Listable *lst = Bridge_receiveValue(bridge, UG_TYPE_LST); 8 | int count = Listable_getCount(lst); 9 | Bridge_returnNumber(bridge, count); 10 | } 11 | -------------------------------------------------------------------------------- /uyghur/internals/number.c: -------------------------------------------------------------------------------- 1 | // number 2 | 3 | #include "../uyghur.c" 4 | 5 | double bind_number_ceil(double num) 6 | { 7 | return ceil(num); 8 | } 9 | 10 | double bind_number_floor(double num) 11 | { 12 | return floor(num); 13 | } 14 | 15 | double bind_number_round(double num) 16 | { 17 | return round(num); 18 | } 19 | 20 | void bind_number_seed(double num) { 21 | srand(num >= 0 ? num : time(NULL)); 22 | } 23 | 24 | double bind_number_random(double from, double to) 25 | { 26 | return num_random(from, to); 27 | } 28 | 29 | double bind_number_radian(double num) { 30 | return num * M_PI / 180.0; 31 | } 32 | 33 | double bind_number_degree(double num) { 34 | return num * 180.0 / M_PI; 35 | } 36 | 37 | double bind_number_sin(double num) { 38 | return sin(num); 39 | } 40 | 41 | double bind_number_cos(double num) { 42 | return cos(num); 43 | } 44 | 45 | double bind_number_tan(double num) { 46 | return tan(num); 47 | } 48 | 49 | double bind_number_asin(double num) { 50 | return asin(num); 51 | } 52 | 53 | double bind_number_acos(double num) { 54 | return acos(num); 55 | } 56 | 57 | double bind_number_atan(double num) { 58 | return atan(num); 59 | } 60 | 61 | double bind_number_power(double x, double y) 62 | { 63 | return pow(x, y); 64 | } 65 | 66 | double bind_number_square(double x, double y) 67 | { 68 | return pow(x, 1 / y); 69 | } 70 | 71 | double bind_number_log_e(double num) { 72 | return log(num); 73 | } 74 | 75 | double bind_number_log_10(double num) { 76 | return log10(num); 77 | } 78 | 79 | double bind_number_quotient(double x, double y) 80 | { 81 | return (x - fmod(x, y)) / y; 82 | } 83 | 84 | double bind_number_reminder(double x, double y) 85 | { 86 | return fmod(x, y); 87 | } 88 | 89 | double bind_number_int_part(double num) { 90 | return num - modf(num, 0); 91 | } 92 | 93 | 94 | double bind_number_dec_part(double num) { 95 | return modf(num, 0); 96 | } 97 | -------------------------------------------------------------------------------- /uyghur/internals/stuf.c: -------------------------------------------------------------------------------- 1 | // stuf 2 | 3 | #include "../uyghur.c" 4 | 5 | void native_stuf_get_place(Bridge *bridge) 6 | { 7 | Value *value = Bridge_receiveValue(bridge, UG_TYPE_STF); 8 | char *path = value->extra; 9 | Bridge_returnString(bridge, path); 10 | } 11 | 12 | void native_stuf_get_type(Bridge *bridge) 13 | { 14 | Value *value = Bridge_receiveValue(bridge, UG_TYPE_STF); 15 | char *name = value->token->value; 16 | Bridge_returnString(bridge, name); 17 | } 18 | -------------------------------------------------------------------------------- /uyghur/internals/system.c: -------------------------------------------------------------------------------- 1 | // system 2 | 3 | #include "../uyghur.c" 4 | 5 | void native_system_get_name(Bridge *bridge) 6 | { 7 | CString value = tools_get_env(IS_WINDOWS ? "USERNAME" : "USER"); 8 | Bridge_returnString(bridge, value); 9 | } 10 | 11 | void native_system_get_type(Bridge *bridge) 12 | { 13 | CString value = PLATFORM_NAME; 14 | Bridge_returnString(bridge, value); 15 | } 16 | 17 | void native_system_exit_program(Bridge *bridge) 18 | { 19 | int _code = 0; 20 | if (Bridge_topType(bridge) != UG_TYPE_NON) { 21 | int code = Bridge_receiveNumber(bridge); 22 | _code = code; 23 | } 24 | exit(_code); 25 | Bridge_returnEmpty(bridge); 26 | } 27 | 28 | void native_system_execute_command(Bridge *bridge) 29 | { 30 | CString command = Bridge_receiveString(bridge); 31 | CString r = system_execute(command); 32 | Bridge_returnString(bridge, r); 33 | pct_free(r); 34 | } 35 | 36 | void native_system_set_env(Bridge *bridge) 37 | { 38 | CString name = Bridge_receiveString(bridge); 39 | CString value = Bridge_receiveString(bridge); 40 | tools_set_env(name, value); 41 | Bridge_returnEmpty(bridge); 42 | } 43 | 44 | void native_system_get_env(Bridge *bridge) 45 | { 46 | CString name = Bridge_receiveString(bridge); 47 | CString value = tools_get_env(name); 48 | Bridge_returnString(bridge, value); 49 | } 50 | -------------------------------------------------------------------------------- /uyghur/internals/task.c: -------------------------------------------------------------------------------- 1 | // task 2 | 3 | #include "../uyghur.c" 4 | 5 | void bind_task_start() 6 | { 7 | return; 8 | } 9 | 10 | void bind_task_stop() 11 | { 12 | return; 13 | } 14 | 15 | int bind_task_working() 16 | { 17 | return 123; 18 | } 19 | -------------------------------------------------------------------------------- /uyghur/internals/time.c: -------------------------------------------------------------------------------- 1 | // time 2 | 3 | #include "../uyghur.c" 4 | 5 | double bind_time_get_zone() 6 | { 7 | return time_zone(); 8 | } 9 | 10 | double bind_time_get_seconds() 11 | { 12 | return time_second(); 13 | } 14 | 15 | void native_time_convert_to_seconds(Bridge *bridge) 16 | { 17 | CString str = Bridge_receiveString(bridge); 18 | Bridge_returnNumber(bridge, time_convert_to_seconds(str)); 19 | } 20 | 21 | void native_time_convert_from_seconds(Bridge *bridge) 22 | { 23 | int seconds = Bridge_receiveNumber(bridge); 24 | CString str = Bridge_receiveString(bridge); 25 | CString time = time_convert_from_seconds(seconds, str); 26 | Bridge_returnString(bridge, time); 27 | pct_free(time); 28 | } 29 | 30 | CString bind_time_get_time() 31 | { 32 | return time_time(); 33 | } 34 | 35 | double bind_time_get_clock() 36 | { 37 | return time_clock(); 38 | } 39 | 40 | void native_time_sleep_seconds(Bridge *bridge) 41 | { 42 | sleep(Bridge_receiveNumber(bridge)); 43 | Bridge_returnEmpty(bridge); 44 | } 45 | 46 | double _time_delay_call_func(Value *function) { 47 | Executer *executer = __uyghur->executer; 48 | if (!Runnable_isWorker(function)) return -1; 49 | Value *result = Executer_applyWorker(executer, Token_empty(), function, NULL); 50 | if (!Value_isNumber(result)) return -1; 51 | double delay = result->number; 52 | return delay; 53 | } 54 | 55 | void native_time_delay_call(Bridge *bridge) 56 | { 57 | VNumber second = Bridge_receiveValue(bridge, UG_TYPE_NON); 58 | tools_assert(Value_isNumber(second), "timer time not valid"); 59 | VFunction function = Bridge_receiveValue(bridge, UG_TYPE_NON); 60 | tools_assert(Runnable_isWorker(function), "timer function not valid"); 61 | Timer *timer = timer_delay(second->number, function, &_time_delay_call_func); 62 | Bridge_returnEmpty(bridge); 63 | } 64 | -------------------------------------------------------------------------------- /uyghur/multilangs/configs.yml: -------------------------------------------------------------------------------- 1 | 2 | # language 3 | LANG_LANGUAGE_FULLNAME: 4 | en: english 5 | uy: uyghur_uay 6 | ug: uyghur_uly 7 | uz: uzbek 8 | tr: turkish 9 | kz: kazakh 10 | LANG_LANGUAGE_TRANSLATION: 11 | en: english 12 | uy: ئۇيغۇرچە 13 | ug: uyghurche 14 | uz: o'zbekcha 15 | tr: Türkçe 16 | kz: қазақша 17 | -------------------------------------------------------------------------------- /uyghur/objects/leaf.c: -------------------------------------------------------------------------------- 1 | // leaf 2 | 3 | #ifndef H_UG_HEADER 4 | #include "../others/header.h" 5 | #endif 6 | 7 | #ifndef H_UG_LEAF 8 | #define H_UG_LEAF 9 | 10 | #include "token.c" 11 | 12 | Leaf *Leaf_new(char type) 13 | { 14 | Leaf *leaf = malloc(sizeof(Leaf)); 15 | Object_init(leaf, PCT_OBJ_LEAF); 16 | leaf->type = type; 17 | leaf->parent = NULL; 18 | leaf->tokens = Stack_new(true); 19 | leaf->leafs = Queue_new(true); 20 | return leaf; 21 | } 22 | 23 | void Leaf_print(Leaf *this) 24 | { 25 | printf("[(LEAF_START) => address:%d type:%c]\n", this, this->type); 26 | Stack_print(this->tokens); 27 | Queue_print(this->leafs); 28 | printf("[(LEAF_END) => address:%d]\n", this); 29 | } 30 | 31 | void Leaf_pushToken(Leaf *this, Token *token) 32 | { 33 | Stack_push(this->tokens, token); 34 | } 35 | 36 | Token *Leaf_popToken(Leaf *this) 37 | { 38 | return Stack_pop(this->tokens); 39 | } 40 | 41 | void Leaf_pushLeaf(Leaf *this, Leaf *leaf) 42 | { 43 | leaf->parent = this; 44 | Queue_push(this->leafs,leaf); 45 | } 46 | 47 | Leaf *Leaf_popLeaf(Leaf *this) 48 | { 49 | return Queue_pop(this->leafs); 50 | } 51 | 52 | void Leaf_free(Leaf *this) 53 | { 54 | Stack_free(this->tokens); 55 | Queue_free(this->leafs); 56 | Object_free(this); 57 | } 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /uyghur/others/utils.c: -------------------------------------------------------------------------------- 1 | // utils 2 | 3 | #ifndef H_UTILS 4 | #define H_UTILS 5 | 6 | void test_func() 7 | { 8 | 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /uyghur/templates/aliases.tpl.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef YAML_ALIASES_FLAG 3 | #define YAML_ALIASES_FLAG 4 | // 5 | typedef struct { 6 | char* key; 7 | char* val; 8 | } PAIR_ALIASES; 9 | 10 | //////////////////////////////////////////////////////////////// 11 | 12 | // [M[ VARIABLES ]M] 13 | 14 | //////////////////////////////////////////////////////////////// 15 | 16 | // [M[ BODIES ]M] 17 | 18 | //////////////////////////////////////////////////////////////// 19 | 20 | // [M[ FOOTERS ]M] 21 | 22 | //////////////////////////////////////////////////////////////// 23 | 24 | int aliases_get_size_by_lang(char *tp) { 25 | if (!tp) tp = ""; 26 | // [M[ FILTER_SIZE_BY_LANG ]M] 27 | return 0; 28 | } 29 | const PAIR_ALIASES* aliases_get_conf_by_lang(char *tp) { 30 | if (!tp) tp = ""; 31 | // [M[ FILTER_CONF_BY_LANG ]M] 32 | return 0; 33 | } 34 | 35 | int aliases_get_size_by_name(char *tp) { 36 | if (!tp) tp = ""; 37 | // [M[ FILTER_SIZE_BY_NAME ]M] 38 | return 0; 39 | } 40 | const PAIR_ALIASES* aliases_get_conf_by_name(char *tp) { 41 | if (!tp) tp = ""; 42 | // [M[ FILTER_CONF_BY_NAME ]M] 43 | return 0; 44 | } 45 | // 46 | #endif // YAML_ALIASES_FLAG 47 | -------------------------------------------------------------------------------- /uyghur/templates/configs.tpl.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef YAML_CONFIGS_FLAG 3 | #define YAML_CONFIGS_FLAG 4 | 5 | #define UG_PROJECT_NAME "{}" // [M[ PROJECT_NAME ]M] 6 | #define UG_VERSION_CODE {} // [M[ VERSION_CODE ]M] 7 | #define UG_VERSION_NAME "{}" // [M[ VERSION_NAME ]M] 8 | 9 | #define UG_SCRIPT_PATH "{}" // [M[ SCRIPT_PATH ]M] 10 | #define UG_SCRIPT_NAME "{}" // [M[ SCRIPT_NAME ]M] 11 | 12 | #define UG_LANGUAGE_COUNT {0} // [M[ LANGUAGE_COUNT ]M] 13 | char *UG_LANGUAGE_ARRAY[] = {{"{0}"}}; // [M[ LANGUAGE_ARRAY ]M] 14 | 15 | // 16 | typedef struct { 17 | char* key; 18 | char* val; 19 | } PAIR_CONFIGS; 20 | 21 | //////////////////////////////////////////////////////////////// 22 | 23 | // [M[ VARIABLES ]M] 24 | 25 | //////////////////////////////////////////////////////////////// 26 | 27 | // [M[ BODIES ]M] 28 | 29 | //////////////////////////////////////////////////////////////// 30 | 31 | // [M[ FOOTERS ]M] 32 | 33 | //////////////////////////////////////////////////////////////// 34 | 35 | int configs_get_size(char *tp) { 36 | if (!tp) tp = ""; 37 | // [M[ FILTER_SIZE_BY_LANG ]M] 38 | return 0; 39 | } 40 | const PAIR_CONFIGS* configs_get_conf(char *tp) { 41 | if (!tp) tp = ""; 42 | // [M[ FILTER_CONF_BY_LANG ]M] 43 | return 0; 44 | } 45 | int configs_get_size_by_name(char *tp) { 46 | if (!tp) tp = ""; 47 | // [M[ FILTER_SIZE_BY_NAME ]M] 48 | return 0; 49 | } 50 | const PAIR_CONFIGS* configs_get_conf_by_name(char *tp) { 51 | if (!tp) tp = ""; 52 | // [M[ FILTER_CONF_BY_NAME ]M] 53 | return 0; 54 | } 55 | // 56 | #endif // YAML_CONFIGS_FLAG 57 | 58 | -------------------------------------------------------------------------------- /uyghur/templates/languages.tpl.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef YAML_LANGUAGES_FLAG 3 | #define YAML_LANGUAGES_FLAG 4 | // 5 | typedef struct { 6 | char** key; 7 | char* val; 8 | } PAIR_LANGUAGES; 9 | 10 | //////////////////////////////////////////////////////////////// 11 | 12 | // [M[ VARIABLES ]M] 13 | 14 | //////////////////////////////////////////////////////////////// 15 | 16 | // [M[ BODIES ]M] 17 | 18 | //////////////////////////////////////////////////////////////// 19 | 20 | // [M[ FOOTERS ]M] 21 | 22 | //////////////////////////////////////////////////////////////// 23 | 24 | int languages_get_size(char *tp) { 25 | if (!tp) tp = ""; 26 | // [M[ FILTER_SIZE_BY_LANG ]M] 27 | return 0; 28 | } 29 | const PAIR_LANGUAGES* languages_get_conf(char *tp) { 30 | // printf("-->get_conf:%p\n", conf); 31 | if (!tp) tp = ""; 32 | // [M[ FILTER_CONF_BY_LANG ]M] 33 | return 0; 34 | } 35 | int languages_get_size_by_name(char *tp) { 36 | if (!tp) tp = ""; 37 | // [M[ FILTER_SIZE_BY_NAME ]M] 38 | return 0; 39 | } 40 | const PAIR_LANGUAGES* languages_get_conf_by_name(char *tp) { 41 | if (!tp) tp = ""; 42 | // [M[ FILTER_CONF_BY_NAME ]M] 43 | return 0; 44 | } 45 | // 46 | #endif // YAML_LANGUAGES_FLAG 47 | -------------------------------------------------------------------------------- /uyghur/templates/letters.tpl.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef YAML_LETTERS_FLAG 3 | #define YAML_LETTERS_FLAG 4 | // 5 | typedef struct { 6 | char* key; 7 | char* val; 8 | } PAIR_LETTERS; 9 | 10 | //////////////////////////////////////////////////////////////// 11 | 12 | // [M[ VARIABLES ]M] 13 | 14 | //////////////////////////////////////////////////////////////// 15 | 16 | // [M[ BODIES ]M] 17 | 18 | //////////////////////////////////////////////////////////////// 19 | 20 | // [M[ FOOTERS ]M] 21 | 22 | //////////////////////////////////////////////////////////////// 23 | 24 | int letters_get_size(char *tp) { 25 | if (!tp) tp = ""; 26 | // [M[ FILTER_SIZE_BY_LANG ]M] 27 | return 0; 28 | } 29 | const PAIR_LETTERS* letters_get_conf(char *tp) { 30 | if (!tp) tp = ""; 31 | // [M[ FILTER_CONF_BY_LANG ]M] 32 | return 0; 33 | } 34 | int letters_get_size_by_name(char *tp) { 35 | if (!tp) tp = ""; 36 | // [M[ FILTER_SIZE_BY_NAME ]M] 37 | return 0; 38 | } 39 | const PAIR_LETTERS* letters_get_conf_by_name(char *tp) { 40 | if (!tp) tp = ""; 41 | // [M[ FILTER_CONF_BY_NAME ]M] 42 | return 0; 43 | } 44 | // 45 | #endif // YAML_LETTERS_FLAG 46 | -------------------------------------------------------------------------------- /uyghur/templates/module.tpl.c: -------------------------------------------------------------------------------- 1 | // time bind generated 2 | 3 | #include "../../../uyghur/uyghur.c" 4 | #include "../../../uyghur/{library}/{module}.c" // [M[ MODULE_FORMAT ]M] 5 | 6 | // [M[ MODULE_FUNSTIONS ]M] 7 | 8 | void lib_{module}_register(Bridge *bridge) // [M[ MODULE_FORMAT ]M] 9 | { 10 | Bridge_startBox(bridge); 11 | 12 | {register} // // [M[ MODULE_REGISTERS ]M] 13 | 14 | Bridge_register(bridge, {target}); // [M[ MODULE_TARGET ]M] 15 | } 16 | -------------------------------------------------------------------------------- /uyghur/values/dictable.c: -------------------------------------------------------------------------------- 1 | // dictable 2 | 3 | #ifndef H_UG_HEADER 4 | #include "../others/header.h" 5 | #endif 6 | 7 | #ifndef H_UG_DICT 8 | #define H_UG_DICT 9 | 10 | Dictable *_Dictable_new(char tp, Token *token, void *extra) 11 | { 12 | Dictable *dictable = Machine_newCacheableValue(tp, false); 13 | dictable->token = token; 14 | dictable->extra = extra; 15 | return dictable; 16 | } 17 | 18 | Dictable *Dictable_new(char tp, Token *token) 19 | { 20 | tools_assert(is_type_dictable(tp), "invalid dictable type for new"); 21 | return _Dictable_new(tp, token, NULL); 22 | } 23 | 24 | Dictable *Dictable_newDct(Token *token) 25 | { 26 | return Dictable_new(UG_TYPE_DCT, token); 27 | } 28 | 29 | bool Dictable_isDct(Dictable *this) 30 | { 31 | return this != NULL && this->type == UG_TYPE_DCT; 32 | } 33 | 34 | // 35 | 36 | void Dictable_delLocation(Dictable *this, char *key) 37 | { 38 | Hashmap_del(this->map, key); 39 | } 40 | 41 | Value *Dictable_getLocation(Dictable *this, char *key) 42 | { 43 | return Hashmap_get(this->map, key); 44 | } 45 | 46 | 47 | bool _hashmap_set_check_dictable(Value *old, Value *new) { 48 | if (!old || old->type == UG_TYPE_NIL) return true; 49 | if (!new || new->type == UG_TYPE_NIL) return true; 50 | if (old->fixed && old->type != new->type) { 51 | Runtime_error(LANG_ERR_EXECUTER_VARIABLE_INVALID_TYPE); 52 | return false; 53 | } 54 | new->fixed = old->fixed; 55 | return true; 56 | } 57 | 58 | void Dictable_setLocation(Value *this, char *key, Value *value) 59 | { 60 | if (value == NULL) return Dictable_delLocation(this, key); 61 | // Hashmap_set(this->map, key, value); 62 | Hashmap_setByCheck(this->map, key, value, _hashmap_set_check_dictable); 63 | } 64 | 65 | int Dictable_getCount(Dictable *this) { 66 | int count = 0; 67 | Hashkey *ptr; 68 | for (int i = 0; i < this->map->size; ++i) { 69 | ptr = this->map->bucket[i]; 70 | while (ptr != NULL) { 71 | count++; 72 | ptr = ptr->next; 73 | } 74 | } 75 | return count; 76 | } 77 | 78 | // 79 | 80 | char *Dictable_toString(Dictable *this) 81 | { 82 | return helper_value_to_string(this, "dictable", (char *)this->extra); 83 | } 84 | 85 | void Dictable_print(Dictable *this) 86 | { 87 | printf("%s\n", Dictable_toString(this)); 88 | } 89 | 90 | 91 | #endif 92 | -------------------------------------------------------------------------------- /uyghur/values/holdable.c: -------------------------------------------------------------------------------- 1 | // holdable 2 | 3 | #ifndef H_UG_HEADER 4 | #include "../others/header.h" 5 | #endif 6 | 7 | #ifndef H_UG_HOLDABLE 8 | #define H_UG_HOLDABLE 9 | 10 | Holdable *Holdable_new(char tp, void *extra) 11 | { 12 | tools_assert(is_type_holdable(tp), "invalid holdable type for new"); 13 | return _Dictable_new(tp, NULL, extra); 14 | } 15 | 16 | Holdable *Holdable_newModule(CString path) 17 | { 18 | Holdable *module = Holdable_new(UG_TYPE_MDL, path); 19 | return module; 20 | } 21 | 22 | Holdable *Holdable_newScope(CString name, Holdable *parent) 23 | { 24 | Holdable *scope = Holdable_new(UG_TYPE_SCP, name); 25 | scope->linka = parent; 26 | return scope; 27 | } 28 | 29 | Holdable *Holdable_newKind(CString name) 30 | { 31 | return Holdable_new(UG_TYPE_KND, name); 32 | } 33 | 34 | Holdable *Holdable_newProxy(CString name) 35 | { 36 | return Holdable_new(UG_TYPE_PXY, name); 37 | } 38 | 39 | // 40 | 41 | bool Holdable_isModule(Holdable *this) 42 | { 43 | return this != NULL && this->type == UG_TYPE_MDL; 44 | } 45 | 46 | bool Holdable_isScope(Holdable *this) 47 | { 48 | return this != NULL && this->type == UG_TYPE_SCP; 49 | } 50 | 51 | bool Holdable_isKind(Holdable *this) 52 | { 53 | return this != NULL && this->type == UG_TYPE_KND; 54 | } 55 | 56 | bool Holdable_isProxy(Holdable *this) 57 | { 58 | return this != NULL && this->type == UG_TYPE_PXY; 59 | } 60 | 61 | // 62 | 63 | bool Holdable_isKindOf(Holdable *this, Value *other) { 64 | if (!Holdable_isKind(this)) return false; 65 | Machine *machine = __uyghur->machine; 66 | if (this == machine->kindLgc && Value_isBoolean(other)) return true; 67 | if (this == machine->kindNum && Value_isNumber(other)) return true; 68 | if (this == machine->kindStr && Value_isString(other)) return true; 69 | if (this == machine->kindList && Value_isListable(other)) return true; 70 | if (this == machine->kindDict && Value_isDictable(other)) return true; 71 | return false; 72 | } 73 | 74 | // 75 | 76 | char *Holdable_toString(Holdable *this) 77 | { 78 | return helper_value_to_string(this, "holdable", (char *)this->extra); 79 | } 80 | 81 | void Holdable_print(Holdable *this) 82 | { 83 | printf("%s\n", Holdable_toString(this)); 84 | } 85 | 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /uyghur/values/listable.c: -------------------------------------------------------------------------------- 1 | // listable 2 | 3 | #ifndef H_UG_HEADER 4 | #include "../others/header.h" 5 | #endif 6 | 7 | #ifndef H_UG_LIST 8 | #define H_UG_LIST 9 | 10 | Listable *Listable_new(char tp, Token *token) 11 | { 12 | Listable *listable = Machine_newCacheableValue(tp, false); 13 | tools_assert(is_type_listable(tp), "invalid listable type for new"); 14 | listable->token = token; 15 | listable->extra = NULL; 16 | return listable; 17 | } 18 | 19 | Listable *Listable_newLst(Token *token) 20 | { 21 | return Listable_new(UG_TYPE_LST, token); 22 | } 23 | 24 | bool Listable_isLst(Listable *this) 25 | { 26 | return this != NULL && this->type == UG_TYPE_LST; 27 | } 28 | 29 | // 30 | 31 | bool Listable_push(Listable *this, Value *item) { 32 | return Array_push(this->arr, item); 33 | } 34 | 35 | Value *Listable_getIndex(Listable *this, int index) { 36 | return Array_get(this->arr, index); 37 | } 38 | 39 | bool Listable_setIndex(Listable *this, int index, Value *item) { 40 | return Array_set(this->arr, index, item); 41 | } 42 | 43 | int Listable_getCount(Listable *this) { 44 | return this->arr->length; 45 | } 46 | 47 | // 48 | 49 | char *Listable_toString(Listable *this) 50 | { 51 | return helper_value_to_string(this, "listable", (char *)this->extra); 52 | } 53 | 54 | void Listable_print(Listable *this) 55 | { 56 | printf("%s\n", Listable_toString(this)); 57 | } 58 | 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /uyghur/values/loadable.c: -------------------------------------------------------------------------------- 1 | // loadable 2 | 3 | #ifndef H_UG_HEADER 4 | #include "../others/header.h" 5 | #endif 6 | 7 | #ifndef H_UG_LOADABLE 8 | #define H_UG_LOADABLE 9 | 10 | Loadable *Loadable_new(char tp, Token *token) 11 | { 12 | tools_assert(is_type_loadable(tp), "invalid loadable type for new"); 13 | Loadable *loadable = Machine_newCacheableValue(tp, false); 14 | loadable->token = token; 15 | loadable->extra = NULL; 16 | return loadable; 17 | } 18 | 19 | Loadable *Loadable_newStuf(void *data, CString name, CString path, CPointer releaser) 20 | { 21 | char *_name = helper_translate_something(name); 22 | Token *token = Token_new(UG_TTYPE_NAM, _name); 23 | Loadable *loadable = Loadable_new(UG_TYPE_STF, token); 24 | loadable->obj = data; 25 | loadable->extra = path; 26 | loadable->linka = releaser; 27 | return loadable; 28 | } 29 | 30 | bool Loadable_isStuf(Loadable *this) 31 | { 32 | return this != NULL && this->type == UG_TYPE_STF; 33 | } 34 | 35 | char *Loadable_toString(Loadable *this) 36 | { 37 | return helper_value_to_string(this, "loadable", (char *)this->extra); 38 | } 39 | 40 | void Loadable_print(Loadable *this) 41 | { 42 | printf("%s\n", Loadable_toString(this)); 43 | } 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /uyghur/values/objective.c: -------------------------------------------------------------------------------- 1 | // objective 2 | 3 | #ifndef H_UG_HEADER 4 | #include "../others/header.h" 5 | #endif 6 | 7 | #ifndef H_UG_OBJECTIVE 8 | #define H_UG_OBJECTIVE 9 | 10 | Objective *Objective_new(char tp, Token *token, void *extra) 11 | { 12 | tools_assert(is_type_objective(tp), "invalid objective type for new"); 13 | return _Dictable_new(tp, token, extra); 14 | } 15 | 16 | Objective *Objective_newCtr(Token *name) 17 | { 18 | return Objective_new(UG_TYPE_CTR, name, NULL); 19 | } 20 | 21 | Objective *Objective_newAtr(Token *name) 22 | { 23 | return Objective_new(UG_TYPE_ATR, name, NULL); 24 | } 25 | 26 | Objective *Objective_newObj(Token *token, Queue *parents) 27 | { 28 | return Objective_new(UG_TYPE_OBJ, token, parents); 29 | } 30 | 31 | // 32 | 33 | bool Objective_isCtr(Objective *this) 34 | { 35 | return this != NULL && this->type == UG_TYPE_CTR; 36 | } 37 | 38 | bool Objective_isAtr(Objective *this) 39 | { 40 | return this != NULL && this->type == UG_TYPE_ATR; 41 | } 42 | 43 | bool Objective_isObj(Objective *this) 44 | { 45 | return this != NULL && this->type == UG_TYPE_OBJ; 46 | } 47 | 48 | // 49 | 50 | bool Objective_isInstanceOf(Objective *this, Value *other) { 51 | if (!Objective_isObj(this)) return false; 52 | if (!Objective_isCtr(other) && !Objective_isAtr(other)) return false; 53 | Objective *_other = other; 54 | Queue *parents = this->extra; 55 | Queue_RESTE(parents); 56 | Objective *parent = Queue_NEXT(parents); 57 | while (parent != NULL) { 58 | if (parent == _other) { 59 | return true; 60 | } 61 | parent = Queue_NEXT(parents); 62 | } 63 | return false; 64 | } 65 | 66 | // 67 | 68 | char *Objective_toString(Objective *this) 69 | { 70 | return helper_value_to_string(this, "objective", (char *)this->extra); 71 | } 72 | 73 | void Objective_print(Objective *this) 74 | { 75 | printf("%s\n", Objective_toString(this)); 76 | } 77 | 78 | #endif 79 | -------------------------------------------------------------------------------- /uyghur/values/runnable.c: -------------------------------------------------------------------------------- 1 | // runnable 2 | 3 | #ifndef H_UG_HEADER 4 | #include "../others/header.h" 5 | #endif 6 | 7 | #ifndef H_UG_RUNNABLE 8 | #define H_UG_RUNNABLE 9 | 10 | Runnable *Runnable_new(char tp, Token *token) 11 | { 12 | tools_assert(is_type_runnable(tp), "invalid runnable type for new"); 13 | Runnable *runnable = Machine_newCacheableValue(tp, false); 14 | runnable->token = token; 15 | runnable->extra = NULL; 16 | return runnable; 17 | } 18 | 19 | Runnable *Runnable_newWorker(WORKER worker, Token *token, void *environment) 20 | { 21 | Runnable *runnable = Runnable_new(UG_TYPE_WKR, token); 22 | runnable->obj = worker; 23 | runnable->linka = environment; 24 | return runnable; 25 | } 26 | 27 | Runnable *Runnable_newNative(NATIVE native, Token *token) 28 | { 29 | Runnable *runnable = Runnable_new(UG_TYPE_NTV, token); 30 | runnable->obj = native; 31 | runnable->linka = NULL; 32 | return runnable; 33 | } 34 | 35 | 36 | bool Runnable_isWorker(Runnable *this) 37 | { 38 | return this != NULL && this->type == UG_TYPE_WKR; 39 | } 40 | 41 | bool Runnable_isNative(Runnable *this) 42 | { 43 | return this != NULL && this->type == UG_TYPE_NTV; 44 | } 45 | 46 | char *Runnable_toString(Runnable *this) 47 | { 48 | return helper_value_to_string(this, "runnable", (char *)this->extra); 49 | } 50 | 51 | void Runnable_print(Runnable *this) 52 | { 53 | printf("%s\n", Runnable_toString(this)); 54 | } 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /uyghur/values/waitable.c: -------------------------------------------------------------------------------- 1 | // waitable 2 | 3 | #ifndef H_UG_HEADER 4 | #include "../others/header.h" 5 | #endif 6 | 7 | #ifndef H_UG_WAITABLE 8 | #define H_UG_WAITABLE 9 | 10 | Waitable *Waitable_new(char tp, Token *token) 11 | { 12 | tools_assert(is_type_waitable(tp), "invalid waitable type for new"); 13 | Waitable *waitable = Machine_newCacheableValue(tp, false); 14 | waitable->token = token; 15 | waitable->extra = NULL; 16 | return waitable; 17 | } 18 | 19 | Waitable *Waitable_newTask(Value *func, CString name, CString path, CPointer releaser) 20 | { 21 | char *_name = helper_translate_something(name); 22 | Token *token = Token_new(UG_TTYPE_NAM, _name); 23 | Waitable *waitable = Waitable_new(UG_TYPE_TSK, token); 24 | waitable->obj = func; 25 | waitable->extra = path; 26 | waitable->linka = releaser; 27 | return waitable; 28 | } 29 | 30 | bool Waitable_isTask(Waitable *this) 31 | { 32 | return this != NULL && this->type == UG_TYPE_TSK; 33 | } 34 | 35 | char *Waitable_toString(Waitable *this) 36 | { 37 | return helper_value_to_string(this, "waitable", (char *)this->extra); 38 | } 39 | 40 | void Waitable_print(Waitable *this) 41 | { 42 | printf("%s\n", Waitable_toString(this)); 43 | } 44 | 45 | #endif 46 | --------------------------------------------------------------------------------