{"id":16200527,"url":"https://github.com/asc8384/wen","last_synced_at":"2025-04-07T17:53:40.322Z","repository":{"id":117593202,"uuid":"444706942","full_name":"ASC8384/wen","owner":"ASC8384","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-25T12:05:26.000Z","size":69,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"ilovebuaa","last_synced_at":"2025-02-13T19:53:55.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ASC8384.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-05T07:32:04.000Z","updated_at":"2023-12-20T18:09:56.000Z","dependencies_parsed_at":"2023-12-25T13:28:54.021Z","dependency_job_id":"3887c06a-2740-473e-a8fc-e18f784cc2f0","html_url":"https://github.com/ASC8384/wen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASC8384%2Fwen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASC8384%2Fwen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASC8384%2Fwen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASC8384%2Fwen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ASC8384","download_url":"https://codeload.github.com/ASC8384/wen/tar.gz/refs/heads/ilovebuaa","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247704515,"owners_count":20982292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T09:31:13.780Z","updated_at":"2025-04-07T17:53:40.306Z","avatar_url":"https://github.com/ASC8384.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wen\n\n一款基于递归下降解析器的编程语言，语法类似于 BrainFuck，命名为 `wen-ilovebuaa`。\n\n## tokens\n\n### 1. 空白字符\n\n会忽略换行符（ \\n ） 、回车符（ \\r ） 、 横向制表符（ \\ t ）、纵向制表符（ \\v ）、换页符（ \\f ）和空格符这 6 个空白字符 。\n\n### 2. 操作符\n\n|运算符| 作用|\n|-|-|\n|a| 将指针左移一个位置|\n|i| 将指针右移一个位置|\n|l| 将指针指向的单元的数值增加1|\n|e| 将指针指向的单元的数值减少1|\n|o| 输出指针指向的单元的数值（一般为ASCII字符）|\n|v| 输入一个数值到指针指向的单元（一般为ASCII字符）|\n|b| 如果指针指向的单元的数值为0，跳过匹配的 ]|\n|u| 如果指针指向的单元的数值不为0，跳回到匹配的 [|\n|+| 将指针处的字节与存储中的字节相加,结果存储在寄存器的字节中。|\n|-| 将指针处的字节与存储中的字节相加,结果存储在寄存器的字节中。|\n|*| 将指针处的字节与存储中的字节相乘,结果存储在寄存器的字节中。|\n|/| 将指针处的字节与存储中的字节相除,结果存储在寄存器的字节中。|\n|@| 修饰符存储处的数值不用转换ASCII码，以数字类型输入以及输出|\n|A| 表示寄存器|\n|?| 读取寄存器的值到指针处的字节 |\n|!|存储寄存器的值到指针处的字节|\n|$| 变量前缀|\n|\\[\\]\\(\\)| 限制变量操作范围|\n|\u0026| 初始化数据|\n|^| 指针指向变量的起始位置|\n|B| 根据当前指针指向的值进行不同跳转|\n|#| 条件语句结束|\n|V| 跳转到条件语句结束|\n|E| 程序立刻终止|\n\n## Parser\n\n使用递归下降解析器。\n\n## Backend\n\n使用 Go 语言解释执行。同时也提供了 C 语言后端，作为编译执行的可选项。\n\n## Run\n\n```bash\ncd wen/\ngo build\nwen sourcename.wen\n```\n\n或者\n\n```bash\ngo run \"wen\\main.go\" -c \"wen\\1.wen\"\n```\n\n或者\n\n```bash\ngo run main.go -d \"llllllllbillllbillilllilllilaaaaeuililieiilbauaeuiioieeeollllllloollloiioaeoaollloeeeeeeoeeeeeeeeoiiloillo\"\n```\n\n其中，`-c` 代表使用C语言后端，`-d` 代表输出抽象语法树。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasc8384%2Fwen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasc8384%2Fwen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasc8384%2Fwen/lists"}