{"id":18634335,"url":"https://github.com/yycorcino/flex-bison-python-compiler","last_synced_at":"2026-04-24T21:33:34.134Z","repository":{"id":234576216,"uuid":"787606766","full_name":"yycorcino/flex-bison-python-compiler","owner":"yycorcino","description":"Intricate Python Interpreter: Arithmetic, Flow-Control, Trigonometric","archived":false,"fork":false,"pushed_at":"2024-04-26T20:46:29.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"ast-implementation","last_synced_at":"2025-06-04T19:55:44.393Z","etag":null,"topics":["cscea321","docker","flex-bison","python"],"latest_commit_sha":null,"homepage":"","language":"Yacc","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/yycorcino.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-04-16T21:00:47.000Z","updated_at":"2024-05-09T18:08:33.000Z","dependencies_parsed_at":"2024-04-24T21:47:22.367Z","dependency_job_id":null,"html_url":"https://github.com/yycorcino/flex-bison-python-compiler","commit_stats":null,"previous_names":["yycorcino/flex-bison-python-compiler"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yycorcino/flex-bison-python-compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yycorcino%2Fflex-bison-python-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yycorcino%2Fflex-bison-python-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yycorcino%2Fflex-bison-python-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yycorcino%2Fflex-bison-python-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yycorcino","download_url":"https://codeload.github.com/yycorcino/flex-bison-python-compiler/tar.gz/refs/heads/ast-implementation","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yycorcino%2Fflex-bison-python-compiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32241794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cscea321","docker","flex-bison","python"],"created_at":"2024-11-07T05:18:14.660Z","updated_at":"2026-04-24T21:33:34.098Z","avatar_url":"https://github.com/yycorcino.png","language":"Yacc","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cbr\u003e \n\u003c!-- PROJECT LOGO --\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Python-2496ED?style=for-the-badge\u0026logo=Python\u0026logoColor=white\" alt=\"Python\"\u003e\n  \n  \u003ch3 align=\"center\"\u003eMini Python Interpreter\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    A intricate Python interpreter using CLI to process Python syntax.\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n\n## About The Project\n\nThis mini interpreter is capable of intaking Python syntax and producing a relatively similar response to Python. Utilizing `\"flex \u0026 bison\"` authored by John R. Levine, I converted its original implementation to match more of Python syntax rather then a calculator. The major challenge of creating this interpreter is using Flex and Bison in parallel with the abstract syntax tree. No references exist in the implementation without AST.\n\n\u003c!-- GETTING STARTED --\u003e\n\n## Getting Started\n\nInstalling and configuring Flex and Bison using Docker.\n\n### Prerequisites\n\n_Have Docker pre-installed into your operating system._\n\n- Using [CLI Command](https://docs.docker.com/engine/install/ubuntu/) for Ubuntu\n  ```\n  sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin\n  ```\n\n### Installation\n\n_Below is an example of how you download this project and start using Docker._\n\n1. Clone the repo\n   ```\n   git clone \u003crepo_url\u003e\n   ```\n2. Go into the Project Repository\n   ```\n   cd /path/to/repository\n   ```\n3. Build Image\n   ```\n   sudo docker build -t compiler-image .\n   ```\n4. Run Container\n   ```\n   sudo docker run -it compiler-image\n   ```\n5. Run Test inside Container\n   ```\n   $ make\n   $ ./interpreter \u003csource_file\u003e\n   ```\n\n\u003c!-- USAGE EXAMPLES --\u003e\n\n## Usage\n\n_Test arithmetic, flow control, or trig operations by inputting Python syntax._\n\n```\n$ make\n$ ./compiler\n$ \u003e\u003e\u003e \u003cinsert valid Python syntax\u003e\n```\n\n_Remove all generated files._\n\n```\nmake clean\n```\n\n## Usage Example\n\n_Example of arithmetic operations._\n\n```\n$ \u003e\u003e\u003e print(4 + 7)\n$ = 11\n$ \u003e\u003e\u003e print(20 - 7)\n$ = 13\n$ \u003e\u003e\u003e print(4 + 1 - 6 * 100 / 70)\n$ = -3.571\n```\n\n_Example of flow control operations._\n\n```\n$ \u003e\u003e\u003e def addition(a, b): print(a + b)\n$ Defined addition\n$ \u003e\u003e\u003e addition(1, 2)\n$ = 3\n```\n\n```\n$ \u003e\u003e\u003e i = 5\n$ \u003e\u003e\u003e b = 6\n$ if (i == b): print(i) else: print(b)\n$ = 6\n```\n\n```\n$ \u003e\u003e\u003e i = 5\n$ while (i \u003e 0): print(i) i = i - 1\n$ = 5\n$ = 4\n$ = 3\n$ = 2\n$ = 1\n```\n\n_Example of trig operations._\n\n```\n$ \u003e\u003e\u003e print(math.sqrt(16))\n$ = 4\n$ \u003e\u003e\u003e print(math.exp(8))\n$ = 2981\n$ \u003e\u003e\u003e print(math.log(20))\n$ = 2.996\n$ \u003e\u003e\u003e print(math.sin(100))\n$ = -0.5064\n$ \u003e\u003e\u003e print(math.cos(100))\n$ = 0.8623\n$ \u003e\u003e\u003e print(math.tan(100))\n$ = -0.5872\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyycorcino%2Fflex-bison-python-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyycorcino%2Fflex-bison-python-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyycorcino%2Fflex-bison-python-compiler/lists"}