{"id":19361297,"url":"https://github.com/zmitchell/sentence-parser","last_synced_at":"2026-06-13T03:34:10.318Z","repository":{"id":134799503,"uuid":"269211601","full_name":"zmitchell/sentence-parser","owner":"zmitchell","description":"An example of using proptest to test a parser","archived":false,"fork":false,"pushed_at":"2020-06-03T23:40:01.000Z","size":13,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-18T03:02:53.196Z","etag":null,"topics":["parsing","property-based-testing","rust"],"latest_commit_sha":null,"homepage":null,"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/zmitchell.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}},"created_at":"2020-06-03T22:56:05.000Z","updated_at":"2020-06-29T16:07:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"e189d2ed-3c8f-40d1-ad72-0485d884aca3","html_url":"https://github.com/zmitchell/sentence-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zmitchell/sentence-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fsentence-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fsentence-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fsentence-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fsentence-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zmitchell","download_url":"https://codeload.github.com/zmitchell/sentence-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zmitchell%2Fsentence-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34271500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"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":["parsing","property-based-testing","rust"],"created_at":"2024-11-10T07:21:47.133Z","updated_at":"2026-06-13T03:34:10.300Z","avatar_url":"https://github.com/zmitchell.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sentence-parser\n\nThis is a very basic parser meant to be an example of how to use `proptest` to write property-based tests in Rust.\n\nThis parser attempts to parse a sentence, with a very loose definition of \"sentence.\" We define a \"word\" to be any sequence of one or more ASCII letters (case doesn't matter). Some of the words may also be enclosed in delimiters such as commas or parentheses. A \"sentence\" then consists of a sequence of words, some of which may be enclosed in delimiters, followed by valid punctuation (period, question mark, or exclamation point). In this framework `(a) b.` is a valid sentence.\n\nThe `pest` crate is used to write the parser because the grammar file lets you declaratively define the parsing rules. This is the entire definition of the parser:\n```\nword = { ASCII_ALPHA+ }\nwords = ${ word ~ (\" \" ~ word)* }\nenclosed = ${\n    \"(\" ~ words ~ \")\" |\n    \", \" ~ words ~ \",\"\n}\nchunk = ${ words | enclosed }\npunctuation = { \".\" | \"!\" | \"?\" }\nsentence = ${ SOI ~ chunk ~ (\" \" ~ chunk)* ~ punctuation ~ EOI }\nWHITESPACE = _{\" \"}\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%2Fzmitchell%2Fsentence-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzmitchell%2Fsentence-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzmitchell%2Fsentence-parser/lists"}