Abnf.Net
0.1.0-preview.1
dotnet add package Abnf.Net --version 0.1.0-preview.1
NuGet\Install-Package Abnf.Net -Version 0.1.0-preview.1
<PackageReference Include="Abnf.Net" Version="0.1.0-preview.1" />
<PackageVersion Include="Abnf.Net" Version="0.1.0-preview.1" />
<PackageReference Include="Abnf.Net" />
paket add Abnf.Net --version 0.1.0-preview.1
#r "nuget: Abnf.Net, 0.1.0-preview.1"
#:package Abnf.Net@0.1.0-preview.1
#addin nuget:?package=Abnf.Net&version=0.1.0-preview.1&prerelease
#tool nuget:?package=Abnf.Net&version=0.1.0-preview.1&prerelease
bnf.net
A .NET library for working with Augmented Backus-Naur Form grammars.
Overview
This library provides comprehensive support for working with ABNF grammars (https://datatracker.ietf.org/doc/html/rfc5234). Future versions may include support for EBNF.
Key components:
- ABNF Parser - Parse ABNF grammar definitions with a complete internal parse tree
- Abstract Grammar Representation - A recursive expression model consisting of:
- Alternation (
/) - choose between alternatives - Concatenation (space) - sequence of elements
- Repetition (
*,n*m) - repeat elements - Option (
[...]) - optional elements - Group (
(...)) - grouping - Literal - character values and ranges
- Rule - named grammar rules
- Alternation (
- Validation Engine - Validate input strings against grammar rules with detailed error reporting (position and reason for failures)
See the demo projects for practical examples of using the library.
Projects
- abnf.net - Core class library
- abnf.net.Demo - Arithmetic expression grammar demo (run with
wsargument for whitespace support) - abnf.net.Tests - Unit tests
Running the Demo
# Basic mode (no whitespace around operators)
dotnet run --project samples/abnf.net.Demo
# With whitespace support
dotnet run --project samples/abnf.net.Demo -- ws
Building
dotnet build
Testing
dotnet test
NuGet Package
The library is available as a NuGet package: Abnf.Net
dotnet add package Abnf.Net --prerelease
For package publishing and release information, see docs/NUGET_PUBLISHING.md.
License
This project is licensed under the MIT License - see the LICENSE file for details.
| 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.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.1 | 129 | 1/21/2026 |