# mlc-ai/xgrammar SLOC report

> mlc-ai/xgrammar: 51,302 code lines at commit 614ab01d2af3, counted with tokei-14.0.0 on 2026-10-18. Saved result f857c44d9a6e8a55baeb4780d7ad6d04f1079c8ebdd9bbb88ae431884035b73e.

mlc-ai/xgrammar has 51,302 source lines of code out of 63,427 total lines across 153 files, counted from the main ref at commit 614ab01d2af3 by the OctoCounts tokei engine on 2026-10-18. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving mlc-ai/xgrammar to commit 614ab01d2af3, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.

## Repository size insights

This is a medium-sized codebase by counted code lines. Code represents 80.9% of all lines, comments represent 10.8%, and the repository averages 335 code lines per file. C++ accounts for 53.8% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C++ | 33 | 32,253 | 27,587 | 2,222 | 2,444 |
| Python | 28 | 8,699 | 7,633 | 213 | 853 |
| C Header | 44 | 12,250 | 7,160 | 3,544 | 1,546 |
| JSON | 5 | 6,881 | 6,881 | 0 | 0 |
| TypeScript | 4 | 1,293 | 782 | 407 | 104 |
| CUDA | 1 | 286 | 237 | 18 | 31 |
| Sass | 1 | 238 | 200 | 1 | 37 |
| Shell | 11 | 324 | 199 | 64 | 61 |
| CMake | 5 | 218 | 178 | 14 | 26 |
| TOML | 1 | 188 | 126 | 34 | 28 |
| SVG | 3 | 111 | 104 | 0 | 7 |
| JavaScript | 3 | 80 | 72 | 0 | 8 |
| HTML | 4 | 64 | 61 | 0 | 3 |
| Swift | 1 | 59 | 41 | 16 | 2 |
| YAML | 2 | 61 | 41 | 6 | 14 |
| Markdown | 7 | 422 | 0 | 296 | 126 |

Top language (C++ 53.8%). Generated at 2026-10-18T23:08:27.315148422Z. Canonical report: https://octocounts.com/github/mlc-ai/xgrammar/commit/614ab01d2af3fdfdde73ae3e4171a7f36db45c23?reportId=f857c44d9a6e8a55baeb4780d7ad6d04f1079c8ebdd9bbb88ae431884035b73e&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/mlc-ai/xgrammar/commit/614ab01d2af3fdfdde73ae3e4171a7f36db45c23?reportId=f857c44d9a6e8a55baeb4780d7ad6d04f1079c8ebdd9bbb88ae431884035b73e&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does mlc-ai/xgrammar have?

mlc-ai/xgrammar has 63,427 total lines, including 51,302 code lines, 6,835 comment lines, and 5,290 blank lines.

### How was the mlc-ai/xgrammar line count measured?

OctoCounts resolved the public GitHub repository to commit 614ab01d2af3, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for mlc-ai/xgrammar?

This OctoCounts report was generated from main at commit 614ab01d2af3 on 2026-10-18T23:08:27.315148422Z.

## Similar repository reports

- [mawww/kakoune](https://octocounts.com/github/mawww/kakoune) — C++, 51,138 code lines
- [apinprastya/sultan](https://octocounts.com/github/apinprastya/sultan) — C++, 50,995 code lines
- [czyt1988/SARibbon](https://octocounts.com/github/czyt1988/SARibbon) — C++, 52,020 code lines
- [AmmarkoV/SAM3DBody-cpp](https://octocounts.com/github/AmmarkoV/SAM3DBody-cpp) — C++, 52,389 code lines
- [Tencent/MMKV](https://octocounts.com/github/Tencent/MMKV) — C++, 47,992 code lines
- [theosw/theosrenderpipeline](https://octocounts.com/github/theosw/theosrenderpipeline) — C++, 47,876 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [TensorFlow vs PyTorch](https://octocounts.com/compare/tensorflow-vs-pytorch)
- [Electron vs Tauri](https://octocounts.com/compare/electron-vs-tauri)
- [Godot vs Bevy](https://octocounts.com/compare/godot-vs-bevy)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
