Skip to content

Releases: teo-tsirpanis/Farkle

Version 7.0.0-preview.2

30 Oct 01:26
Immutable release. Only release title and notes can be modified.

Choose a tag to compare

Pre-release

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

06 Sep 20:26
Immutable release. Only release title and notes can be modified.
0c40d81

Choose a tag to compare

Pre-release
  • 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

10 Nov 21:39
64052a9

Choose a tag to compare

  • Fixed a bug where the LALR builder would generate wrong parsing tables under certain circumstances. (#301)

Version 6.5.1

25 Jan 20:42

Choose a tag to compare

  • 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

08 Sep 21:56

Choose a tag to compare

  • 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.

Version 6.4.0

11 Mar 08:13

Choose a tag to compare

  • Breaking change: Farkle.Tools.MSBuild require MSBuild 17, which comes with Visual Studio 2022 and the .NET 6 SDK.
  • Farkle supports precompiling .NET 6 assemblies from Visual Studio.
  • Fixed random compiler errors when using the F# production builder operators .>> and .>>..
  • The precompiler supports writing both a conflict report and detailed MSBuild errors via the FarklePrecompilerErrorMode property. Its allowed values are ReportOnly (default), ErrorsOnly and Both.
  • String regexes support specifying predefined sets by their property name as well. For example, until now you could match all characters in the Greek Extended character set by specifying \p{Greek Extended}. From now on, \p{GreekExtended} will work too.
  • Various bug fixes, particularly in the precompiler.

Version 6.3.2

31 Oct 12:28

Choose a tag to compare

  • Fixed a bug where the precompiler would not work on .NET Framework editions of MSBuild, like in Visual Studio for Windows.

Version 6.3.1

18 Oct 07:46

Choose a tag to compare

  • Minor breaking change: Farkle.Builder.RegexGrammar.designtime's type became a regular DesigntimeFarkle<Regex>, after being changed to a Nonterminal<Regex> in Farkle 6.3.0 by mistake. This change is unlikely to affect any regular user of Farkle.
  • Fixed a bug where Farkle's assembly was not shrunk enough when trimmed.

Version 6.3.0

03 Oct 10:28

Choose a tag to compare

  • Minor breaking change: Text with legacy CR line endings is no longer supported. Since this version, they will no longer be recognized as line endings by position tracking. When Farkle's next major version gets released, they will cause lexical errors.
  • Minor breaking change: The Farkle.Builder.GrammarMetadata type has an additional field of type Farkle.Builder.OperatorPrecedence.OperatorScope. User code that does not directly set metadata to designtime Farkles is not affected.
  • The precompiler will now generate an HTML report if a grammar has LALR conflicts.
  • The precompiler now works on Visual Studio for Windows. In this case only, it requires to install the .NET tool Farkle.Tools.
  • When building a grammar, if Farkle cannot distinguish between two symbols, it will now include an example word that made it indecisive in the error message. A new build error type named IndistinguishableSymbols2 was introduced.
  • Any type of designtime Farkle can now be renamed or set metadata like case sensitivity, comments or operator scopes, without using the DesigntimeFarkle.cast function. There were some binary breaking changes but none is source breaking.
  • Operator scopes will now correctly recognize multiple representations of the same designtime Farkle, such as an original terminal and a renamed one, or a string, and a designtime Farkle created with the literal operator that got passed the same string.
  • Fixed a bug on the new CLI tool command where the --prop option could not be specified more than once.
  • Fixed a bug where the new CLI tool command could not be used on projects or assemblies.
  • Fixed a bug where titlecase letters were not excluded when building case-insensitive grammars.
  • Fixed a bug where the sepBy operator could not match exactly one item.

Version 6.2.0

16 May 22:30

Choose a tag to compare

  • Breaking change: The Farkle.Builder.LALRBuildTypes module, as well as most functions of the Farkle.Builder.LALRBuild module became internal.
  • Minor breaking change: Whitespace inside the "between", "at least" and "exactly n times" regex string quantifiers is no longer allowed. Using string regexes like \d{ 4} will cause an error.
  • Minor breaking change: The Farkle.Builder.IRawDelegateProvider interface and a function in the Farkle.Builder.DFABuild module became private. They were public by accident and served no purpose for Farkle's users.
  • Minor breaking change: Users that write their own tokenizers must ensure that CRLF line endings are Advanced at once, otherwise the character stream's position will be incorrect. The vast majority of use cases (those that doesn't involve custom tokenizers) will not be affected by this change.
  • Minor breaking change: Terminals, literals, and groups that are case-insensitively named NewLine will have an underscore prepended to their name when built, making them _NewLine for example. This change is a temporary workaround for a design deficiency of Farkle, where these terminals could end line groups and comments. It will be thoroughly fixed in the next major version. Because these names are only used for diagnostics and documentation generation, parser behavior will not be affected by this change. Nor will grammars read by EGT files be changed.
  • Minor breaking change: The \s and \S string regex symbol will now match exactly either horizontal tabs, line feeds, carriage returns or spaces. Other characters like vertical tabs and non-breaking spaces are no longer matched. This change matches Farkle's definition of whitespace. To revert to the previous behavior use \p{Whitespace} or \P{Whitespace}.
  • Farkle's string regexes got many improvements and bug fixes, bringing their syntax closer -but not a 100% match- to popular regex languages. Take a look at the string regex reference for more details.
  • The precompiler now works when used on a project targeting a framework earlier than .NET Core 3.1.
  • The Position.Advance method got a new overload that accepts a ReadOnlySpan of characters. It is recommended over the existing one that accepts a single character because it reliably handles line endings.
  • Building a grammar can now be cancelled by new functions introduced in Farkle.Builder's DFABuild, LALRBuild and DesigntimeFarkleBuild modules. Additionally the Build and BuildUntyped extension methods of designtime Farkles now accept an optional cancellation token.
  • Fixed a bug where the wrong error position was sometimes reported on text with LF line endings.
  • Fixed a bug where the wrong error position was reported on syntax errors.