Warpstone.Sources 3.0.0-preview03

This is a prerelease version of Warpstone.Sources.
dotnet add package Warpstone.Sources --version 3.0.0-preview03
                    
NuGet\Install-Package Warpstone.Sources -Version 3.0.0-preview03
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Warpstone.Sources" Version="3.0.0-preview03">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Warpstone.Sources" Version="3.0.0-preview03" />
                    
Directory.Packages.props
<PackageReference Include="Warpstone.Sources">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Warpstone.Sources --version 3.0.0-preview03
                    
#r "nuget: Warpstone.Sources, 3.0.0-preview03"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Warpstone.Sources@3.0.0-preview03
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Warpstone.Sources&version=3.0.0-preview03&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Warpstone.Sources&version=3.0.0-preview03&prerelease
                    
Install as a Cake Tool

Buy Me A Coffee

Package Stable Preview Downloads
Warpstone NuGet NuGet NuGet
Warpstone.Sources NuGet NuGet NuGet

<img src="https://raw.githubusercontent.com/CptWesley/Warpstone/main/logo_1024x1024.png" width="178" height="178">

Warpstone

Parser combinator forged deep within Ikit's forges in the Under-City from a shard of Morrslieb itself.

What is it?

Warpstone is a parser combinator library written in C# targetting .NET Standard 2.0, meaning that it can be used by any application running either .NET Framework >= 4.6.1, .NET Core >= 2.0 or Mono >= 5.4. The main focus of the library is to provide a powerful lightweight parser combinator framework for developers to create their own parsers with.

Why did you make it?

After following a course on compiler construction I was intrigued and wanted a way of parsing languages within code without requiring external tools to generate a parser for me first. During my quest I stumbled upon the concept of parser combinators and started looking for existing libraries for .NET. I soon stumbled upon Pidgin. After toying around with the library for a bit I felt dissatisfied with some of its syntax and I still felt like I didn't fully understand the concepts it was using behind the scenes. This led me to create my own parser combinator library, with syntax inspired by Pidgin.

Why the name? (Or: What are all those strange words in the description?!?!?)

Coming up with names is difficult, I wanted to get the project started and at the time I was consumed by the Warhammer Fantasy universe.

Usage

It's useful to take a look at one of the available example projects for JSON parsing and expression parsing.

To start off, one first needs to add (one of) the following imports:

V3 (Unstable)

using Warpstone;
using static Warpstone.Parsers;

V2 (Unstable)

using Warpstone;
using static Warpstone.Parsers.BasicParsers;

V1 (Stable)

using Warpstone;
using static Warpstone.Parsers.BasicParsers;
using static Warpstone.Parsers.CommonParsers;
using static Warpstone.Parsers.ExpressionParsers;
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.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
3.0.0-preview03 283 6/11/2025
3.0.0-preview02 264 6/11/2025

### v3.0.0
       - Significantly improved performance.
       - Reworked API interface.
       ### v2.0.0
       - Reworked library from scratch.
       - Changed to Packrat parsing.
       - Added support for left-recursion.