{"id":22624664,"url":"https://github.com/barrettotte/genshi-basic","last_synced_at":"2025-07-02T06:36:01.797Z","repository":{"id":114090520,"uuid":"182325393","full_name":"barrettotte/Genshi-BASIC","owner":"barrettotte","description":"Interpreter for Genshi BASIC; A simple dialect of BASIC created to learn the basics of making a programming language.","archived":false,"fork":false,"pushed_at":"2021-02-12T23:13:18.000Z","size":175,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T17:29:13.574Z","etag":null,"topics":["basic","basic-interpreter","interpreter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/barrettotte.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":"2019-04-19T21:02:59.000Z","updated_at":"2023-06-13T19:23:45.000Z","dependencies_parsed_at":"2023-06-12T13:45:33.588Z","dependency_job_id":null,"html_url":"https://github.com/barrettotte/Genshi-BASIC","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/barrettotte/Genshi-BASIC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FGenshi-BASIC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FGenshi-BASIC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FGenshi-BASIC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FGenshi-BASIC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barrettotte","download_url":"https://codeload.github.com/barrettotte/Genshi-BASIC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barrettotte%2FGenshi-BASIC/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263088082,"owners_count":23411991,"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":["basic","basic-interpreter","interpreter"],"created_at":"2024-12-09T00:17:18.769Z","updated_at":"2025-07-02T06:36:01.757Z","avatar_url":"https://github.com/barrettotte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Genshi-BASIC\nInterpreter for Genshi BASIC; A simple dialect of BASIC created to \nlearn the basics of making a programming language.\n\nEven though writing an interpreter for a custom BASIC dialect is pretty useless, the same \nlexing, parsing, and interpreting fundamentals I learned can be applied to other languages.\n\nI originally wrote this in 2019, but decided that this year (2021) I would rewrite it\nto practice concepts I had learned since the original implementation.\n\nI did get kind of lazy and skipped out on implementing a REPL, so for right now it\njusts interprets an array of strings or a source file.\n\n\n## Genshi BASIC\nGenshi BASIC has 41 keywords. As stated above, the grammar is based on BASIC version 2.\n\nGenshi (原始) means \"simple\" in romaji. I chose this name because I stripped out a lot of\nfunctionality to make a simpler BASIC. Arguably this makes it pretty useless, \nbut this is a learning project rather than a useful one.\n\nIts worth noting that **this is not fully tested**. \nI more or less got a couple programs working correctly and called it a day.\nAs I said before, this is a rewrite and I'm honestly very bored of it now.\n\n\n### Notable differences from BASIC version 2\nGenshi BASIC is meant to be a simpler version of BASIC version 2.\nI stripped out a bunch of stuff and didn't really add anything special.\n\nI used [this page](https://www.c64-wiki.com/wiki/C64-Commands) on Commodore 64 commands\nas reference for BASIC version 2.\n\nRemoved:\n\n- function declarations - ```DEF```, ```FN```\n- memory operations - ```FRE```, ```PEEK```, ```POKE```, ```WAIT```, ```NEW```\n- system operations - ```GET```, ```STATUS```, ```SYS```, ```USR```, ```TIME```\n- file operations - ```OPEN```, ```LOAD```, ```CLOSE```, ```VERIFY```, ```SAVE```\n- \"interactive\" operations - ```RUN```, ```STOP```, ```LIST```\n\nChanged:\n\n- string variables are no longer required to end with '$'\n- removed '$' characters from ```CHR$,LEFT$,MID$,RIGHT$``` operations\n\nAdded:\n\n- new keywords - ```XOR```\n- I lost motivation to add anything else cool\n\n\n## Examples\n```python\n# Usage of genshi BASIC interpreter\n\nfrom genshibasic.interpreter import Interpeter\n\npgm = [\n  '10 REM Example 1',\n  '20 LET A=3+4 * 6/2',\n  '30 PRINT \"A=\"; A',\n  '40 A=8',\n  '50 PRINT \"NOW A=\"; A',\n  '100 END'\n]\n\ngenshi_int = Interpeter()\ngenshi_int.interpret(pgm)\n    \n# A=15.0\n# NOW A=8\n```\n\n\n## Development\n- Install deps - ```pip3 install -r requirements.txt```\n- Run tests - ```python3 -m unittest discover```\n\n\n## References\n- Commodore 64 BASIC\n  - https://www.c64-wiki.com/wiki/BASIC\n  - https://www.c64-wiki.com/wiki/C64-Commands\n- EBNF https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarrettotte%2Fgenshi-basic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarrettotte%2Fgenshi-basic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarrettotte%2Fgenshi-basic/lists"}