Bunpo 2026.4.11
dotnet add package Bunpo --version 2026.4.11
NuGet\Install-Package Bunpo -Version 2026.4.11
<PackageReference Include="Bunpo" Version="2026.4.11" />
<PackageVersion Include="Bunpo" Version="2026.4.11" />
<PackageReference Include="Bunpo" />
paket add Bunpo --version 2026.4.11
#r "nuget: Bunpo, 2026.4.11"
#:package Bunpo@2026.4.11
#addin nuget:?package=Bunpo&version=2026.4.11
#tool nuget:?package=Bunpo&version=2026.4.11
Bunpo 
Bunpo is tiny parser combinator
Description
Bunpo is tiny parser combinator.
It creates an LL parser in C# code.
Bunpoは小さなパーサコンビネータである。
C#のコードでLL文法パーサーを作ることができる。
Usage
Single-character parser:
using Bunpo;
var parser = Combinator.Char('a');
_ = parser.Match("abc123xyz"); //=> (0, 1, 'a')
Alphabet and number parser:
using Bunpo;
var parser = Combinator.String("ab")
& Combinator.AnyChar
& Combinator.Chars(Combinator.Digit);
_ = parser.Match("abc123xyz"); //=> (0, 6, "abc123")
Examples
Four arithmetic operations
Naming conventions
Benchmark
This is a benchmark for Four arithmetic operations parser setup and parser execution.
The parser compared formulas with 5 numbers and formulas with 300 numbers.
Four arithmetic operations benchmark:
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|---------------- |--------------:|-------------:|-------------:|---------:|-------:|----------:|
| BunpoSetup | 113.91 ns | 1.914 ns | 1.697 ns | 0.1274 | 0.0007 | 1600 B |
| Bunpo5Parse | 79.79 ns | 1.348 ns | 1.261 ns | - | - | - |
| Bunpo300Parse | 5,162.57 ns | 77.373 ns | 72.374 ns | - | - | - |
| FParseSetup | 448.28 ns | 5.402 ns | 4.511 ns | 0.4959 | 0.0105 | 6232 B |
| FParse5Parse | 276.17 ns | 2.908 ns | 2.720 ns | 0.0324 | - | 408 B |
| FParse300Parse | 16,797.90 ns | 201.356 ns | 178.496 ns | 1.6479 | - | 20968 B |
| SpracheSetup | 164.69 ns | 3.281 ns | 2.908 ns | 0.1931 | 0.0017 | 2424 B |
| Sprache5Parse | 6,145.05 ns | 93.162 ns | 82.586 ns | 3.4332 | 0.0458 | 43144 B |
| Sprache300Parse | 384,084.63 ns | 7,396.391 ns | 7,264.245 ns | 209.9609 | 7.8125 | 2634944 B |
FParsec.CSharp version 12.6.0(FParsec version 2.0.0-beta2) used.
Sprache version 2.3.1 used.
Installation
- NuGet
dotnet add package Bunpo
Requirement
- .NET 10
Author
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.