Farkle 7.0.1
dotnet add package Farkle --version 7.0.1
NuGet\Install-Package Farkle -Version 7.0.1
<PackageReference Include="Farkle" Version="7.0.1" />
<PackageVersion Include="Farkle" Version="7.0.1" />
<PackageReference Include="Farkle" />
paket add Farkle --version 7.0.1
#r "nuget: Farkle, 7.0.1"
#:package Farkle@7.0.1
#addin nuget:?package=Farkle&version=7.0.1
#tool nuget:?package=Farkle&version=7.0.1
Farkle
Farkle is a .NET library for building fast, reliable text parsers in F# and C#. It creates LALR(1) parsers through an API that resembles parser combinators, letting you define grammars directly in source code without requiring a separate grammar definition language.
Farkle can also generate parsing tables at build time, providing fast startup performance on par with generated parsers, and compile-time grammar validation. Check out the Farkle.Tools.MSBuild package for more information.
Quick Start
C#
using Farkle;
using Farkle.Builder;
var number = Terminals.Int32("Number");
var expression = Nonterminal.Create("Addition",
number.Extended().Append("+").Extend(number).Finish((left, right) => left + right)
);
var parser = expression.Build();
var result = parser.Parse("1 + 2"); // Whitespace is ignored by default.
Console.WriteLine(result); // 3
F#
open Farkle
open Farkle.Builder
let number = Terminals.Int32("Number")
let expression = "Addition" ||= [
!@ number .>> "+" .>>. number => (fun left right -> left + right)
]
let parser = GrammarBuilder.build expression
let result = CharParser.parseString parser "1 + 2" // Whitespace is ignored by default.
printfn "%O" result // 3
Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- BitCollections (>= 1.0.1)
-
net8.0
- BitCollections (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.0.1 | 495 | 7/9/2026 |
| 7.0.0 | 207 | 6/28/2026 |
| 7.0.0-preview.3 | 69 | 5/18/2026 |
| 7.0.0-preview.2 | 215 | 10/30/2025 |
| 7.0.0-preview.1 | 164 | 9/6/2025 |
| 6.5.2 | 28,212 | 11/10/2024 |
| 6.5.1 | 30,878 | 1/25/2023 |
| 6.5.0 | 655 | 9/8/2022 |
| 6.4.0 | 875 | 3/11/2022 |
| 6.3.2 | 642 | 10/31/2021 |
| 6.3.1 | 561 | 10/18/2021 |
| 6.3.0 | 619 | 10/3/2021 |
| 6.2.0 | 647 | 5/16/2021 |
| 6.1.0 | 600 | 3/4/2021 |
| 6.0.0 | 625 | 2/22/2021 |
| 6.0.0-alpha.3 | 403 | 11/25/2020 |
| 6.0.0-alpha.2 | 486 | 8/22/2020 |
| 6.0.0-alpha.1 | 467 | 4/13/2020 |
| 5.4.1 | 893 | 3/23/2020 |
| 5.4.0 | 760 | 3/20/2020 |
You can see information about the latest releases on https://github.com/teo-tsirpanis/Farkle/releases