{"id":19027897,"url":"https://github.com/rexim/bnfuzzer","last_synced_at":"2025-06-22T09:35:06.407Z","repository":{"id":65294693,"uuid":"585453246","full_name":"rexim/bnfuzzer","owner":"rexim","description":"Generate random messages based on their BNF definition","archived":false,"fork":false,"pushed_at":"2025-04-10T07:45:02.000Z","size":40,"stargazers_count":87,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-20T08:08:30.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rexim.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-05T07:58:48.000Z","updated_at":"2025-04-25T18:52:38.000Z","dependencies_parsed_at":"2025-04-23T14:47:35.668Z","dependency_job_id":"9d6a9ac3-957d-436e-bbbc-4d2166789e2c","html_url":"https://github.com/rexim/bnfuzzer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rexim/bnfuzzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexim%2Fbnfuzzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexim%2Fbnfuzzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexim%2Fbnfuzzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexim%2Fbnfuzzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rexim","download_url":"https://codeload.github.com/rexim/bnfuzzer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rexim%2Fbnfuzzer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261270385,"owners_count":23133555,"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":[],"created_at":"2024-11-08T21:09:22.885Z","updated_at":"2025-06-22T09:35:01.389Z","avatar_url":"https://github.com/rexim.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BNF Fuzzer\n\nGenerate random messages based on their [BNF](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form) definition.\n\n## Quickl Start\n\nGenerate 10 random postal addresses:\n\n```console\n$ go build .\n$ ./bnfuzzer -file ./examples/postal.bnf -entry postal-address -count 10\n```\n\n## Syntax of BNF files\n\nWe are trying to support [BNF](https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form) and [ABNF](https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form) syntaxes simultenously, by allowing to use different syntactical elements for the same constructions. For example you can use `/` and `|` for [Rule Alternatives](https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form#Alternative) and even mix them up in the same file. Both of them are interpreted as aliternatives.\n\n*Maybe with some limitations we can enable support for [EBNF](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form) as well, but it's a bit difficult because EBNF uses `;` to indicate the end of the rule definition, but ABNF and BNF use it for [comments](https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form#Comment).*\n\n*The descriptions below are stolen from wikipedia.*\n\n### Comments\n\n```lisp\n; comment\n```\n\n*For some reason I also added C-style comments. Maybe I should remove them so to not create even more confusion between BNF dialects...*\n\n```c\n// comment\n```\n\n### Concatenation\n\n```lisp\nfu = %x61 ; a\nbar = %x62 ; b\nmumble = fu bar fu\n```\n\n### Alternative\n\n```lisp\nfubar = fu / bar\n```\n\nor\n\n```lisp\nfubar = fu | bar\n```\n\n### Incremental alternatives\n\nThe rule\n\n```lisp\nruleset = alt1 / alt2\nruleset =/ alt3\nruleset =/ alt4 / alt5\n```\n\nis equivalent to\n\n```lisp\nruleset = alt1 / alt2 / alt3 / alt4 / alt5\n```\n\n*Maybe to maintain the consistency with supporting mixed up syntax, we should allow to use `=|` along with `=/`...*\n\n### Value range\n\n```lisp\nOCTAL = %x30-37\n```\n\nis equivalent to\n\n```lisp\nOCTAL = \"0\" / \"1\" / \"2\" / \"3\" / \"4\" / \"5\" / \"6\" / \"7\"\n```\n\nand also can be written as\n\n```lisp\nOCTAL = \"0\" ... \"9\"\n```\n\nor\n\n```lisp\nOCTAL = \"\\x30\" ... \"\\x37\"\n```\n\n### Sequence group\n\n```lisp\ngroup = a (b / c) d\n```\n\n### Variable repetition\n\n```lisp\nn*nRule\n```\n\n### Specific repetition\n\n```lisp\nnRule\n```\n\n### Optional sequence\n\n```lisp\n[Rule]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexim%2Fbnfuzzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frexim%2Fbnfuzzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexim%2Fbnfuzzer/lists"}