https://github.com/j6k4m8/catl-parser
A small TypeScript parser for CATL (Chord and Tab Language): a compact text format for guitar chords and tab events.
https://github.com/j6k4m8/catl-parser
chords guitar guitar-chords music music-notation notation tablature
Last synced: 6 days ago
JSON representation
A small TypeScript parser for CATL (Chord and Tab Language): a compact text format for guitar chords and tab events.
- Host: GitHub
- URL: https://github.com/j6k4m8/catl-parser
- Owner: j6k4m8
- Created: 2026-01-04T06:16:29.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-02-14T03:10:59.000Z (about 2 months ago)
- Last Synced: 2026-02-14T10:09:40.157Z (about 2 months ago)
- Topics: chords, guitar, guitar-chords, music, music-notation, notation, tablature
- Language: TypeScript
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @j6k4m8/catl-parser
 [](https://github.com/j6k4m8/catl)
> **Latest supported CATL version:** [v0.1](https://github.com/j6k4m8/catl)
A small TypeScript parser for [**CATL** (Chord and Tab Language)](https://github.com/j6k4m8/catl/): a compact text format for guitar chords and tab events.
This package provides:
- a lexer + parser
- an AST
- diagnostics with spans (line/col)
## Install
```bash
npm i @j6k4m8/catl-parser
```
## Usage
```ts
import { parseCATL } from "@j6k4m8/catl-parser";
const src = `
# chords
"Gmin7":3x332x:"Nice chord!" | X554X5
|: X554X5 | X554X5 :|
# events
{eBGDAE}
0A:"When" 0D 5e:"you" 7B 3e+0D:"fall in love"
0@5 0@4 5@1 7@2 3@1+0@4
`;
const ast = parseCATL(src);
console.log(ast.diagnostics);
console.log(ast.lines);
```