{"id":47899131,"url":"https://github.com/almide/almide-grammar","last_synced_at":"2026-04-04T04:00:34.660Z","repository":{"id":344184435,"uuid":"1180830838","full_name":"almide/almide-grammar","owner":"almide","description":"Single source of truth for Almide language grammar — keywords, operators, precedence","archived":false,"fork":false,"pushed_at":"2026-03-24T14:10:18.000Z","size":2957,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-25T17:28:37.217Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/almide.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-13T13:09:08.000Z","updated_at":"2026-03-24T14:10:26.000Z","dependencies_parsed_at":"2026-04-04T04:00:18.715Z","dependency_job_id":null,"html_url":"https://github.com/almide/almide-grammar","commit_stats":null,"previous_names":["almide/almide-grammar"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/almide/almide-grammar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almide%2Falmide-grammar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almide%2Falmide-grammar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almide%2Falmide-grammar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almide%2Falmide-grammar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/almide","download_url":"https://codeload.github.com/almide/almide-grammar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almide%2Falmide-grammar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31387024,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T01:22:39.193Z","status":"online","status_checked_at":"2026-04-04T02:00:07.569Z","response_time":60,"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":[],"created_at":"2026-04-04T04:00:16.434Z","updated_at":"2026-04-04T04:00:34.651Z","avatar_url":"https://github.com/almide.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# almide-grammar\n\nSingle source of truth for Almide syntax definitions — keywords, operators, precedence, and TextMate scopes.\n\nWritten in [Almide](https://github.com/almide/almide). All consumers import this module to stay in sync.\n\n## Usage\n\n### As an Almide dependency\n\nAdd to your `almide.toml`:\n\n```toml\n[dependencies]\nalmide-grammar = { git = \"https://github.com/almide/almide-grammar\", tag = \"v0.1.0\" }\n```\n\nThen import:\n\n```almide\nimport almide_grammar\n\nfor group in almide_grammar.keyword_groups() {\n  println(group.category ++ \": \" ++ string.join(group.words, \" \"))\n}\n```\n\n### As a CLI\n\n```bash\nalmide run almide-grammar \u003ctarget\u003e\n```\n\n| Target | Output |\n|--------|--------|\n| `tree-sitter` | Keyword rules + precedence for grammar.js |\n| `textmate` | JSON patterns for tmLanguage |\n| `rust` | Keyword map + `ALL_KEYWORDS` for the compiler lexer |\n| `info` | Human-readable summary of all keywords and precedence |\n\n## API\n\n| Function | Return type | Description |\n|----------|-------------|-------------|\n| `keyword_groups()` | `List[KeywordGroup]` | 5 groups: control, declaration, modifier, value, flow |\n| `keyword_aliases()` | `List[(String, String)]` | Case aliases: `Ok`→`ok`, `Err`→`err`, `Some`→`some`, `None`→`none` |\n| `precedence_table()` | `List[PrecLevel]` | 8 levels from pipe (1) to unary (8) |\n| `all_keywords()` | `List[String]` | All 35 keywords, sorted |\n\n## Structure\n\n```\nalmide-grammar/\n  almide.toml         package: almide_grammar v0.1.0\n  tokens.toml         keyword/operator definitions (for compiler build.rs)\n  precedence.toml     operator precedence table (for compiler build.rs)\n  src/\n    mod.almd          library entry point — all data definitions\n    main.almd         CLI — imports mod.almd via `import self as grammar`\n```\n\n## Consumers\n\n| Project | How it uses almide-grammar |\n|---------|---------------------------|\n| [almide](https://github.com/almide/almide) (compiler) | `build.rs` reads `tokens.toml` / `precedence.toml` → generates `src/generated/token_table.rs` |\n| [almide-editors](https://github.com/almide/almide-editors) | Almide dependency → `import almide_grammar` in TextMate generator |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmide%2Falmide-grammar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falmide%2Falmide-grammar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmide%2Falmide-grammar/lists"}