{"id":21036657,"url":"https://github.com/maksasj/uroboros","last_synced_at":"2025-06-30T10:33:14.633Z","repository":{"id":244572241,"uuid":"815263586","full_name":"Maksasj/uroboros","owner":"Maksasj","description":"🐉 rust package for making parsers with parser combinators and state machines","archived":false,"fork":false,"pushed_at":"2024-06-18T19:12:05.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T16:18:34.906Z","etag":null,"topics":["package","parser","rust","uroboros"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/Maksasj.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-14T17:58:26.000Z","updated_at":"2024-06-18T19:12:08.000Z","dependencies_parsed_at":"2024-06-15T18:40:03.310Z","dependency_job_id":"8e0324cb-4251-4ddd-b5fc-cadb46001655","html_url":"https://github.com/Maksasj/uroboros","commit_stats":null,"previous_names":["maksasj/uroboros"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maksasj%2Furoboros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maksasj%2Furoboros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maksasj%2Furoboros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maksasj%2Furoboros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maksasj","download_url":"https://codeload.github.com/Maksasj/uroboros/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243476869,"owners_count":20296977,"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":["package","parser","rust","uroboros"],"created_at":"2024-11-19T13:21:24.941Z","updated_at":"2025-03-13T20:27:33.682Z","avatar_url":"https://github.com/Maksasj.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uroboros 🐉\n\n\u003e Uroboros is an ancient symbol depicting a serpent or dragon eating its own tail, this time uroboros is a rust package for making parsers\n\n## Overview\n\nUroboros is a **Rust** package for making complex parsers with parser combinators and classical state machine LL parsers with **cfg** (context-free grammars). For now this is my personal project, for learning parsing and **Rust**, so do not expect readable and reliable code 🤡\n\n*Name is highly inspired by [github.com/mame/quine-relay](https://github.com/mame/quine-relay)*\n\n\u003e uroboros is a not a new python fork ? \n\nCool looking widgets \n\u003cimg src=\"https://img.shields.io/github/license/Maksasj/uroboros\" alt=\"license\"\u003e\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Maksasj/uroboros/rust.yml)\n![GitHub Repo stars](https://img.shields.io/github/stars/Maksasj/uroboros?style=flat)\n\n### Links\n1. Source code avaiable at [github.com/Maksasj/uroboros](https://github.com/Maksasj/uroboros)\n2. **Backus-Naur form** wiki [wikipedia.org/wiki/Backus–Naur_form](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form)\n\n### Features\n- Macros for writing **Backus-Naur form** style grammars \n- **LL grammar parser** Left-to-right, leftmost derivation\n- Parser combinators such as **Token**, **Or**, **Many**\n\n## Example\nAs example we have this simple grammar written in **Backus-Naur form**:\n\n```bash\n\u003cexpr\u003e := \u003cterm\u003e '=' \u003cterm\u003e\n\u003cterm\u003e := \u003cterm\u003e '+' \u003cnum\u003e | \u003cnum\u003e\n\u003cnum\u003e := 'x' | 'y' | ...\n```\n\nWith **uroboros** you can write previous grammar in **Rust** like this(Note `Token` is a enum, that represents all terminals)\n \n```rust\nlet _: Grammar\u003cToken\u003e = gram![\n    (\"expr\" =\u003e (\"term\", Token::Equal, \"term\")),\n    (\"term\" =\u003e (\"term\", Token::Plus, \"num\") | (\"num\")),\n    (\"num\" =\u003e (Token::VariableLiteral))\n];\n```\n\nNow you can use this structure in parsing, or modify gramma it self for example removing left recursion with **remove_left_recursion()** method. \n\n## License\nuroboros is free, open source library. All code in this repository is licensed under\n- MIT License ([LICENSE.md](https://github.com/Maksasj/uroboros/blob/master/LICENSE.md) or https://opensource.org/license/mit/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaksasj%2Furoboros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaksasj%2Furoboros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaksasj%2Furoboros/lists"}