Repository navigation
Releases
Releases · teo-tsirpanis/Farkle
Version 7.1.1
Immutable
release. Only release title and notes can be modified.
- Fixed a bug where suppressing the IDE0051 warning for precompiler input methods does not happen on Visual Basic projects.
- Fixed an error when reading certain large grammars.
- Fixed bugs in the CLI tool.
- Fixed gaps in grammar file content validation.
Version 7.1.0
Immutable
release. Only release title and notes can be modified.
- Added support for the IELR(1) algorithm in the builder, which provides the full expressive power of LR(1) grammars without being susceptible to mysterious conflicts that can occur with LALR(1), while generating only slightly larger tables. IELR(1) is used by default.
- Added enhanced syntax, which is a set of convenience APIs powered by source generators. At this moment, they provide a simpler way to create production builders.
- Added support for typed virtual terminals in the builder, allowing them to participate in semantic analysis. This is exposed through the generic overload of the
Terminal.Virtualmethod and thevirtualTerminalTfunction in the F# API. - Refactored LR conflict resolution to improve performance and predictably handle conflicts with more than two contributions, and conflicts where some of the contributions do not have precedence information.
- The
--no-lalroption in thefarkle renderCLI tool subcommand has been replaced with the--no-lroption. The previous option is kept for compatibility. - Fixed a bug when using custom tokenizer chains.
Version 7.0.1
Immutable
release. Only release title and notes can be modified.
- Fixed a bug where installing the
FarkleNuGet package on unsupported frameworks did not fail. - Reduced allocations when creating regexes that match characters specified in an
ImmutableArray<char>or a string. - Fixed incorrect or unlocalized exception messages under certain circumstances.
- Improved ergonomics of the F# API:
- The
nonterminalfunction supports explicitly specifying its type parameter, in case the compiler cannot infer it. - Added
setProductionsfunction, as a shortcut for theSetProductionsmethod ofNonterminal<'T>. Also addedsetProductionsUfor untyped nonterminals.
- The
- Updated the precompiler to be compatible with MSBuild's upcoming multi-threaded task execution model. This will result in increased performance when using new .NET SDK versions.
Version 7.0.0
Immutable
release. Only release title and notes can be modified.
- Farkle was rewritten in C#, and features performance improvements across the board, as well as an improved and extensible architecture.
- There are several breaking changes; please consult the migration guide for more details.
- The parser became faster and allocation-free (allocations happen only in semantic analysis, fka post-processing), and supports parsing text from
ReadOnlySpan<char>, as well as parsing streaming input asynchronously. - The grammar format was redesigned to be extensible and have a significantly reduced reading overhead. Building grammars is also significantly faster as well. Take a look at the benchmarks for more information.
- Reading GOLD Parser grammars is still supported, and works by converting them to the new format.
- Also added support for reading CGT grammars, used in early GOLD Parser versions.
- Diagnostic messages are localizable, with English and Greek translations being provided.
- Terminals can now be defined as hidden, which means that they will not appear in the expected symbol list of syntax error messages.
- Terminals can now be defined as noisy, which means that they will be ignored if they appear in an unexpected position.
The following changes were made after 7.0.0-preview.3:
- Ported support for reading precompiled grammars in the CLI tool.
- Rendering grammars in the CLI tool is now done with the
farkle rendercommand instead offarkle new. The latter is still supported for compatibility. - HTML templates display a list of LR and DFA states with conflicts, if there are any.
- Indistinguishable symbol errors now include an example word that can be matched by all the indistinguishable symbols. This feature was present in Farkle 6.
- Fixed an edge-case bug in the LALR builder, which affected grammars that accept the empty string as input.
Version 7.0.0-preview.3
Immutable
release. Only release title and notes can be modified.
The following changes were made after 7.0.0-preview.2:
- Breaking change: Minimum target framework was increased from .NET Standard 2.1 to .NET 8, and will from now on follow the .NET support lifecycle.
- Breaking change: The type
BuilderArtifactswas renamed toBuilderOutputs. - Breaking change: The
ParserExtensions.ParseAsyncfamily of methods was updated to return aTask<T>instead of aValueTask<T>. This change was made to avoid returning a potentially large value type, and align with the upcoming runtime async feature, after whichTask<T>will be recommended in most cases. - Breaking change: Multiple types in the
Farkle.Grammarsnamespace were renamed to avoid collisions with types in theFarkle.Buildernamespace. For example,Farkle.Grammars.Nonterminalwas renamed toFarkle.Grammars.NonterminalDefinition. - Added the precompiler.
- Displaying localized text always uses the language specified in
CultureInfo.CurrentUICulture. Previously, it used theIFormatProviderargument if specified, which could lead to inconsistencies, particularly whenCurrentCultureandCurrentUICultureare different. - Fixed bugs and improved performance.
Version 7.0.0-preview.2
Immutable
release. Only release title and notes can be modified.
The following changes were made after 7.0.0-preview.1:
- Breaking change: Removed
paramsfrom parameters of typeOperatorScope. - Breaking change: Removed the
IParserStateBoxinterface and related APIs. - Added
BuildSemanticProviderextension method toIGrammarBuilder<T>. - Added structures to the grammar file format that can make parsing groups two times faster or more. (#153)
- Updated the grammar file format specification to improve its version compatibility rules, and add specification for potential future features.
- Fixed referencing the Farkle package in F# Interactive.
- Fixed failures when rendering templates from very large grammars.
- Fixed a bug where the
IsSingleTokenizerInChainextension method would return wrong results.
Version 7.0.0-preview.1
Immutable
release. Only release title and notes can be modified.
- Farkle was rewritten in C#, and features performance improvements across the board, as well as an improved and extensible architecture.
- There are several breaking changes; please consult the migration guide for more details.
- The precompiler is not yet supported; it will be ported in a subsequent preview version.
- The parser became faster and allocation-free (allocations happen only in semantic analysis, fka post-processing), and supports parsing text from
ReadOnlySpan<char>, as well as parsing streaming input asynchronously. - The grammar format was redesigned to be extensible and have a significantly reduced reading overhead. Building grammars is also significantly faster as well. Take a look at the benchmarks for more information.
- Reading GOLD Parser grammars is still supported, and works by converting them to the new format.
- Also added support for reading CGT grammars, used in early GOLD Parser versions.
- Terminals can now be defined as hidden, which means that they will not appear in the expected symbol list of syntax error messages.
- Terminals can now be defined as noisy, which means that they will be ignored if they appear in an unexpected position.
Version 6.5.2
- Fixed a bug where the LALR builder would generate wrong parsing tables under certain circumstances. (#301)
Version 6.5.1
- Fixed a bug where the precompiler would not work on .NET Framework editions of MSBuild, like in Visual Studio for Windows, when targeting frameworks greater than .NET 6.
Version 6.5.0
- Added an overload of the
MarkForPrecompileextension method that enables the precompiler to be used in AOT environments. See https://teo-tsirpanis.github.io/Farkle/the-precompiler.html#Using-the-precompiler-in-AOT-environments for more details. - Frequently used post-processors will no longer be optimized using dynamic code generation, because of concerns about the code generator's robustness. Performance might slightly regress. A more robust code generation system might be introduced in a future version of Farkle.
- More methods in the builder check their arguments for
nulland throwArgumentNullExceptions. - Some documentation was fixed.
- The nullability annotations for some generic methods in the builder were fixed.
- Added
paramsin the array parameter overload ofNonterminal.CreateUntypedthat takes a name and a series of production builders. - The color of the goto cells in the HTML tables was changed to a brighter shade of blue whose contrast is compliant with WCAG 2 AA.
- C# users can now define single-member productions by directly calling
Finish(Constant)without callingAppended()orExtending(). Previously only some combinations were supported (Finishon typed designtime Farkles andFinishConstanton literals), but now all can be used. - The HTML DFA States tables were restyled to make them consistent with the LALR States tables. In particular the columns were swapped and the dark grey background of the character cells was removed.
- The
farkle newcommand will place the output in the current directory instead of the input grammar's or assembly's directory, if not given an output path by the user. - The
Production<T>type became a covariant interface, fixing issue #26. Because it used to be a sealed class with no members, it is not expected to be a breaking change. User code is not allowed to implement it. - Trimming warnings were reduced. A couple of them remain and might appear when building grammars without the precompiler, but they pose no risk, removing them was non-trivial.