--- id: funcparserlib version: "1.0.1" license: MIT license_treatment: permissive maintenance: dormant --- # funcparserlib — Recursive descent parsing library based on functional combinators License: permissive · Maintenance: dormant · Downloads: 202.3K/mo ## What it is and what it does Funcparserlib is a pure-Python parsing library built around functional combinators—small, composable parsing functions that you chain together to build larger parsers. It is designed for parsing little languages and external DSLs (domain-specific languages) where you need to tokenize input and then parse it into a structured form. The library includes both a lexer generator (for tokenization with position tracking) and a parser combinator framework, and it emphasizes ease of use over raw performance, making it practical for cases where you need to parse custom syntax without the complexity of traditional parser generators. The package has no external dependencies, supports Python 2.7 through 3.11, and is fully type-hinted. It is mature and dormant—last released in November 2022 with a final commit in May 2024—indicating stability rather than active development. Real-world use includes projects like Hy (a Lisp dialect embedded in Python), Splash (a JavaScript rendering service), and blockdiag (a diagram generator), all of which rely on funcparserlib to parse their respective DSLs. Use it for: - Build a custom configuration file parser that reads a domain-specific syntax and converts it into Python objects. - Implement a simple expression evaluator or calculator that parses and evaluates mathematical expressions with operator precedence. - Parse a custom query language or filter syntax for a data processing tool. - Create a code generator or transpiler that reads a custom language and outputs Python or another target language. - Build a JSON or data-format parser as an alternative to hand-written recursive descent code. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Funcparserlib is a recursive descent parsing library that lets you build LL(*) parsers for little languages and domain-specific languages using functional combinators, with a built-in lexer generator for token tracking. Yes, if you need to parse a custom language or DSL and want a lightweight, dependency-free solution. The library is mature, well-documented, and proven in production use. Its dormant status is not a concern—it is feature-complete and stable. Install it only if you are comfortable with recursive descent parsing's performance characteristics (adequate for small to medium grammars but slower than LR/LALR parsers for large ones). ## Install pip install funcparserlib uv add funcparserlib poetry add funcparserlib ## Installing funcparserlib Before you install: Installation is straightforward with no external dependencies. The package is dormant (last release 2022-11-03, last commit 2024-05-04) but marked Production/Stable and has been in use since 2009, suggesting it is mature and unlikely to require frequent updates. License in practice: MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute funcparserlib freely as long as you include the license notice. Quickstart: from funcparserlib.lexer import make_tokenizer, TokenSpec from funcparserlib.parser import tok, many, forward_decl specs = [TokenSpec("int", r"\d+")] tokenizer = make_tokenizer(specs) tokens = tokenizer("test") int_num = tok("int") >> int result = int_num.parse(tokens) Verify before relying: - Whether the package's claimed performance advantage over PyParsing (at least twice faster) has been independently verified. - Whether the 1.2K lines of code metric is current as of version 1.0.1. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 202.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags recursive descent parser, parser combinators python, dsl parsing library, domain specific language parser, functional parsing, lexer and parser generator, LL parser library, parsing, dsl, combinators [View on SkillFed](https://skillfed.io/packages/funcparserlib) · [View on PyPI](https://pypi.org/project/funcparserlib/)