{"id":25063846,"url":"https://github.com/pacatro/sicompiler","last_synced_at":"2026-03-02T22:12:51.335Z","repository":{"id":216388405,"uuid":"739040138","full_name":"Pacatro/sicompiler","owner":"Pacatro","description":"A basic compiler for SiCoMe programs","archived":false,"fork":false,"pushed_at":"2024-05-29T15:40:00.000Z","size":69,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T10:42:07.901Z","etag":null,"topics":["clap","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Pacatro.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}},"created_at":"2024-01-04T16:25:53.000Z","updated_at":"2024-10-15T14:59:29.000Z","dependencies_parsed_at":"2024-01-27T19:26:38.813Z","dependency_job_id":"cb0927e9-8d41-4eaa-8421-5e9723da1a13","html_url":"https://github.com/Pacatro/sicompiler","commit_stats":null,"previous_names":["pacatro/sicompiler"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pacatro%2Fsicompiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pacatro%2Fsicompiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pacatro%2Fsicompiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pacatro%2Fsicompiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pacatro","download_url":"https://codeload.github.com/Pacatro/sicompiler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237531521,"owners_count":19325229,"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":["clap","rust"],"created_at":"2025-02-06T18:54:11.313Z","updated_at":"2026-03-02T22:12:51.293Z","avatar_url":"https://github.com/Pacatro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SiCompiler\n\nThis is a simple project that check for syntax errors in your SiCoMe program.\n\nYou can see this project also in [Crates.io](https://crates.io/crates/sicompiler)\n\n## 🛠️ Instalation\n\n### Using cargo\n\nYou must have [Rust](https://www.rust-lang.org/es/tools/install) installed:\n\n```terminal\ncargo install sicompiler\n```\n\n## ✏️ How to use\n\nTo use sicompiler you need to have a `.txt` file where you write your program and a `.rep` file with the valid instructions.\n\n### Execution\n\n```terminal\nsicompiler --rep \u003cREPERTOIRE_PATH\u003e \u003cINPUT_PATH\u003e\n```\n\n### Arguments\n\n```terminal\n\u003cINPUT_PATH\u003e   The input path to compile\n\u003cREPERTOIRE_PATH\u003e The repertoire of instructions\n[OUTPUT_PATH]  The output path to write to [default: out.txt]\n```\n\n### Options\n\n```terminal\n-o, --out \u003cOUTPUT_PATH\u003e      The output path to write to [default: out.txt]\n-r, --rep \u003cREPERTOIRE_PATH\u003e  The repertoire of instructions\n-h, --help                   Print help\n-V, --version                Print version\n```\n\nThe result will be an output file with the path you write or a default path in the same directory you are.\n\n### Input\n\n```termial\n0 0003  #Number 1\n1 0003  #Number 2\n3 0000  #Result\n\n*** This is a \nmulti-line comment ***\n\n@\n6\n@\n\nCRA\nCRF\nADD 0001\nROR_F_ACC\nSFZ\nJMP 12  #F!=0\n\n#-----F==0-----\nCRA\nCRF\nADD 0000\nROL_F_ACC\nSTA 0004\nHALT\n\n#-----F!=0-----\nCRA\nCRF\nADD 0001\nROL_F_ACC\nSTA 0004\nHALT\n```\n\n### Output\n\n```terminal\n0 0003\n1 0003\n3 0000\n@\n6\n@\nCRA \nCRF \nADD 0001\nROR_F_ACC \nSFZ \nJMP 12\nCRA \nCRF \nADD 0000\nROL_F_ACC \nSTA 0004\nHALT \nCRA \nCRF \nADD 0001\nROL_F_ACC \nSTA 0004\nHALT \n```\n\n## 📚 Standars\n\n\u003e [!IMPORTANT]\n\u003e These standards are subject to updates.\n\nThis compiler meets some standars that have been written resently.\n\n### One-line comments\n\nThe comments in one line will be specified by a `#`:\n\n```terminal\nCRA 23 #One line comment\n```\n\n### Multi-line comments\n\nThe comments in one line will be specified by `***` at the beginig and another at the end:\n\n```terminal\nCRA 23 \n***Multi \nline \ncomment***\n```\n\n### Program structure\n\nA program is divided into three clearly differentiated sections, each of them separated by the `@` character.\n\n```terminal\n\u003cvariables declaration\u003e\n@\n\u003cstart dir\u003e\n@\n\u003csentences\u003e\n```\n\n### Repertoire structure\n\nA `repertoire` of instructions is the set of instructions that can be in the SiCoMe program.\n\nThe structure of a repertoire is like this:\n\n```terminal\n$\n\u003cmicroprogram section\u003e (Not implemented)\n$\n\u003cvalid instructions\u003e\n```\n\n### Error cases\n\n- The program does not follow the structure defined by the standard.\n- The instructions in the program are not defined in the repertoire.\n- The instructions does not have the correct number of parameters.\n- The parameters of the instructions are not in hex base.\n\n## 📑 Libraries used\n\n- [Clap](https://crates.io/crates/clap)\n\n## 💻 Development\n\nIf you want to colaborate and add new features to the project you must do this simples steps.\n\n### Colaborate\n\n```bash\ngit clone git@github.com:Pacatro/sicompiler.git\ncd sicompiler\ncargo build\n```\n\n### Tests\n\nThere are unit tests for the principals structs `Tokenizer` and `Validator` and only two integration tests.\n\nTo execute tests you only need to run the following command:\n\n```bash\ncargo test\n```\n\n## 🔑 License\n\n[MIT](https://opensource.org/license/mit/) - Created by **P4k0**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacatro%2Fsicompiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpacatro%2Fsicompiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacatro%2Fsicompiler/lists"}