![]() |
VOOZH | about |
dotnet add package ParserObjects --version 6.3.1
NuGet\Install-Package ParserObjects -Version 6.3.1
<PackageReference Include="ParserObjects" Version="6.3.1" />
<PackageVersion Include="ParserObjects" Version="6.3.1" />Directory.Packages.props
<PackageReference Include="ParserObjects" />Project file
paket add ParserObjects --version 6.3.1
#r "nuget: ParserObjects, 6.3.1"
#:package ParserObjects@6.3.1
#addin nuget:?package=ParserObjects&version=6.3.1Install as a Cake Addin
#tool nuget:?package=ParserObjects&version=6.3.1Install as a Cake Tool
ParserObjects is a library for object-based parsers, combinators, parsing utilities and abstractions. See the Documentation for more details on usage.
Install-Package ParserObjects
See the Test Suite Examples for some examples of usage.
This project has several goals:
An ISequence is similar to an IEnumerable or IEnumerator in concept, though with a focus on supporting parsing operations. Sequences allow you to GetNext() items one at a time, to Peek() at items without consuming them, and rewind the sequence to a previous location. There are many ways to create a sequence:
using static ParserObjects.Sequences;
// Turn an existing IReadOnlyList<T> into an ISequence<T>
var sequence = FromList(myList);
// Get a character sequence from a string
var sequence = FromString("...");
// Get a character sequence from a file or stream
var sequence = FromCharacterFile("fileName.txt");
var sequence = FromCharacterStream(myStream);
An IParser is an object that attempts to match a pattern in an input sequence. If the pattern is matched, the items will be consumed by the parser and a result will be returned. If the parser cannot match at the beginning of the input sequence, it returns a failure and no items are consumed. There are several dozen types of parsers in the library, which can be found by including these lines in your file:
using static ParserObjects.Parsers;
using static ParserObjects.Parsers<char>;
Once you have a parser, you can pass it an input sequence to obtain a parse result:
var result = parser.Parse(sequence);
The ParserObjects library provides many small parsers and parser combinators that can be built up into parsers for large and complex grammars. In addition, ParserObjects provides several pre-made parsers for specialty parsing needs. Please see the Documentation for more information, and the Test Suite Examples for real-world usage patterns.
We welcome contributions including code, feedback, bug reports and suggestions.
ParserObjects library is currently in active development. Version 6 is available on Nuget and is preferred over all previous versions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on ParserObjects:
| Package | Downloads |
|---|---|
|
StoneFruit
CLI Commandlet host and execution engine |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 6.3.1 | 69 | 5/2/2026 | |
| 6.3.0 | 91 | 3/22/2026 | |
| 6.2.0 | 104 | 1/25/2026 | |
| 6.1.0 | 267 | 9/13/2025 | |
| 6.0.0 | 298 | 8/24/2025 | |
| 6.0.0-beta1 | 153 | 7/4/2025 | |
| 5.4.0 | 161 | 7/4/2025 | |
| 5.2.0 | 5,534 | 9/30/2023 | |
| 5.1.0 | 192 | 9/29/2023 | |
| 5.0.0 | 3,051 | 1/29/2023 | |
| 5.0.0-beta1 | 492 | 1/24/2023 | 5.0.0-beta1 is deprecated because it is no longer maintained. |
| 4.0.0 | 554 | 9/29/2022 | |
| 4.0.0-alpha1 | 396 | 2/13/2022 | 4.0.0-alpha1 is deprecated because it is no longer maintained. |
| 3.1.0 | 480 | 12/4/2021 | |
| 3.1.0-beta1 | 493 | 11/18/2021 | 3.1.0-beta1 is deprecated because it is no longer maintained. |
| 3.1.0-alpha2 | 509 | 11/12/2021 | 3.1.0-alpha2 is deprecated because it is no longer maintained. |
| 3.1.0-alpha1 | 569 | 1/29/2021 | 3.1.0-alpha1 is deprecated because it is no longer maintained. |
| 3.0.1 | 1,541 | 1/29/2021 | |
| 3.0.0 | 552 | 1/6/2021 |