FSharpCompiler.Yacc 1.1.8

Suggested Alternatives

FslexFsyacc

Additional Details

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

dotnet add package FSharpCompiler.Yacc --version 1.1.8
NuGet\Install-Package FSharpCompiler.Yacc -Version 1.1.8
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.Yacc" Version="1.1.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FSharpCompiler.Yacc --version 1.1.8
#r "nuget: FSharpCompiler.Yacc, 1.1.8"
#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.Yacc as a Cake Addin
#addin nuget:?package=FSharpCompiler.Yacc&version=1.1.8

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

Yacc is a tool which given a context-free grammar, constructs a parsing table used for parser which will parse input tokens according to the grammar rules.

Unlike traditional Yacc tools, FSharpCompiler.Yacc does not require action in rules. Instead of explicitly actions, the parse tree is implicitly constructed during the parse. As the parser executes, it builds an internal representation of the the structure of the program. The internal representation is based on the right hand side of the production rules. When a right hand side is recognized, it is reduced to the corresponding left hand side. Parsing is complete when the entire program has been reduced to the start symbol of the grammar. The specification of context-free grammar input see [The Yacc Input File](Yacc Input File.md)

Build a parsing table

From the input file yaccFile, the method for generating the ExprParsingTable module is follow:

open FSharpCompiler.Yacc

let yacc = YaccFile.parse yaccFile
let parseTbl = 
	ParseTable.create(yacc.mainRules, yacc.precedences)

// ... the print ExprParsingTable code with parseTbl

The result module like this:

module ArithmeticExpressions.ExprParsingTable

let rules = set [ ... ]
let kernelSymbols = Map [ ... ]
let parsingTable = set [ ... ]

With the parsing table, plus the parser runtime libraries, FSharpCompiler.Parsing, you can build parsers. How to build a parser using Yacc is detailed in the resolution:xp44mm/ArithmeticExpressions

The Grammar Type

The Grammar type gives you some properties that represent important Sets of symbols. Grammar is obtained by this method:

let grammar = 
    let yacc = YaccFile.parse yaccFile
    Grammar.from yacc.mainRules

yaccFile is the yacc input file content. The main collection properties are included:

grammar.symbols:      Set<string> // set of terminals and nonterminals
grammar.nonterminals: Set<string> // set of nonterminals
grammar.nullables:    Set<string> // set of nonterminals, which is able to empty
grammar.firsts:       Map<string,Set<string>> // A dictionary that queries the nonterminal's FIRST collection
grammar.lasts:        Map<string,Set<string>> // A dictionary that queries the nonterminal's LAST collection
grammar.follows:      Map<string,Set<string>> // A dictionary that queries the nonterminal's FOLLOW collection

These properties are commonly used to help you write regular expressions in Lex input file.

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.8 1,135 11/4/2021
1.1.7 1,063 10/20/2021
1.1.6 1,016 10/19/2021
1.1.5 1,001 10/19/2021
1.1.4 1,043 8/21/2021
1.1.3 1,070 8/15/2021
1.1.2 1,078 7/18/2021
1.1.1 1,056 7/18/2021
1.1.0 1,066 7/7/2021
1.0.4 1,127 3/13/2021
1.0.3 1,044 2/20/2021
1.0.2 1,041 2/1/2021
1.0.1 1,102 1/22/2021
1.0.0 1,080 1/21/2021

update translation