{"id":18044609,"url":"https://github.com/qu1x/bml","last_synced_at":"2025-04-10T01:06:21.533Z","repository":{"id":57520096,"uuid":"185636166","full_name":"qu1x/bml","owner":"qu1x","description":"BML Markup Language","archived":false,"fork":false,"pushed_at":"2023-02-23T10:56:38.000Z","size":30,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T01:06:16.310Z","etag":null,"topics":["bml","bsnes","higan","icarus","markup-language","parser","pest","rust-lang"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/qu1x.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}},"created_at":"2019-05-08T15:45:25.000Z","updated_at":"2023-03-08T20:06:50.000Z","dependencies_parsed_at":"2022-09-05T11:30:16.316Z","dependency_job_id":null,"html_url":"https://github.com/qu1x/bml","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qu1x%2Fbml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qu1x%2Fbml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qu1x%2Fbml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qu1x%2Fbml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qu1x","download_url":"https://codeload.github.com/qu1x/bml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137888,"owners_count":21053775,"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":["bml","bsnes","higan","icarus","markup-language","parser","pest","rust-lang"],"created_at":"2024-10-30T18:09:36.208Z","updated_at":"2025-04-10T01:06:21.508Z","avatar_url":"https://github.com/qu1x.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bml\n\nBML Markup Language\n\n[![Build][]](https://github.com/qu1x/bml/actions/workflows/build.yml)\n[![Documentation][]](https://docs.rs/bml)\n[![Downloads][]](https://crates.io/crates/bml)\n[![Version][]](https://crates.io/crates/bml)\n[![Rust][]](https://www.rust-lang.org)\n[![License][]](https://opensource.org/licenses/ISC)\n\n[Build]: https://github.com/qu1x/bml/actions/workflows/build.yml/badge.svg\n[Documentation]: https://docs.rs/bml/badge.svg\n[Downloads]: https://img.shields.io/crates/d/bml.svg\n[Version]: https://img.shields.io/crates/v/bml.svg\n[Rust]: https://img.shields.io/badge/rust-stable-brightgreen.svg\n[License]: https://img.shields.io/crates/l/bml.svg\n\n[BML] is a simplified [XML] used as static [database], see the [grammar] using [PEG] as input for\nthe [pest] parser.\n\nIn contrast to its C++ [reference] implementation, this Rust implementation parses indents by\npushing them on a stack to compare them instead of counting characters (stack-based-indent) and it\nallows tabulators between attributes (tabular-attributes) and between colons and multi-line data\n(tabular-colon-data) supporting tabulator-based along with space-based alignments.\n\nSyntax highlighting is trivial, see [vim-bml].\n\n[BML]: https://news.ycombinator.com/item?id=8645591\n[XML]: https://en.wikipedia.org/wiki/XML\n[database]: https://github.com/ares-emulator/ares/tree/master/mia/Database\n[grammar]: https://github.com/qu1x/bml/blob/main/src/bml.pest\n[PEG]: https://en.wikipedia.org/wiki/Parsing_expression_grammar\n[pest]: https://pest.rs/\n[reference]: https://github.com/ares-emulator/ares/blob/master/nall/string/markup/bml.hpp\n[vim-bml]: https://github.com/qu1x/vim-bml\n\n## Examples\n\n```rust\nuse bml::BmlNode;\n\nlet root = BmlNode::try_from(concat!(\n\t\"server\\n\",\n\t\"  path: /core/www/\\n\",\n\t\"  host: example.com\\n\",\n\t\"  port: 80\\n\",\n\t\"  service: true\\n\",\n\t\"  proxy\\n\",\n\t\"    host: proxy.example.com\\n\",\n\t\"    port: 8080\\n\",\n\t\"    authentication: plain\\n\",\n\t\"  description\\n\",\n\t\"    :Primary web-facing server\\n\",\n\t\"    :Provides commerce-related functionality\\n\",\n\t\"\\n\",\n\t\"server\\n\",\n\t\"  // ...\\n\",\n\t\"  proxy host=\\\"proxy.example.com\\\" port=\\\"8080\\\"\\n\",\n\t\"    authentication: plain\\n\",\n)).unwrap();\n\nlet (name, node) = root.nodes().next().unwrap();\n\nassert_eq!(name, \"server\");\nassert_eq!(node.named(\"port\").next().unwrap().value(), \"80\");\n```\n\n## License\n\nLicensed under `ISC`.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the\nworks by you shall be licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqu1x%2Fbml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqu1x%2Fbml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqu1x%2Fbml/lists"}