{"id":22499719,"url":"https://github.com/mahdavipanah/pycfg","last_synced_at":"2025-08-03T06:32:18.203Z","repository":{"id":146016656,"uuid":"78268786","full_name":"mahdavipanah/pyCFG","owner":"mahdavipanah","description":"Context Free Grammar(CFG) parser library and application written in Python.","archived":false,"fork":false,"pushed_at":"2023-11-22T15:44:50.000Z","size":100,"stargazers_count":18,"open_issues_count":2,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-09T16:42:43.493Z","etag":null,"topics":["algorithm","automata","cfg","python","tkinter"],"latest_commit_sha":null,"homepage":"","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/mahdavipanah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-01-07T08:52:05.000Z","updated_at":"2024-03-10T01:59:11.000Z","dependencies_parsed_at":"2023-11-22T16:52:44.948Z","dependency_job_id":null,"html_url":"https://github.com/mahdavipanah/pyCFG","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdavipanah%2FpyCFG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdavipanah%2FpyCFG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdavipanah%2FpyCFG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdavipanah%2FpyCFG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahdavipanah","download_url":"https://codeload.github.com/mahdavipanah/pyCFG/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228532126,"owners_count":17933248,"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":["algorithm","automata","cfg","python","tkinter"],"created_at":"2024-12-06T22:15:34.252Z","updated_at":"2024-12-06T22:15:34.867Z","avatar_url":"https://github.com/mahdavipanah.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pyCFG is an application and library for working with context free grammars (CFG) in [Python](https://www.python.org/).\nIt uses [tkinter](https://wiki.python.org/moin/TkInter) for it's graphical interface.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/screenshot.png\" alt=\"pyCFG app screenshot\"\u003e\n\u003c/p\u003e\n\n## Installing application\n\n### Prerequisites\n- [Python3.5+](https://www.python.org/)\n- [tkinter](https://wiki.python.org/moin/TkInter)\n\n### Running\n\n```bash\n$ python pycfg.py\n```\n\n### Windows\n\nYou can download pyCFG's binary for windows from [Here](https://github.com/mahdavipanah/pyCFG/releases).\n\n## Using library\npyCFG library is in `cfg.py` module and can be imported and be used easily. For example:\n```Python\nfrom cfg import CFG\n\ng = CFG(terminals={'a', 'b', 'c', 'λ'},\n        rules={'S': ['aSa', 'bSb', 'cSc', 'λ']}\n        )\n\nstring = input(\"Enter a string: \")\n\nif g.cyk(string):\n    print(\"Grammar can generate the string!\")\nelse:\n    print(\"Grammar cannot generate the string!\")\n```\nAbove program gets a string from input and tells if the defined grammer can generate the string or not.\n\n## Tests\n\nIf you want to test, make sure that `pytest` is installed, then run:\n\n~~~bash\npytest test.py\n~~~\n\n## Author\n\nHamidreza Mahdavipanah\n\n### Contributors\n\n- Lucas Seiki Oshiro\n\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahdavipanah%2Fpycfg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahdavipanah%2Fpycfg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahdavipanah%2Fpycfg/lists"}