Warpstone.Sources
3.0.0-preview03
dotnet add package Warpstone.Sources --version 3.0.0-preview03
NuGet\Install-Package Warpstone.Sources -Version 3.0.0-preview03
<PackageReference Include="Warpstone.Sources" Version="3.0.0-preview03"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Warpstone.Sources" Version="3.0.0-preview03" />
<PackageReference Include="Warpstone.Sources"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Warpstone.Sources --version 3.0.0-preview03
#r "nuget: Warpstone.Sources, 3.0.0-preview03"
#:package Warpstone.Sources@3.0.0-preview03
#addin nuget:?package=Warpstone.Sources&version=3.0.0-preview03&prerelease
#tool nuget:?package=Warpstone.Sources&version=3.0.0-preview03&prerelease
Package | Stable | Preview | Downloads |
---|---|---|---|
Warpstone | |||
Warpstone.Sources |
<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;
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.