Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Core
  3. FParsec

FParsec

F#

A parser combinator library for F# that enables building recursive-descent parsers for formal grammars.

GitHubGitHub
560 stars46 forks0 contributors

What is FParsec?

FParsec is a parser combinator library for F# that enables developers to build recursive-descent parsers for formal grammars. It solves the problem of parsing structured text, such as custom languages or data formats, by providing a composable and efficient API. The library supports context-sensitive grammars, Unicode, and large files while generating readable error messages.

Target Audience

F# developers who need to parse custom text formats, implement domain-specific languages, or process structured data from text sources. It is particularly useful for those working on compilers, interpreters, data transformation tools, or complex text analysis applications.

Value Proposition

Developers choose FParsec for its high performance, simple yet powerful API, and excellent error reporting. Its support for infinite look-ahead grammars and Unicode, combined with comprehensive documentation, makes it a robust alternative to hand-written parsers or less optimized libraries.

Overview

A parser combinator library for F#

Use Cases

Best For

  • Implementing parsers for domain-specific languages in F#
  • Processing large text files with custom formats efficiently
  • Building compilers or interpreters with recursive-descent parsing
  • Parsing context-sensitive grammars with infinite look-ahead
  • Creating operator-precedence parsers for mathematical expressions
  • Developing tools that require Unicode-aware text parsing

Not Ideal For

  • Projects not using the F# programming language
  • Teams that only need to parse standard formats like JSON or XML with existing .NET libraries
  • Developers preferring visual parser generators over code-based combinator approaches

Pros & Cons

Pros

Context-Sensitive Grammar Support

Enables parsing of complex formal grammars with infinite look-ahead and context-sensitive rules, as highlighted in the README's feature list.

Readable Error Messages

Automatically generates clear and informative error messages, which simplifies debugging and improves developer productivity.

Unicode and Large File Efficiency

Fully supports Unicode text parsing for international applications and is optimized to handle very large files with minimal memory overhead.

High Performance

Thoroughly optimized implementation ensures fast parsing performance, making it suitable for demanding text processing tasks.

Cons

F#-Specific Dependency

Limited to F# projects, making it unusable in polyglot environments or for teams standardized on other programming languages.

No Pre-Built Parsers for Common Formats

Lacks out-of-the-box parsers for standards like JSON or XML, requiring manual implementation or integration with additional libraries.

Learning Curve for Parsing Concepts

Requires understanding of parser combinators and formal grammars, which can be challenging for developers new to parsing or F#.

Frequently Asked Questions

Quick Stats

Stars560
Forks46
Contributors0
Open Issues28
Last commit3 years ago
CreatedSince 2016

Tags

#unicode#recursive-descent-parser#domain-specific-language#formal-grammar#parsing-library#fsharp#text-parsing#parser-combinator

Built With

F
F#

Included in

Core21.2kF#1.4k
Auto-fetched 11 hours ago

Related Projects

RoslynRoslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.

Stars20,789
Forks4,387
Last commit13 hours ago
FableFable

F# to JavaScript, TypeScript, Python, Rust, Erlang and Dart Compiler

Stars3,170
Forks332
Last commit19 hours ago
PeachPiePeachPie

PeachPie - the PHP compiler and runtime for .NET and .NET Core

Stars2,489
Forks209
Last commit16 days ago
SpracheSprache

A tiny, friendly, C# parser construction library

Stars2,482
Forks212
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub