Installation
Installation
CS-MIC is distributed through official packages on nuget.org.
Packages
| Package | Role | NuGet |
|---|---|---|
CSMic | Core parser, interpreter, variables, arrays, expression bindings, and custom function API. | nuget.org/packages/CSMic |
CSMic.StandardLibrary | Optional constants and common math functions. Depends on CSMic. | nuget.org/packages/CSMic.StandardLibrary |
Both packages target netstandard2.1.
Core Interpreter Only
Install CSMic when your application wants the expression runtime without the optional standard-library functions.
dotnet add package CSMic
Example:
using CSMic;
var interpreter = new InputInterpreter();
decimal result = interpreter.Interpret("1 + 2 * 3");
Core Plus Standard Library
Install CSMic.StandardLibrary when your application wants built-in constants and math functions.
dotnet add package CSMic.StandardLibrary
CSMic.StandardLibrary references CSMic, so applications usually do not need to install both packages directly.
Example:
using CSMic;
using CSMic.StandardLibrary;
var interpreter = new InputInterpreter();
Initializer.InitializeAll(interpreter);
decimal result = interpreter.Interpret("sqrt(81) + max(2, 5)");
Pinning A Version
For applications, prefer pinning exact package versions in your project file or package management workflow so production builds are repeatable.
<PackageReference Include="CSMic" Version="2.0.2" />
<PackageReference Include="CSMic.StandardLibrary" Version="2.1.0" />
Use the NuGet package pages as the source of truth for current published versions:
Source Builds
The canonical source repository is:
https://git.jordanwages.com/wagesj45/cs-mic
Build from source when you need to inspect internals, run tests locally, or contribute a change:
git clone https://git.jordanwages.com/wagesj45/cs-mic.git
cd cs-mic
dotnet restore src/CsMic.sln
dotnet test src/CsMic.sln
The core project uses Coco/R during build to generate parser and scanner code from the grammar in src/Core/cocor/Interpreter.atg.