Strumenta.Sharplasu
1.0.0
dotnet add package Strumenta.Sharplasu --version 1.0.0
NuGet\Install-Package Strumenta.Sharplasu -Version 1.0.0
<PackageReference Include="Strumenta.Sharplasu" Version="1.0.0" />
<PackageVersion Include="Strumenta.Sharplasu" Version="1.0.0" />
<PackageReference Include="Strumenta.Sharplasu" />
paket add Strumenta.Sharplasu --version 1.0.0
#r "nuget: Strumenta.Sharplasu, 1.0.0"
#addin nuget:?package=Strumenta.Sharplasu&version=1.0.0
#tool nuget:?package=Strumenta.Sharplasu&version=1.0.0
Sharplasu - AST Library for .NET Standard
Sharplasu supplies the infrastructure to build a custom, possibly mutable, Abstract Syntax Tree (AST) using CSharp.
Sharplasu is part of the StarLasu family of libraries. The other libraries provide similar support in other languages. Sharplasu it is at an earlier stage of development compared to other StarLasu libraries.
As of version 1, we have ported an implementation of the most used features from Kolasu, including support for transformers, symbol resolution and code generation. These features have been ported with the objective of supporting building parsers up to our standard.
The original Kolasu API for transformers is well suited for Kotlin, but it is not a perfect fit for C#. The two languages have strong similarities, but C# is more stringent when handling the inheritance of classes using Generics and it is less flexible in general when working with generics. For example, you can use wildcard generics in Kotlin, but not in C#. So, it should be considered in beta status and subject to improvements. You can participate to the discussion in the issues.
Sharplasu is integrated with ANTLR.
Tests
To run the included tests you need to have ANTLR installed to compile an example parser. You do not need to have the ANTLR tool installed to run the library. You can read the official documentation or our tutorial to learn how to install ANTLR.
Tutorial
You can read our tutorial on how to use SharpLasu: Building advanced parsers using Sharplasu. In the tutorial we are going to build a parser for Python 3, but the information can applied to parse any language.
Product | Versions 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. |
-
.NETStandard 2.0
- Antlr4.Runtime.Standard (>= 4.11.1)
- System.Text.Json (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.