Dove.Parser 0.1.5.1

dotnet add package Dove.Parser --version 0.1.5.1
                    
NuGet\Install-Package Dove.Parser -Version 0.1.5.1
                    
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="Dove.Parser" Version="0.1.5.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dove.Parser" Version="0.1.5.1" />
                    
Directory.Packages.props
<PackageReference Include="Dove.Parser" />
                    
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 Dove.Parser --version 0.1.5.1
                    
#r "nuget: Dove.Parser, 0.1.5.1"
                    
#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 Dove.Parser@0.1.5.1
                    
#: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=Dove.Parser&version=0.1.5.1
                    
Install as a Cake Addin
#tool nuget:?package=Dove.Parser&version=0.1.5.1
                    
Install as a Cake Tool

ILDovah

A basic MSIL parser (follows 2012 ECMA-CIL)

Sample :

using ResourceDecl;

var (source, index) = (""".class private auto ansi beforefieldinit Program
    extends [System.Runtime]System.Object
{
    .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
        01 00 00 00
    )
    
    .method private hidebysig static 
        int32 '<Main>$' (
            string[] args
        ) cil managed 
    {
        
        
        .maxstack 2
        .entrypoint
        .locals init (
            [0] valuetype [System.Runtime]System.Nullable`1<int32> HeadBlockHash,
            [1] int32
        )

        .try
        {
            IL_0000: ldloca.s 0
            IL_0002: initobj valuetype [System.Runtime]System.Nullable`1<int32>
            IL_0008: ldloca.s 1
            IL_000a: ldc.i4.s 42
        } 
        finally
        {
            IL_00ca: ldstr "done"
            IL_00cf: call void [System.Console]System.Console::WriteLine(string)
            IL_00d4: endfinally
        } 

        
        IL_00d5: ldloc.s 1
        IL_00d7: ret
    } 

    .method public hidebysig specialname rtspecialname 
        instance void .ctor () cil managed 
    {
        
        
        .maxstack 8

        IL_0000: ldarg.0
        IL_0001: call instance void [System.Runtime]System.Object::.ctor()
        IL_0006: ret
    } 

}""", 0);

TestConstruct<RootDecl.Declaration.Collection>(ref index, source);
void TestConstruct<T>(ref int index, string source)
    where T : IDeclaration<T>
{
    if (IDeclaration<T>.Parse(ref index, source, out T resultVal))
    {
        Console.WriteLine(resultVal);
    }
    else
    {
        Console.WriteLine("Failed to parse");
    }
}

Output :

.class private auto ansi beforefieldinit Program
    extends [System.Runtime]System.Object
{
    .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = (
        01 00 00 00
    )
    
    .method private hidebysig static 
        int32 '<Main>$' (
            string[] args
        ) cil managed 
    {
        .maxstack 2
        .entrypoint
        .locals init (
            [0] valuetype [System.Runtime]System.Nullable`1<int32> HeadBlockHash,
            [1] int32
        )

        .try
        {
            IL_0000: ldloca.s 0
            IL_0002: initobj valuetype [System.Runtime]System.Nullable`1<int32>
            IL_0008: ldloca.s 1
            IL_000a: ldc.i4.s 42
        } 
        finally
        {
            IL_00ca: ldstr "done"
            IL_00cf: call void [System.Console]System.Console::WriteLine(string)
            IL_00d4: endfinally
        } 
        IL_00d5: ldloc.s 1
        IL_00d7: ret
    } 

    .method public hidebysig specialname rtspecialname 
        instance void .ctor () cil managed 
    {
        .maxstack 8
        IL_0000: ldarg.0
        IL_0001: call instance void [System.Runtime]System.Object::.ctor()
        IL_0006: ret
    } 

}
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.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.5.1 428 2/18/2023
0.1.5 352 2/18/2023
0.1.4.9 433 1/27/2023
0.1.4.8 419 1/27/2023
0.1.4.7 431 1/22/2023
0.1.4.6 419 1/19/2023
0.1.4.5 421 1/19/2023
0.1.4.4 415 1/19/2023
0.1.4.3 404 1/19/2023
0.1.4.2 410 1/18/2023
0.1.4.1 407 1/17/2023
0.1.4 393 1/17/2023
0.1.3.9 398 1/16/2023
0.1.3.8 439 1/15/2023
0.1.3.6 428 1/15/2023
0.1.3.5 407 1/15/2023
0.1.3.4 418 1/15/2023
0.1.3.3 426 1/15/2023
0.1.3.2 389 1/12/2023
0.1.3.1 428 1/12/2023
0.1.3 383 1/12/2023
0.1.2 426 1/12/2023
0.1.1 400 1/12/2023