{"id":24756338,"url":"https://github.com/dalance/nom-recursive","last_synced_at":"2025-09-01T07:33:24.444Z","repository":{"id":47454685,"uuid":"198819290","full_name":"dalance/nom-recursive","owner":"dalance","description":"Extension of nom to handle left recursion","archived":false,"fork":false,"pushed_at":"2025-02-03T20:16:40.000Z","size":32,"stargazers_count":16,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T10:50:51.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dalance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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}},"created_at":"2019-07-25T11:32:53.000Z","updated_at":"2024-06-13T11:58:20.000Z","dependencies_parsed_at":"2025-01-28T13:51:16.263Z","dependency_job_id":"b00d553c-7722-48f4-8fb6-e33907d78aba","html_url":"https://github.com/dalance/nom-recursive","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dalance/nom-recursive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fnom-recursive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fnom-recursive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fnom-recursive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fnom-recursive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dalance","download_url":"https://codeload.github.com/dalance/nom-recursive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fnom-recursive/sbom","scorecard":{"id":317538,"data":{"date":"2025-08-11","repo":{"name":"github.com/dalance/nom-recursive","commit":"9c49ca16241cce40f66af1ddba9cb8fa731bd678"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rust.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/dalance/nom-recursive/rust.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/rust.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T00:34:42.566Z","repository_id":47454685,"created_at":"2025-08-18T00:34:42.566Z","updated_at":"2025-08-18T00:34:42.566Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273088781,"owners_count":25043562,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"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":"2025-01-28T13:51:02.257Z","updated_at":"2025-09-01T07:33:24.355Z","avatar_url":"https://github.com/dalance.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nom-recursive\nExtension of [nom](https://github.com/Geal/nom) to handle left recursion.\n\n[![Actions Status](https://github.com/dalance/nom-recursive/workflows/Regression/badge.svg)](https://github.com/dalance/nom-recursive/actions)\n[![Crates.io](https://img.shields.io/crates/v/nom-recursive.svg)](https://crates.io/crates/nom-recursive)\n[![Docs.rs](https://docs.rs/nom-recursive/badge.svg)](https://docs.rs/nom-recursive)\n\n## Requirement\n\nnom must be 5.0.0 or later.\nnom-recursive can be applied to function-style parser only.\n\nThe input type of nom parser must implement `HasRecursiveInfo` trait.\nTherefore `\u0026str` and `\u0026[u8]` can't be used.\nYou can define a wrapper type of `\u0026str` or `\u0026[u8]` and implement `HasRecursiveInfo`.\n\nAlternatively you can use `nom_locate::LocatedSpan\u003cT, RecursiveInfo\u003e`.\nThis implements `HasRecursiveInfo` in this crate.\n\n## Usage\n\n```Cargo.toml\n[dependencies]\nnom-recursive = \"0.5.1\"\n```\n\n## Example\n\n```rust\nuse nom::branch::*;\nuse nom::character::complete::*;\nuse nom::IResult;\nuse nom_locate::LocatedSpan;\nuse nom_recursive::{recursive_parser, RecursiveInfo};\n\n// Input type must implement trait HasRecursiveInfo\n// nom_locate::LocatedSpan\u003cT, RecursiveInfo\u003e implements it.\ntype Span\u003c'a\u003e = LocatedSpan\u003c\u0026'a str, RecursiveInfo\u003e;\n\npub fn expr(s: Span) -\u003e IResult\u003cSpan, String\u003e {\n    alt((expr_binary, term))(s)\n}\n\n// Apply recursive_parser by custom attribute\n#[recursive_parser]\npub fn expr_binary(s: Span) -\u003e IResult\u003cSpan, String\u003e {\n    let (s, x) = expr(s)?;\n    let (s, y) = char('+')(s)?;\n    let (s, z) = expr(s)?;\n    let ret = format!(\"{}{}{}\", x, y, z);\n    Ok((s, ret))\n}\n\npub fn term(s: Span) -\u003e IResult\u003cSpan, String\u003e {\n    let (s, x) = char('1')(s)?;\n    Ok((s, x.to_string()))\n}\n\nfn main() {\n    let ret = expr(LocatedSpan::new_extra(\"1+1\", RecursiveInfo::new()));\n    println!(\"{:?}\", ret.unwrap().1);\n}\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Fnom-recursive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdalance%2Fnom-recursive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Fnom-recursive/lists"}