{"id":17537706,"url":"https://github.com/bates64/nearley-make","last_synced_at":"2026-01-12T05:57:20.039Z","repository":{"id":57309581,"uuid":"63793017","full_name":"bates64/nearley-make","owner":"bates64","description":"Compile nearley grammars at run-time","archived":false,"fork":false,"pushed_at":"2017-06-27T16:03:35.000Z","size":5,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-30T22:51:37.377Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/nearley-make","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/bates64.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-20T15:35:03.000Z","updated_at":"2019-09-11T17:32:38.000Z","dependencies_parsed_at":"2022-09-07T20:21:07.760Z","dependency_job_id":null,"html_url":"https://github.com/bates64/nearley-make","commit_stats":null,"previous_names":["nanalan/nearley-make","bates64/nearley-make","nanaian/nearley-make"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bates64/nearley-make","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fnearley-make","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fnearley-make/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fnearley-make/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fnearley-make/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bates64","download_url":"https://codeload.github.com/bates64/nearley-make/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bates64%2Fnearley-make/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28335927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"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":"2024-10-20T20:42:35.420Z","updated_at":"2026-01-12T05:57:20.024Z","avatar_url":"https://github.com/bates64.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nearley-make\n\u003e Compile [nearley](https://github.com/Hardmath123/nearley/) grammars at run-time\n\n`nearley-make` allows you to use [nearley](https://github.com/Hardmath123/nearley/) in Node.js, without requiring you to compile your grammar first.\n\nVery useful for debug/development modes.\n\n## Install\n```sh\n$ npm install nearley-make --save\n```\n\n## Usage\nExamples speak 1000 words.\n\n```js\nconst make = require('nearley-make')\nconst fs = require('fs')\n\nconst grammar = fs.readFileSync('grammar.ne', 'utf-8') // note that this is a *nearley* file\nconst parser = make(grammar, {\n  // anything you want to expose to the grammar as variables\n  // for example builtins or flavour settings\n  output: 'Hello, World!',\n  \n  // if you want to use `require` in your grammar, make sure you do the following:\n  require: require\n})\n\nconst trees = parser.feed('the usual').results\nconst tree = trees[0]\n\n// logs \"Hello, World!\"\nconsole.log(tree)\n```\n\n```python\n# grammar.ne\nmain -\u003e \"the usual\" {% d =\u003e output %} # output the exposed \"output\" variable\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbates64%2Fnearley-make","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbates64%2Fnearley-make","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbates64%2Fnearley-make/lists"}