{"id":14128532,"url":"https://github.com/ashutoshbsathe/yacv","last_synced_at":"2025-08-03T23:31:26.374Z","repository":{"id":47651262,"uuid":"338791868","full_name":"ashutoshbsathe/yacv","owner":"ashutoshbsathe","description":"Yet Another Compiler Visualizer","archived":false,"fork":false,"pushed_at":"2021-08-19T16:15:58.000Z","size":8208,"stargazers_count":156,"open_issues_count":2,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-08-16T16:22:34.789Z","etag":null,"topics":["compiler-construction","compiler-design","manim","parsing","python","visualization-tools"],"latest_commit_sha":null,"homepage":"https://ashutoshbsathe.github.io/yacv","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/ashutoshbsathe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-14T11:40:15.000Z","updated_at":"2024-08-06T07:03:32.000Z","dependencies_parsed_at":"2022-09-23T15:22:01.699Z","dependency_job_id":null,"html_url":"https://github.com/ashutoshbsathe/yacv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashutoshbsathe%2Fyacv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashutoshbsathe%2Fyacv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashutoshbsathe%2Fyacv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashutoshbsathe%2Fyacv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashutoshbsathe","download_url":"https://codeload.github.com/ashutoshbsathe/yacv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228571844,"owners_count":17938772,"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":["compiler-construction","compiler-design","manim","parsing","python","visualization-tools"],"created_at":"2024-08-15T16:01:48.426Z","updated_at":"2024-12-07T06:31:23.529Z","avatar_url":"https://github.com/ashutoshbsathe.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# yacv: Yet Another Compiler Visualizer\n\n`yacv` is a tool for visualizing various aspects of typical LL(1) and LR parsers. Check out [demo on YouTube](https://www.youtube.com/watch?v=BozB0O0__Qg) to see sample visualizations\n\n## Introduction\n\nGetting comfortable with parsing can be tough. While the legendary [\"Dragon Book\"](https://suif.stanford.edu/dragonbook/) is an excellent resource for everything related to compilers, it still contains very minimal visualizations for the parsing process itself. That being said, there exist visualization tools such as [LR(0) parser visualizer](https://www.cs.princeton.edu/courses/archive/spring20/cos320/LR0/) and [LL(1) parser visualizer](https://www.cs.princeton.edu/courses/archive/spring20/cos320/LL1/) by Zak Kincaid and Shaowei Zhu, [JSMachines](http://jsmachines.sourceforge.net/machines/lr1.html), [Jison](https://zaa.ch/jison/try/usf/) etc. However, all of these tools are web-based and most of them show steps in a table which isn't very intuitive\n\n`yacv` attempts to overcome all these shortcomings by using [`manim`](https://github.com/3b1b/manim) \n\n## Primary features\n`yacv` takes in a context free grammar and a string and can be used to :\n\n1. Visualize the syntax tree \n2. Visualize the LR automaton\n3. Export the parsing table \n4. Visualize the parsing process step-by-step using [manim](https://github.com/3b1b/manim)\n\n\n## Installation \n\nRequirements:\n1. Python 3.6+\n2. `pygraphviz`\n3. `pandas`\n4. `manim` : `yacv` _should_ theoretically work with both manim versions ( [ManimGL](https://github.com/3b1b/manim) or [ManimCE](https://docs.manim.community/en/v0.4.0/installation.html#installing-manim) ) but ManimCE is recommended\n\nIssues with `pycairo` ? Check [this](https://github.com/pygobject/pycairo/issues/148#issuecomment-770024652)\n\nTo install `yacv`, clone the [`yacv` repository on GitHub](https://github.com/ashutoshbsathe/yacv) to your local machine and then install using pip\n\n```bash\n$ git clone https://github.com/ashutoshbsathe/yacv \n$ cd yacv \n$ pip install -e .\n```\n\nCheck extra notes for install on Ubuntu WSL in the [docs](https://ashutoshbsathe.github.io/yacv/getting-started/#notes-for-ubuntu-wsl)\n## Usage \nTo verify installation, run `yacv` with the example configuration [`example_config.yml`](example_config.yml)\n\n```bash \n$ yacv example_config.yml \n```\n\nTo run with your own grammar and string, create your own custom config and use that instead. Examples of config files with various grammars can be found in [examples/](examples) directory\n\n## Documentation\nFor more information, please refer to the [documentation](https://ashutoshbsathe.github.io/yacv)\n\n## License\nMIT\n\n## Interesting Reads \n1. [A good, free book for interpreters](http://craftinginterpreters.com/)\n2. [GCC does not use machine generated parsers](https://stackoverflow.com/questions/6319086/are-gcc-and-clang-parsers-really-handwritten)\n3. [Why LL and LR parsing is hard ?](https://blog.reverberate.org/2013/09/ll-and-lr-in-context-why-parsing-tools.html)\n\nI have also written a blog about how I built this project . Check it out [here](https://ashutoshbsathe.github.io/blog/2021/parsing-the-parser/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashutoshbsathe%2Fyacv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashutoshbsathe%2Fyacv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashutoshbsathe%2Fyacv/lists"}