{"id":16334507,"url":"https://github.com/traxys/stelar","last_synced_at":"2025-09-10T14:11:13.369Z","repository":{"id":57668632,"uuid":"197773796","full_name":"traxys/stelar","owner":"traxys","description":"stelar is an SLR parser","archived":false,"fork":false,"pushed_at":"2019-08-10T15:57:39.000Z","size":916,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T06:44:28.659Z","etag":null,"topics":["parser-library","rust","slr-parser"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/traxys.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}},"created_at":"2019-07-19T13:02:57.000Z","updated_at":"2019-09-12T21:54:34.000Z","dependencies_parsed_at":"2022-08-27T03:50:21.270Z","dependency_job_id":null,"html_url":"https://github.com/traxys/stelar","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/traxys%2Fstelar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traxys%2Fstelar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traxys%2Fstelar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/traxys%2Fstelar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/traxys","download_url":"https://codeload.github.com/traxys/stelar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239358508,"owners_count":19625503,"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":["parser-library","rust","slr-parser"],"created_at":"2024-10-10T23:38:35.074Z","updated_at":"2025-02-17T20:21:44.136Z","avatar_url":"https://github.com/traxys.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stelar\nstelar is an SLR parser\n\nWhy stelar ? Because SteLaR.\n\nThe generation of the SLR parse table is absolutely not optimized, as such you should generate it once, save it somewhere by serializing it with serde and get it back that way\n\n## Usage\n\nYou will need to define two types, `T` and `NT`, both need to be `Hash + Clone + PartialEq + Eq`.\n\nMorever if you want more meaningfull errors you should have `Debug`.\n\n`T` is the token, or terminal type, representing the input values.\n`NT` are the grammar construct.\n\nYou then have to define rules of the form `(NT, Vec\u003cSymbol\u003cT, NT\u003e\u003e)` and call `create_rules`.\n\nTo make the rule definition easier there is a macro `rule_rhs![]`, it works by creating a `Vec` of symbols such that `[..., Foo, ...]` is mapped to `Symbol::Terminal(Foo)` and `[...., (Bar), ....]` is mapped to `Symbol::NonTerminal(Bar)`.\n\nAnd a grammar `g` is a `Vec` of such rules, such that `g[i].index == i`.\n\nWith this grammar you can generate a `ParseTable\u003cT, NT\u003e`.\n\nYou will then need an iterator of `ValuedToken\u003cT, V\u003e`, being a token `T` maybe associated with a Value `V` (`Option\u003cV\u003e`).\n\nWith this you can create and parse data.\n\n## Example\nAn example of how evrything is done is provided in `calc_grammar`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraxys%2Fstelar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftraxys%2Fstelar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftraxys%2Fstelar/lists"}