VisualFA.Compiler
1.1.0
See the version list below for details.
dotnet add package VisualFA.Compiler --version 1.1.0
NuGet\Install-Package VisualFA.Compiler -Version 1.1.0
<PackageReference Include="VisualFA.Compiler" Version="1.1.0" />
paket add VisualFA.Compiler --version 1.1.0
#r "nuget: VisualFA.Compiler, 1.1.0"
// Install VisualFA.Compiler as a Cake Addin #addin nuget:?package=VisualFA.Compiler&version=1.1.0 // Install VisualFA.Compiler as a Cake Tool #tool nuget:?package=VisualFA.Compiler&version=1.1.0
Visual FA Compiler
The compiler for the Visual FA a Unicode enabled DFA regular expression engine
There's a series of articles on it starting here: https://www.codeproject.com/Articles/5375797/Visual-FA-Part-1-Understanding-Finite-Automata
Performance
Microsoft Regex "Lexer": [■■■■■■■■■■] 100% Found 220000 matches in 33ms
Microsoft Regex compiled "Lexer": [■■■■■■■■■■] 100% Found 220000 matches in 20ms
FAStringRunner (Compiled): [■■■■■■■■■■] 100% Found 220000 matches in 7ms
FATextReaderRunner (Compiled): [■■■■■■■■■■] 100% Found 220000 matches in 12ms
Use
string exp = @"[A-Z_a-z][A-Z_a-z0-9]*|0|\-?[1-9][0-9]*";
FA nfa = FA.Parse(exp);
// turn it into an optimized DFA
FA mdfa = nfa.ToMinimizedDfa();
// Make sure to reference VisualFA.Compiler:
FARunner compiledStr = mdfa.CompileString();
compiledStr.Set(text);
//or
FARunner compiledRdr = mdfa.CompileTextReader();
compiledRdr.Set(text)
// to lex (as above)
foreach(FAMatch match in <compiledStr/compiledRdr>) {
Console.WriteLine("{0}:{1}",match.Position,match.Value);
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. 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. |
-
net6.0
- System.Reflection.Emit (>= 4.7.0)
- VisualFA (>= 1.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.