Skip to content

Releases

Version 7.1.1

Choose a tag to compare

@teo-tsirpanis teo-tsirpanis released this 11 Oct 22:41
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

Choose a tag to compare

@teo-tsirpanis teo-tsirpanis released this 27 Sep 02:11
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.Virtual method and the virtualTerminalT function 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-lalr option in the farkle render CLI tool subcommand has been replaced with the --no-lr option. The previous option is kept for compatibility.
  • Fixed a bug when using custom tokenizer chains.

Version 7.0.1

Choose a tag to compare

@teo-tsirpanis teo-tsirpanis released this 09 Jul 16:09
Immutable release. Only release title and notes can be modified.
  • Fixed a bug where installing the Farkle NuGet 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 nonterminal function supports explicitly specifying its type parameter, in case the compiler cannot infer it.
    • Added setProductions function, as a shortcut for the SetProductions method of Nonterminal<'T>. Also added setProductionsU for untyped nonterminals.
  • 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

Choose a tag to compare

@teo-tsirpanis teo-tsirpanis released this 28 Jun 22:43
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 render command instead of farkle 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

Pre-release

Choose a tag to compare

@teo-tsirpanis teo-tsirpanis released this 18 May 00:30
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 BuilderArtifacts was renamed to BuilderOutputs.
  • Breaking change: The ParserExtensions.ParseAsync family of methods was updated to return a Task<T> instead of a ValueTask<T>. This change was made to avoid returning a potentially large value type, and align with the upcoming runtime async feature, after which Task<T> will be recommended in most cases.
  • Breaking change: Multiple types in the Farkle.Grammars namespace were renamed to avoid collisions with types in the Farkle.Builder namespace. For example, Farkle.Grammars.Nonterminal was renamed to Farkle.Grammars.NonterminalDefinition.
  • Added the precompiler.
  • Displaying localized text always uses the language specified in CultureInfo.CurrentUICulture. Previously, it used the IFormatProvider argument if specified, which could lead to inconsistencies, particularly when CurrentCulture and CurrentUICulture are different.
  • Fixed bugs and improved performance.

Version 7.0.0-preview.2

Pre-release

Choose a tag to compare

@teo-tsirpanis teo-tsirpanis released this 30 Oct 01:26
Immutable release. Only release title and notes can be modified.

The following changes were made after 7.0.0-preview.1:

  • Breaking change: Removed params from parameters of type OperatorScope.
  • Breaking change: Removed the IParserStateBox interface and related APIs.
  • Added BuildSemanticProvider extension method to IGrammarBuilder<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 IsSingleTokenizerInChain extension method would return wrong results.

Version 7.0.0-preview.1

Pre-release

Choose a tag to compare

@teo-tsirpanis teo-tsirpanis released this 06 Sep 20:26
Immutable release. Only release title and notes can be modified.
0c40d81
  • 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

Choose a tag to compare

@teo-tsirpanis teo-tsirpanis released this 10 Nov 21:39
64052a9
  • Fixed a bug where the LALR builder would generate wrong parsing tables under certain circumstances. (#301)

Version 6.5.1

Choose a tag to compare

@teo-tsirpanis teo-tsirpanis released this 25 Jan 20:42
  • 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

Choose a tag to compare

@teo-tsirpanis teo-tsirpanis released this 08 Sep 21:56
  • Added an overload of the MarkForPrecompile extension 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 null and throw ArgumentNullExceptions.
  • Some documentation was fixed.
  • The nullability annotations for some generic methods in the builder were fixed.
  • Added params in the array parameter overload of Nonterminal.CreateUntyped that 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 calling Appended() or Extending(). Previously only some combinations were supported (Finish on typed designtime Farkles and FinishConstant on 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 new command 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.