{"id":19623874,"url":"https://github.com/sr1jan/grok-compiler","last_synced_at":"2026-05-27T16:31:05.943Z","repository":{"id":95678132,"uuid":"356434494","full_name":"sr1jan/grok-compiler","owner":"sr1jan","description":"grokking compilers...","archived":false,"fork":false,"pushed_at":"2021-04-12T05:31:59.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T19:39:25.229Z","etag":null,"topics":["compiler","compiler-construction","compiler-design","compiler-principles","compilers","computer-science","education","educational"],"latest_commit_sha":null,"homepage":"","language":"Python","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/sr1jan.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":"2021-04-10T01:03:25.000Z","updated_at":"2023-01-27T00:41:04.000Z","dependencies_parsed_at":"2023-03-31T05:11:27.640Z","dependency_job_id":null,"html_url":"https://github.com/sr1jan/grok-compiler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sr1jan/grok-compiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr1jan%2Fgrok-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr1jan%2Fgrok-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr1jan%2Fgrok-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr1jan%2Fgrok-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sr1jan","download_url":"https://codeload.github.com/sr1jan/grok-compiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr1jan%2Fgrok-compiler/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33575510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["compiler","compiler-construction","compiler-design","compiler-principles","compilers","computer-science","education","educational"],"created_at":"2024-11-11T11:35:54.701Z","updated_at":"2026-05-27T16:31:05.917Z","avatar_url":"https://github.com/sr1jan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# init(grok-compiler)\n\nwhile (grok \u003c '100%' || !bored): \n    continue\n\n\n## Syntax Analysis\n- First and Follow ([code](https://github.com/sr1jan/grok-compiler/blob/master/firstnfollow.py))\n    - Both **First** and **Follow** helps the compiler to optimize the construction of parse/syntax tree inorder to verify syntax correctness\n    of the input string (code).\n    - **First** precomputes the correct node of a production rule hence saving the compiler from backtracking to retrieve the node needed to generate the string from the parse tree.\n    - **Follow** helps when a production rule fails to return the required [terminal value](https://en.wikipedia.org/wiki/Terminal_and_nonterminal_symbols). It basically lets the compiler to jump to a different node by applying the ε (epsilon) value and thereby vanishes the non-terminal value to generate the string. \n\n\n### References\n- [Compilers by Alex Aiken](https://archive.org/details/academictorrents_e31e54905c7b2669c81fe164de2859be4697013a) (Internet Archive \u003c3)\n- Python's regular expression implementation: [re](https://github.com/python/cpython/blob/master/Modules/_sre.c)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsr1jan%2Fgrok-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsr1jan%2Fgrok-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsr1jan%2Fgrok-compiler/lists"}