FSharpCompiler.Analyzing 1.0.3

Suggested Alternatives

FslexFsyacc

Additional Details

Replace this package with the FslexFsyacc package, which implements all the features of this package and is more friendly.

There is a newer version of this package available.
See the version list below for details.
dotnet add package FSharpCompiler.Analyzing --version 1.0.3                
NuGet\Install-Package FSharpCompiler.Analyzing -Version 1.0.3                
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="FSharpCompiler.Analyzing" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FSharpCompiler.Analyzing --version 1.0.3                
#r "nuget: FSharpCompiler.Analyzing, 1.0.3"                
#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.
// Install FSharpCompiler.Analyzing as a Cake Addin
#addin nuget:?package=FSharpCompiler.Analyzing&version=1.0.3

// Install FSharpCompiler.Analyzing as a Cake Tool
#tool nuget:?package=FSharpCompiler.Analyzing&version=1.0.3                

FSharpCompiler.Analyzing是词法分析器的支持库。通过它,只需要很少的代码,我们就可以写一个全功能的词法分析器。

FSharpCompiler.Lex生成DFA

let text = File.ReadAllText(filePath)
let dfa = Lex.generateDFA text

解析器类

type LexicalAnalyzer
    (
        transitions: Set<uint32*string*uint32>, 
        finalLexemes: (Set<uint32>*Set<uint32>) list
    )

它是全局不变的:

let private analyzer = LexicalAnalyzer(dfa.dtran, dfa.finalLexemes)

用法

analyzer.split:(tokens:seq<'tok>)*(getTag:'tok->string) -> seq<int*list<'tok>>

tokens:seq<'tok>输入的符记流

getTag:'tok->string对于每个符记,如何获取代表符记自身的标签。这个标签用于正则表达式匹配模式。

seq<int*list<'tok>>返回结果是一个流,流的每个元素是int*list<'tok>类型。元组的第一个分量是一个整数索引。指结果匹配lex输入文件中的第几个模式。元组第二个分量指输入流中的匹配片段。

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. 
.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 (3)

Showing the top 3 NuGet packages that depend on FSharpCompiler.Analyzing:

Package Downloads
FSharpCompiler.Lex

Lex are tools for generating lexical analyzer.

FSharpCompiler.Yacc

Yacc utility for.NET platform. Yacc are tools for generating parsers.

FSharp.JLinq

`FSharp.JLinq` is a library to enhance JToken located in `Newtonsoft.Json.Linq`.

GitHub repositories

This package is not used by any popular GitHub repositories.

update Dependencies