{"id":19814090,"url":"https://github.com/guibrandt/shiro-programming-language","last_synced_at":"2025-05-01T10:31:07.211Z","repository":{"id":129286025,"uuid":"72669763","full_name":"GuiBrandt/Shiro-Programming-Language","owner":"GuiBrandt","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-07T00:11:10.000Z","size":626,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T12:07:00.505Z","etag":null,"topics":["compiler","interpreter","programming-language","shiro-programming-language","vm"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GuiBrandt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-11-02T18:33:52.000Z","updated_at":"2024-04-09T12:12:13.000Z","dependencies_parsed_at":"2023-07-14T22:00:09.748Z","dependency_job_id":null,"html_url":"https://github.com/GuiBrandt/Shiro-Programming-Language","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/GuiBrandt%2FShiro-Programming-Language","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuiBrandt%2FShiro-Programming-Language/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuiBrandt%2FShiro-Programming-Language/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GuiBrandt%2FShiro-Programming-Language/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GuiBrandt","download_url":"https://codeload.github.com/GuiBrandt/Shiro-Programming-Language/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251859805,"owners_count":21655622,"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":["compiler","interpreter","programming-language","shiro-programming-language","vm"],"created_at":"2024-11-12T09:38:03.058Z","updated_at":"2025-05-01T10:31:07.206Z","avatar_url":"https://github.com/GuiBrandt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"Shiro\r\n===\r\n\r\nEste repositório contém o código do interpretador da linguagem \"Shiro\", uma linguagem C-like\r\ndesenvolvida em 2016 como estudo. O objetivo deste projeto era o de tentar entender o funcionamento\r\nde um interpretador/compilador de uma linguagem de programação.\r\n\r\nO projeto inclui:\r\n- [Uma implementação de Lexer](./src/shiro/lexer.c)\r\n- [Uma implementação de Parser de descida recursiva](./src/shiro/parser.c)\r\n- [Uma implementação de interpretador/máquina virtual](./src/shiro/eval.c)\r\n- [Bibliotecas padrão para a linguagem](./src/shiro/libs)\r\n\r\nInfelizmente, devido a limitações de conhecimento do autor à época, nenhum tipo de otimização foi\r\nimplementada como parte do pipeline do compilador.\r\n\r\nExemplo\r\n---\r\n\r\nUm exemplo de programa para para calcular a sequência de fibonacci indeterminadamente usando loops\r\ne números de precisão arbitrária na linguagem:\r\n```rust\r\nimport \"bignum\";\r\n\r\nfn fibo(n) {\r\n\ta = bignum(1);\r\n\tb = bignum(1);\r\n\r\n\ti = uint(0);\r\n\r\n\twhile (i \u003c n) {\r\n\t\tlb = b;\r\n\t\tb = bignum_add(a, b);\r\n\t\ta = lb;\r\n\r\n\t\ti += 1;\r\n\t};\r\n\r\n\tfree_bignum(a);\r\n\r\n\treturn b;\r\n};\r\n\r\nimport \"stdio\";\r\n\r\nprint(bignum_to_string(fibo(9000)));\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguibrandt%2Fshiro-programming-language","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguibrandt%2Fshiro-programming-language","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguibrandt%2Fshiro-programming-language/lists"}