{"id":22710561,"url":"https://github.com/smallhelm/nearley-unparse","last_synced_at":"2025-08-07T15:31:26.067Z","repository":{"id":57309599,"uuid":"63650084","full_name":"smallhelm/nearley-unparse","owner":"smallhelm","description":"JavaScript API to \"unparse\" any nearley grammar. Also allows overrides for given grammar rules.","archived":false,"fork":false,"pushed_at":"2016-07-19T18:15:14.000Z","size":6,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-29T15:46:09.711Z","etag":null,"topics":["grammar","nearley","nearley-grammar","nearley-unparse","unparse"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/smallhelm.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}},"created_at":"2016-07-19T01:42:50.000Z","updated_at":"2023-08-08T09:39:28.000Z","dependencies_parsed_at":"2022-09-07T20:21:23.816Z","dependency_job_id":null,"html_url":"https://github.com/smallhelm/nearley-unparse","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fnearley-unparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fnearley-unparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fnearley-unparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallhelm%2Fnearley-unparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallhelm","download_url":"https://codeload.github.com/smallhelm/nearley-unparse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229057638,"owners_count":18013289,"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":["grammar","nearley","nearley-grammar","nearley-unparse","unparse"],"created_at":"2024-12-10T12:10:30.427Z","updated_at":"2024-12-10T12:10:31.112Z","avatar_url":"https://github.com/smallhelm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nearley-unparse\n\n[![build status](https://secure.travis-ci.org/smallhelm/nearley-unparse.svg)](https://travis-ci.org/smallhelm/nearley-unparse)\n\nJavaScript API to \"unparse\" any nearley grammar. Also allows overrides for given grammar rules.\n\n```js\nvar unparse = require(\"nearley-unparse\");\n\n//somehow import your compiled grammar\nvar grammar = require(\"./grammar\");\n\nvar src = unparse(grammar);\n//BAM! Now you have generated some src that will parse.\n```\n\n## API\n### src = unparse(grammar[, options])\n * `options.start` which rule to start the unparser. (default: `grammar.ParserStart`)\n * `options.override_rule` a map where the keys are the rule name and the value is a function that returns a string for that rule.\n * `options.filterRule` a function that will take in a rule and return true if it should be selected. This is handy when you want to exclude rules like paren wrapping so it doesn't just output something like this: `(((((1)))))`\n * `options.max_stack_size` useful to limit how deeply nested rules are. (default: 25)\n * `options.max_loops` useful to keep it from running \"forever\". (default: 500)\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Fnearley-unparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallhelm%2Fnearley-unparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallhelm%2Fnearley-unparse/lists"}