{"id":21359919,"url":"https://github.com/ujstor/basic-interpreter-in-python","last_synced_at":"2026-05-16T23:14:04.491Z","repository":{"id":180794827,"uuid":"664802457","full_name":"Ujstor/Basic-interpreter-in-Python","owner":"Ujstor","description":"Lexer, parser \u0026 interpreter in Python. Test this code in a VM environment.","archived":false,"fork":false,"pushed_at":"2023-11-25T13:04:09.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T18:51:53.568Z","etag":null,"topics":["interpreter","lexer","parser","python"],"latest_commit_sha":null,"homepage":"https://ujstor.github.io/webvm/","language":"Jupyter Notebook","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/Ujstor.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}},"created_at":"2023-07-10T19:29:48.000Z","updated_at":"2023-11-22T18:56:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"9daf65de-7875-4d5b-a453-684feea57f89","html_url":"https://github.com/Ujstor/Basic-interpreter-in-Python","commit_stats":null,"previous_names":["ujstor/basic-interpreter-in-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ujstor%2FBasic-interpreter-in-Python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ujstor%2FBasic-interpreter-in-Python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ujstor%2FBasic-interpreter-in-Python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ujstor%2FBasic-interpreter-in-Python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ujstor","download_url":"https://codeload.github.com/Ujstor/Basic-interpreter-in-Python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835946,"owners_count":20355610,"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":["interpreter","lexer","parser","python"],"created_at":"2024-11-22T05:30:46.692Z","updated_at":"2026-05-16T23:13:59.456Z","avatar_url":"https://github.com/Ujstor.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic Interpreter in Python\n\nShadowScript is a Python-based interpreter designed for a custom scripting language. It provides a versatile environment for executing scripts with various features like variable declarations, arithmetic operations, conditional statements, and loops.\n\n## Installation\nTo use ShadowScript, simply clone this repository and ensure you have Python installed on your system or test this code in a VM environment, provided in the description of this repository.\n\n![](https://i.imgur.com/JTl6nAx.png)\n\n\n## Components\nShadowScript consists of several key components:\n- `Lexer`: Tokenizes the input script into meaningful tokens.\n- `Parser`: Parses the tokens into an abstract syntax tree (AST).\n- `Interpreter`: Interprets the AST and executes the script.\n- `Data`: Handles storage and retrieval of variables.\n\n\n## Examples\n\n### Example 1: Variable Declaration and Arithmetic Operation\n```python\nShadowScript: make x = 10\nShadowScript: make y = 20\nShadowScript: x + y\n```\nThis example demonstrates declaring two variables and performing an addition operation.\n\n### Example 2: Conditional Statement\n```python\nShadowScript: make a = 5\nShadowScript: make b = 10\nShadowScript: if a \u003c b do a = a + 1\n```\nThis example shows the use of a conditional `if` statement to modify a variable based on a comparison.\n\n### Example 3: While Loop\n```python\nShadowScript: make counter = 0\nShadowScript: while counter \u003c 5 do make counter = counter + 1\n```\nIn this example, a `while` loop is used to increment a variable until a certain condition is met.\n\n## Limitations\nShadowScript is a basic interpreter and may not support all features of a fully-fledged programming language. It's primarily for educational and experimental purposes.\n\n\n![purple-divider](https://user-images.githubusercontent.com/7065401/52071927-c1cd7100-2562-11e9-908a-dde91ba14e59.png)\n\n# Links for additional learning content\n1. [Create a Programming Language and Learn Advanced Python](https://www.youtube.com/watch?v=1WpKsY9LBlY)\n2. [Data Structures Easy to Advanced Course - Full Tutorial from a Google Engineer](https://www.youtube.com/watch?v=RBSGKlAvoiM\u0026list=PLkNZMXPAMnwPWawqMHs5Y2Q5B3Sh5Iwbo\u0026index=22\u0026t=14388s)\n3. [Data Structures - Computer Science Course for Beginners](https://www.youtube.com/watch?v=zg9ih6SVACc\u0026list=PLkNZMXPAMnwPWawqMHs5Y2Q5B3Sh5Iwbo\u0026index=3\u0026t=115s)\n4. [Recursion in Programming](https://www.youtube.com/watch?v=IJDJ0kBx2LM\u0026t=12s)\n5. [Big O Notation](https://www.youtube.com/watch?v=Mo4vesaut8g)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fujstor%2Fbasic-interpreter-in-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fujstor%2Fbasic-interpreter-in-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fujstor%2Fbasic-interpreter-in-python/lists"}