Cogito.Irony
4.0.0
dotnet add package Cogito.Irony --version 4.0.0
NuGet\Install-Package Cogito.Irony -Version 4.0.0
<PackageReference Include="Cogito.Irony" Version="4.0.0" />
<PackageVersion Include="Cogito.Irony" Version="4.0.0" />
<PackageReference Include="Cogito.Irony" />
paket add Cogito.Irony --version 4.0.0
#r "nuget: Cogito.Irony, 4.0.0"
#:package Cogito.Irony@4.0.0
#addin nuget:?package=Cogito.Irony&version=4.0.0
#tool nuget:?package=Cogito.Irony&version=4.0.0
Cogito.Irony
Helpers for working with parse trees produced by Irony.
Why
Irony hands you a ParseTree and leaves navigation to you, so grammar code fills up with index
arithmetic over child nodes. These extensions let you address nodes by term name and turn a tree into
XML, which makes a grammar far easier to debug.
Install
dotnet add package Cogito.Irony
Use
var tree = parser.Parse(text);
tree.ThrowParseErrors();
var name = tree.Root.Node("identifier").SpanText();
foreach (var arg in tree.Root.Nodes("argument"))
Handle(arg);
ToXDocument / ToXElement render a whole tree as XML — the quickest way to see what a grammar
actually matched. ThrowParseErrors turns Irony's error collection into a ParseException.
License
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Cogito.Core (>= 4.0.0)
- Irony (>= 1.5.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Cogito.Irony:
| Package | Downloads |
|---|---|
|
Cogito.Web.Razor
Basic Razor support library |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.0 | 148 | 10/15/2026 |
| 3.1.37 | 125 | 9/14/2026 |
| 3.1.36 | 4,884 | 11/30/2020 |
| 3.1.35 | 4,616 | 11/16/2020 |
| 3.1.34 | 4,675 | 11/16/2020 |
| 3.1.30 | 4,794 | 11/15/2020 |
| 3.1.29 | 4,647 | 11/11/2020 |
| 3.1.27 | 4,636 | 11/11/2020 |
| 3.1.26 | 4,628 | 11/11/2020 |
| 3.1.24 | 4,622 | 11/11/2020 |
| 3.1.23 | 4,830 | 11/11/2020 |
| 3.1.20 | 4,811 | 11/11/2020 |
| 3.1.18 | 4,653 | 8/7/2020 |
| 3.1.16 | 4,674 | 8/7/2020 |
| 3.1.13 | 4,801 | 2/25/2020 |
| 3.1.10 | 4,755 | 2/25/2020 |
| 3.1.8 | 4,717 | 2/25/2020 |
| 3.1.7 | 4,769 | 2/25/2020 |
| 3.1.6 | 4,780 | 2/25/2020 |
| 3.0.11 | 4,680 | 2/7/2020 |