Preparing for system design interviews?  Try bugzed.com →

Pratt Parser

JSON →
library 12.0.6 ·javascript
verified Jun 17, 2026

`pratt-parser` is a JavaScript/TypeScript library that implements a Top Down Operator Precedence (TDOP) parser, commonly known as a Pratt parser. It draws inspiration from both the general TDOP concept and specific implementations like Douglas Crockford's TDOP work. The library enables developers to construct custom parsers for various syntaxes, such as mathematical expressions or domain-specific languages, by defining tokens, null denotation (nud) functions for prefix operators, and left denotation (led) functions for infix operators, along with their respective precedences. The current stable version is 12.0.6, indicating active maintenance and frequent, albeit minor, updates. Major versions introduce breaking changes primarily related to API refinement and Node.js compatibility. It provides comprehensive TypeScript type definitions, making it suitable for modern TypeScript projects seeking a robust and extensible parsing solution.

total hits 13
actors 4 distinct systems
last hit 20d ago AhrefsBot
GPTBot
4
Amazonbot
4
Script
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany