{"id":20540309,"url":"https://github.com/wokwi/hdl-parser","last_synced_at":"2026-03-10T12:33:18.568Z","repository":{"id":57262012,"uuid":"411013437","full_name":"wokwi/hdl-parser","owner":"wokwi","description":"Parser for nand2tetris HDL (Hardware Description Language), written in JavaScript","archived":false,"fork":false,"pushed_at":"2022-03-09T11:56:52.000Z","size":23,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T07:43:03.956Z","etag":null,"topics":["hdl","nand2tetris","parser","peggy"],"latest_commit_sha":null,"homepage":"","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/wokwi.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":"2021-09-27T19:16:04.000Z","updated_at":"2022-01-09T13:38:53.000Z","dependencies_parsed_at":"2022-08-25T06:11:06.417Z","dependency_job_id":null,"html_url":"https://github.com/wokwi/hdl-parser","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/wokwi/hdl-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wokwi%2Fhdl-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wokwi%2Fhdl-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wokwi%2Fhdl-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wokwi%2Fhdl-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wokwi","download_url":"https://codeload.github.com/wokwi/hdl-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wokwi%2Fhdl-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30333509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hdl","nand2tetris","parser","peggy"],"created_at":"2024-11-16T01:11:46.609Z","updated_at":"2026-03-10T12:33:18.545Z","avatar_url":"https://github.com/wokwi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hdl-parser\n\nParser for [nand2tetris](https://www.nand2tetris.org/) HDL (Hardware Description Language), built on top of [Peggy](https://peggyjs.org/).\n\n[![Build Status](https://travis-ci.org/wokwi/hdl-parser.png?branch=master)](https://travis-ci.org/wokwi/hdl-parser)\n[![NPM Version](https://img.shields.io/npm/v/hdl-parser)](https://www.npmjs.com/package/hdl-parser)\n![License: MIT](https://img.shields.io/npm/l/hdl-parser)\n![Types: TypeScript](https://img.shields.io/npm/types/hdl-parser)\n\n## Usage example\n\n```javascript\nconst { parse } = require('hdl-parser');\n\nconsole.log(parse(`\n  CHIP Not {\n    IN in;\n    OUT out;\n\n    PARTS:\n    Nand(a=in, b=true, out=out);\n  }\n`));\n```\n\nAnd the result:\n\n```js\n({\n  name: 'Not',\n  definitions: [\n    { type: 'IN', pins: [{ name: 'in', bits: 1 }] },\n    { type: 'OUT', pins: [{ name: 'out', bits: 1 }] },\n  ],\n  parts: [\n    {\n      name: 'Nand',\n      connections: [\n        { from: { pin: 'a', bits: null }, to: { pin: 'in', bits: null } },\n        { from: { pin: 'b', bits: null }, to: { const: 'true' } },\n        { from: { pin: 'out', bits: null }, to: { pin: 'out', bits: null } },\n      ],\n    },\n  ],\n})\n```\n\nFor more examples, see the [tests file](tests.js).\n\n## License\n\nReleased under the terms of [the MIT licence](LICENSE). Copyright (c) 2021, Uri Shaked.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwokwi%2Fhdl-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwokwi%2Fhdl-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwokwi%2Fhdl-parser/lists"}