{"id":23567103,"url":"https://github.com/codebyaadi/monkey-interpreter","last_synced_at":"2025-11-01T22:30:43.011Z","repository":{"id":269065466,"uuid":"903631941","full_name":"codebyaadi/monkey-interpreter","owner":"codebyaadi","description":"A simple interpreter implemented in Go, inspired by the book \"Writing a Compiler in Go\". This project aims to build a basic interpreter from scratch, providing a hands-on approach to language parsing, lexical analysis, and code generation.","archived":false,"fork":false,"pushed_at":"2024-12-20T17:22:36.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-29T20:13:26.429Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/codebyaadi.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":"2024-12-15T05:45:17.000Z","updated_at":"2024-12-20T17:22:40.000Z","dependencies_parsed_at":"2024-12-27T06:46:11.560Z","dependency_job_id":null,"html_url":"https://github.com/codebyaadi/monkey-interpreter","commit_stats":null,"previous_names":["codebyaadi/monkey-interpreter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebyaadi%2Fmonkey-interpreter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebyaadi%2Fmonkey-interpreter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebyaadi%2Fmonkey-interpreter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codebyaadi%2Fmonkey-interpreter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codebyaadi","download_url":"https://codeload.github.com/codebyaadi/monkey-interpreter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239340505,"owners_count":19622702,"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":[],"created_at":"2024-12-26T18:18:55.378Z","updated_at":"2025-11-01T22:30:42.965Z","avatar_url":"https://github.com/codebyaadi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Interpreter\n\nThis is an implementation of an interpreter in Go, inspired by the book **[Write an Interpreter in Go](https://interpreterbook.com/)** by Thorsten Ball. The project focuses on building an interpreter for a custom programming language from scratch while learning about lexical analysis, parsing, abstract syntax trees (AST), and evaluation.\n\n---\n\n## 📚 About the Project\n\nThe project implements a simple programming language with the following features:\n- Arithmetic expressions (e.g., `1 + 2 * (3 + 4)`)\n- Boolean expressions (e.g., `true \u0026\u0026 !false`)\n- Variables and bindings (e.g., `let x = 10;`)\n- Functions and closures (e.g., `let add = fn(a, b) { a + b };`)\n- Built-in functions (e.g., `len(\"hello\")`)\n\nThis is an educational project to deepen understanding of interpreters and language implementation.\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Go 1.20+ installed on your machine.\n- Basic understanding of Go programming language.\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/codebyaadi/monkey-interpreter.git\ncd monkey-interpreter\n```\n\n### Run the Interpreter (REPL)\n\n```bash\ngo run ./cmd/interpreter/main.go\n```\n\nOnce running, you can type commands directly into the REPL. Example:\n\n```plaintext\n\u003e let x = 5;\n\u003e let y = x + 10;\n\u003e y\n15\n```\n\nTo exit the REPL, type `exit`.\n\n## 📚 Learnings\n\nThis project teaches:\n1. **Lexical Analysis:** Breaking down source code into tokens.\n2. **Parsing:** Constructing a syntax tree from tokens.\n3. **Abstract Syntax Tree (AST):** Representing programs in a tree-like structure.\n4. **Evaluation:** Walking the AST to execute programs.\n5. **Environment \u0026 Scope:** Handling variable bindings and closures.\n\n---\n\n## 📄 Reference\n\nThis project is based on **[Write an Interpreter in Go](https://interpreterbook.com/)** by Thorsten Ball. If you're interested in compilers or interpreters, this book is an excellent resource for getting started.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebyaadi%2Fmonkey-interpreter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodebyaadi%2Fmonkey-interpreter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodebyaadi%2Fmonkey-interpreter/lists"}