SimpleParser 1.0.0-VER-01.33

This is a prerelease version of SimpleParser.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package SimpleParser --version 1.0.0-VER-01.33
                    
NuGet\Install-Package SimpleParser -Version 1.0.0-VER-01.33
                    
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="SimpleParser" Version="1.0.0-VER-01.33" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SimpleParser" Version="1.0.0-VER-01.33" />
                    
Directory.Packages.props
<PackageReference Include="SimpleParser" />
                    
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 SimpleParser --version 1.0.0-VER-01.33
                    
#r "nuget: SimpleParser, 1.0.0-VER-01.33"
                    
#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.
#addin nuget:?package=SimpleParser&version=1.0.0-VER-01.33&prerelease
                    
Install SimpleParser as a Cake Addin
#tool nuget:?package=SimpleParser&version=1.0.0-VER-01.33&prerelease
                    
Install SimpleParser as a Cake Tool

SimpleParser

This project solves serveral problems

  • Parse expression to ast tree and the possibilty of calculating the result
  • Use external variables in an expression
  • Use external functions in an expression
  • Parse view template $"string length = {2+2}", result is "string length = 4"
  • Serialize ast tree to json

How to use (Example)


internal static class InternalFuncs
{
    [FuncName("len")]
    public static int Len(string str)
    {
        return str?.Length ?? default;
    }
}

var identifier = new Dictionary<string, object>
{
    [x] = 5,
    [str] = "hello"
};

var funcTable = FuncTableFactory.Create(typeof(InternalFuncs));

var tree = LineParser.Parse("len(str)+x*2", identifier, funcTable);

//the calculated result will be 15
var result = AstCalculator.Calculate(tree, identifier, funcTable);
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SimpleParser:

Package Downloads
JetPipe

Compile and run pipe async

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0-VER-01.63 77 1/10/2025
1.0.0-VER-01.62 78 1/4/2025
1.0.0-VER-01.61 54 12/27/2024
1.0.0-VER-01.58 52 12/6/2024
1.0.0-VER-01.57 62 12/5/2024
1.0.0-VER-01.56 270 12/20/2023
1.0.0-VER-01.55 191 10/25/2023
1.0.0-VER-01.54 134 8/10/2023
1.0.0-VER-01.53 105 7/30/2023
1.0.0-VER-01.52 115 7/13/2023
1.0.0-VER-01.51 101 7/4/2023
1.0.0-VER-01.50 97 6/4/2023
1.0.0-VER-01.48 98 6/1/2023
1.0.0-VER-01.47 92 6/1/2023
1.0.0-VER-01.46 110 2/24/2023
1.0.0-VER-01.45 112 2/9/2023
1.0.0-VER-01.44 131 1/9/2023
1.0.0-VER-01.42 125 12/31/2022
1.0.0-VER-01.41 131 12/22/2022
1.0.0-VER-01.40 128 12/7/2022
1.0.0-VER-01.39 118 12/1/2022
1.0.0-VER-01.38 129 11/22/2022
1.0.0-VER-01.37 124 11/13/2022
1.0.0-VER-01.36 127 11/9/2022
1.0.0-VER-01.35 133 10/27/2022
1.0.0-VER-01.34 135 10/25/2022
1.0.0-VER-01.33 134 10/23/2022
1.0.0-VER-01.32 139 10/21/2022
1.0.0-VER-01.31 155 10/21/2022
1.0.0-VER-01.30 154 10/20/2022
1.0.0-VER-01.29 151 10/19/2022
1.0.0-VER-01.28 125 10/18/2022
1.0.0-VER-01.27 123 10/18/2022
1.0.0-VER-01.26 136 10/13/2022
1.0.0-VER-01.25 125 10/12/2022
1.0.0-VER-01.24 127 10/12/2022
1.0.0-VER-01.17 127 10/12/2022
1.0.0-VER-01.9 129 10/11/2022

Parse line to ast tree