{"id":27055089,"url":"https://github.com/antlr-ng/antlr-format","last_synced_at":"2025-04-05T09:18:53.462Z","repository":{"id":207788343,"uuid":"719951375","full_name":"antlr-ng/antlr-format","owner":"antlr-ng","description":"A tool to format ANTLR grammars","archived":false,"fork":false,"pushed_at":"2024-12-01T09:26:35.000Z","size":1299,"stargazers_count":8,"open_issues_count":7,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T16:41:12.398Z","etag":null,"topics":["antlr","antlr-ng","open-source","typescript"],"latest_commit_sha":null,"homepage":null,"language":"ANTLR","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/antlr-ng.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","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":"2023-11-17T08:55:45.000Z","updated_at":"2025-03-28T15:22:08.000Z","dependencies_parsed_at":"2023-11-22T14:35:33.237Z","dependency_job_id":"9948b4fd-3417-4055-8b94-294ec9db8525","html_url":"https://github.com/antlr-ng/antlr-format","commit_stats":null,"previous_names":["mike-lischke/antlr-format","antlr-ng/antlr-format"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlr-ng%2Fantlr-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlr-ng%2Fantlr-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlr-ng%2Fantlr-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/antlr-ng%2Fantlr-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/antlr-ng","download_url":"https://codeload.github.com/antlr-ng/antlr-format/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312196,"owners_count":20918384,"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":["antlr","antlr-ng","open-source","typescript"],"created_at":"2025-04-05T09:18:52.885Z","updated_at":"2025-04-05T09:18:53.441Z","avatar_url":"https://github.com/antlr-ng.png","language":"ANTLR","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Weekly Downloads](https://img.shields.io/npm/dw/antlr-format?style=for-the-badge\u0026color=blue)](https://www.npmjs.com/package/antlr-format)\n[![npm version](https://img.shields.io/npm/v/antlr-format?style=for-the-badge\u0026color=yellow)](https://www.npmjs.com/package/antlr-format)\n\n# \u003cimg src=\"https://raw.githubusercontent.com/mike-lischke/antlr-format/master/images/formatter-title.png\" alt=\"antlr-format\"\u003e\n\nThe `antlr-format` package provides a small library to format your ANTLR4 grammar in a wide variety of ways. It has a companion named `antlr-format-cli` which provides a terminal command for running the formatter in batch files and so on. You can read more about it in its own [Readme](cli/ReadMe.md).\n\n## Installation\n\nNothing special here, just use NPM (or any other package manager):\n\n```bash\nnpm i antlr-format\n```\n\n## Usage\n\nRead the [formatter documentation](doc/formatting.md) for further details and a code example.\n\n## Release Notes\n\n### 2.1.4 - 2.1.5\n\n- Updated dependencies.\n\n### 2.1.3\n\n- Stop including 3rd party libs in bundle.\n- Updated dependencies.\n\n### 2.1.2\n\nUpdated dependencies\n\n### 2.1.1\n\nFixed bug #2 antlr-format produces output that isn't a fixed point, removes comments\n\n### 2.1.0\n\nMade `useTab` false by default. No idea why I made this true by default. I hate tabs in source files.\n\n### 2.0.3 - 2.0.4\n\n- Fixed bug where rule names after block comments where not placed on an own line;\n- Added support for colons in blocks, which are optional and may align with alts just like on rule level.\n- Added support for rule options, which are formatted like global options.\n- Fixed a bug where the formatter added formatting options, even if there were already some in the grammar.\n\n### 2.0.2\n\nFixed a problem related to getting raw content for output in the formatter (e.g. action text). Also changed a number of imports/settings to fix a problem with debugging the formatter in VS Code.\n\n### 2.0.1\n\nAdded missing type definition entry in package.json.\n\n### 2.0.0\n\nBREAKING CHANGE:\n\nThe package has been split into a [cli wrapper](https://www.npmjs.com/package/antlr-format-cli) and the actual formatter class. This avoids inclusion of otherwise unnecessary packages, when importing this package and works around a problem with esbuild when mixing ESM and CommonJS modules running in Node.js (for example using Jest with ts-jest).\n\nAdditionally, the `GrammarFormatter` class now accepts a string with the grammar content and does the tokenization on its own. This avoids that you have to run the ANTLRv4 lexer manually (or even care for it at all).\n\n### 1.0.0\n\nThis is the initial release of the package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantlr-ng%2Fantlr-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantlr-ng%2Fantlr-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantlr-ng%2Fantlr-format/lists"}