Releases: teo-tsirpanis/Farkle
Releases · teo-tsirpanis/Farkle
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.
Version 6.4.0
- Breaking change:
Farkle.Tools.MSBuildrequire 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
FarklePrecompilerErrorModeproperty. Its allowed values areReportOnly(default),ErrorsOnlyandBoth. - String regexes support specifying predefined sets by their property name as well. For example, until now you could match all characters in the
Greek Extendedcharacter 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
- 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
- Minor breaking change:
Farkle.Builder.RegexGrammar.designtime's type became a regularDesigntimeFarkle<Regex>, after being changed to aNonterminal<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
- 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.GrammarMetadatatype has an additional field of typeFarkle.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
IndistinguishableSymbols2was introduced. - Any type of designtime Farkle can now be renamed or set metadata like case sensitivity, comments or operator scopes, without using the
DesigntimeFarkle.castfunction. 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
literaloperator that got passed the same string. - Fixed a bug on the
newCLI tool command where the--propoption could not be specified more than once. - Fixed a bug where the
newCLI 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
sepByoperator could not match exactly one item.
Version 6.2.0
- Breaking change: The
Farkle.Builder.LALRBuildTypesmodule, as well as most functions of theFarkle.Builder.LALRBuildmodule became internal. - Minor breaking change: Whitespace inside the "between", "at least" and "exactly
ntimes" regex string quantifiers is no longer allowed. Using string regexes like\d{ 4}will cause an error. - Minor breaking change: The
Farkle.Builder.IRawDelegateProviderinterface and a function in theFarkle.Builder.DFABuildmodule 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
NewLinewill have an underscore prepended to their name when built, making them_NewLinefor 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
\sand\Sstring 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.Advancemethod got a new overload that accepts aReadOnlySpanof 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'sDFABuild,LALRBuildandDesigntimeFarkleBuildmodules. Additionally theBuildandBuildUntypedextension 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.